def load_testfolder(self, data, parent): _labels = [ data.name, ] _tree_testfolder = SCR_WDG_Tree_Item(data=_labels, parent=parent) _tree_testfolder.icon = "585ba3e6f845cb67ef8a6098bed724e247278a5b" _tree_testfolder.userdata = { "data": data, "type": SCR_Tree_Types.TESTFOLDER } for _testfolder in data.testfolders: self.load_testfolder(_testfolder, _tree_testfolder) for _testsuite in data.testsuites: self.load_testsuite(_testsuite, _tree_testfolder) for _resource in data.resources: self.load_resources(_resource, _tree_testfolder) for _library in data.libraries: self.load_libraries(_library, _tree_testfolder) if data.has_files(): parent.add_child(_tree_testfolder)
def load_libraries(self, data, parent): _labels = [ data.name, ] _tree_library = SCR_WDG_Tree_Item(data=_labels, parent=parent) _tree_library.icon = "66a73259d66004e2b9c7180030bc347836ddcb82" _tree_library.userdata = {"data": data, "type": SCR_Tree_Types.LIBRARY} parent.add_child(_tree_library)
def load_keyword(self, data, parent): _labels = [ data.name, ] _tree_keyword = SCR_WDG_Tree_Item(data=_labels, parent=parent) _tree_keyword.icon = "14b802564477e8b8f64dc869c92a4b983edc1001" _tree_keyword.userdata = {"data": data, "type": SCR_Tree_Types.KEYWORD} parent.add_child(_tree_keyword)
def load_testcase(self, data, parent): _labels = [ data.name, ] _tree_testcase = SCR_WDG_Tree_Item(data=_labels, parent=parent) _tree_testcase.icon = "ca211c47afa3b991350a6c183d8aaf3f33db15a0" _tree_testcase.userdata = { "data": data, "type": SCR_Tree_Types.TESTCASE } parent.add_child(_tree_testcase)
def load_external_libraries(self, data, parent): _labels = ["External Libraries"] _tree_ext_libraries = SCR_WDG_Tree_Item(data=_labels, parent=parent) _tree_ext_libraries.icon = "66a73259d66004e2b9c7180030bc347836ddcb82" _tree_ext_libraries.userdata = { "data": None, "type": SCR_Tree_Types.EXTLIBRARIES } parent.add_child(_tree_ext_libraries) for _resource in data: self.load_libraries(_resource, _tree_ext_libraries)
def load_external_resources(self, data, parent): _labels = ["External Resources"] _tree_ext_resources = SCR_WDG_Tree_Item(data=_labels, parent=parent) _tree_ext_resources.icon = "616b77c9b4e3020bee662e34c6feb5e8ddcd2b7d" _tree_ext_resources.userdata = { "data": None, "type": SCR_Tree_Types.EXTRESOURCES } parent.add_child(_tree_ext_resources) for _resource in data: self.load_resources(_resource, _tree_ext_resources)
def load_resources(self, data, parent): _labels = [ data.name, ] _tree_resource = SCR_WDG_Tree_Item(data=_labels, parent=parent) _tree_resource.icon = "26b41084d7c558d94b50f5e1c40cdfd362f05478" _tree_resource.userdata = { "data": data, "type": SCR_Tree_Types.RESOURCE } parent.add_child(_tree_resource) self.load_variables(data, _tree_resource) self.load_keywords(data, _tree_resource)
def load_testsuite(self, data, parent): _labels = [ data.name, ] _tree_testsuite = SCR_WDG_Tree_Item(data=_labels, parent=parent) _tree_testsuite.icon = "8e205a227046baee2a67b75fb12c95813784c484" _tree_testsuite.userdata = { "data": data, "type": SCR_Tree_Types.TESTSUITE } parent.add_child(_tree_testsuite) self.load_variables(data, _tree_testsuite) self.load_testcases(data, _tree_testsuite) self.load_keywords(data, _tree_testsuite)
def load_variable(self, data, parent): _labels = [ data.name, ] _tree_testcase = SCR_WDG_Tree_Item(data=_labels, parent=parent) if data.name[0] == "$": _tree_testcase.icon = "de99afcb2a785eea0974463ae9e7e063a5482b4a" elif data.name[0] == "@": _tree_testcase.icon = "000cc208d4e675301e21ed009db52ff361a35a9f" elif data.name[0] == "&": _tree_testcase.icon = "490daab16fc73f3decf083a5cfb04b47708c8b22" _tree_testcase.userdata = { "data": data, "type": SCR_Tree_Types.VARIABLE } parent.add_child(_tree_testcase)