【问题标题】:Rally App SDK using TreeView to load testfolders, only loads top folderRally App SDK 使用 TreeView 加载测试文件夹,仅加载顶层文件夹
【发布时间】:2016-08-12 04:24:14
【问题描述】:

尝试运行为 Rally App SDK 测试文件夹示例提供的树视图示例 [此处] [1] - https://help.rallydev.com/apps/2.0/doc/#!/api/Rally.ui.tree.Tree [1]

尝试为 usestory 和 test 文件夹提供的示例都只加载顶层,在 userstory 的情况下不加载子任务/用户故事,而测试文件夹不加载子文件夹或测试用例。

这是 App.js 文件的摘录。

Ext.define('CustomApp', {
    extend: 'Rally.app.App',
    componentCls: 'app',

    
    launch: function() {
    	
    	this.add({
				         xtype: 'rallytree',
				         topLevelModel: Ext.identityFn('TestFolder'),
				         childModelTypeForRecordFn: function(record){
				             if(record.get('Children') && record.get('Children').length > 0){
				                 return 'TestFolder';
				             } else {
				                 return 'TestCase';
				             }
				         },
				         givenAParentRecordWhatIsTheAttributeConnectingAChildToThisParentFn: function(record){
				             if(record.get('Children') && record.get('Children').length > 0){
				                 return 'Parent';
				             } else {
				                 return 'TestFolder';
				             }
				         },
				         canExpandFn: function(record){
				             return record.get('Children') && record.get('Children').length > 0
				             || record.get('TestCases') && record.get('TestCases').length > 0;
				         },
				         enableDragAndDrop: false,
				         dragThisGroupOnMeFn: function(record){
				             if(record.get('_type') === 'testfolder'){
				                 if(record.get('Children') && record.get('Children').length > 0){
				                     return 'testfolder';
				                 }
				                 if(record.get('TestCases') && record.get('TestCases').length > 0){
				                     return 'testcase';
				                 }
				                 return ['testfolder', 'testcase'];
				             }
				         },
				         topLevelStoreConfig: {
				             sorters: []
				         },
				         childItemsStoreConfigForParentRecordFn: function(){
				             return {
				                 sorters: []
				             };
				         }
                //remaining config omitted for brevity
            
        /**/
      });
        //API Docs: https://help.rallydev.com/apps/2.1/doc/
    }
});

【问题讨论】:

    标签: rally


    【解决方案1】:

    看看这个应用程序: https://github.com/nikantonelli/TestCaseOrganiser

    这应该显示您的 TestFolder 层次结构和它们下面的测试用例,甚至允许拖放移动测试用例。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-11-30
      • 1970-01-01
      • 2013-09-18
      • 1970-01-01
      • 2012-06-26
      • 2019-02-26
      • 1970-01-01
      相关资源
      最近更新 更多