toast-tk / toast-tk-engine

The core automation framework for your acceptance tests
http://toast-tk.io
Other
12 stars 5 forks source link

Webapp Scenario deletion is unstable #106

Closed babebridou closed 7 years ago

babebridou commented 7 years ago

deleting a scenario leads to an unstable situation: the selected node in the tree no longer exists and an angular exception is raised when the user tries to create a new scenario.

Some node deletions also fail with "Error: has child nodes!" even when they don't.

skokaina commented 7 years ago

fixed with following update @tabkram: why do we need to keep track of selectedItem in self ?

-- function removeSelectedNode(){ console.log("removing:", self.selectedNode); if(self.selectedNode != 0){ self.selectedTree.remove(self.selectedNode);

                  delete self.selectedElementId;
                  delete self.selectedItem;
          } else {
               console.log("select a node:");
          } 
        }

babebridou commented 7 years ago

The bug now also occurs when you create a scenario, click on repository, click back on scenarios, and click on add a new scenario.

angular.js:12798 TypeError: Cannot read property '$parent' of undefined
at Object.getParentId (webix_debug.js:12574)
at Object.getParentId (webix_debug.js:10582)
at tree.layout.service.js:109
at Object.webix.ready (webix_debug.js:910)
at Object.saveConcernedNode (tree.layout.service.js:103)
at Scope.$scope.addNodeToParent (scenario.controller.js:95)
at fn (eval at compile (angular.js:13643), <anonymous>:4:253)
at expensiveCheckFn (angular.js:14625)
at callback (angular.js:24093)
at Scope.$eval (angular.js:16374)
skokaina commented 7 years ago

106_delete_it merged to master, other issues found for folder (tracked through issue #118)

skokaina commented 7 years ago

issue #118 fixed and merged in master