summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/support/steps/drawingBoard/general.steps.ts
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/cypress/support/steps/drawingBoard/general.steps.ts')
-rw-r--r--vid-webpack-master/cypress/support/steps/drawingBoard/general.steps.ts33
1 files changed, 33 insertions, 0 deletions
diff --git a/vid-webpack-master/cypress/support/steps/drawingBoard/general.steps.ts b/vid-webpack-master/cypress/support/steps/drawingBoard/general.steps.ts
new file mode 100644
index 000000000..5444971b7
--- /dev/null
+++ b/vid-webpack-master/cypress/support/steps/drawingBoard/general.steps.ts
@@ -0,0 +1,33 @@
+declare namespace Cypress {
+ interface Chainable {
+ updateServiceShouldNotOverrideChild: typeof updateServiceShouldNotOverrideChild
+ openServiceContextMenu: typeof openServiceContextMenu
+ }
+}
+
+function updateServiceShouldNotOverrideChild() : void {
+ cy.getElementByDataTestsId('drawing-board-tree').find('.node-content-wrapper').then((elements)=>{
+ let numberOfExistingElements = elements.length;
+ cy.openServiceContextMenu().then(() =>{
+ cy.getElementByDataTestsId('context-menu-header-edit-item').click({force : true}).then(()=>{
+ cy.genericFormSubmitForm().then(()=>{
+ cy.getElementByDataTestsId('drawing-board-tree').find('.node-content-wrapper').then((afterUpdateServiceElements)=>{
+ chai.expect(numberOfExistingElements).equal(afterUpdateServiceElements.length);
+ });
+ });
+ });
+ });
+ });
+
+}
+
+
+function openServiceContextMenu() : Chainable<any> {
+ return cy.getElementByDataTestsId('openMenuBtn').click({force: true});
+}
+
+
+
+
+Cypress.Commands.add('updateServiceShouldNotOverrideChild', updateServiceShouldNotOverrideChild);
+Cypress.Commands.add('openServiceContextMenu', openServiceContextMenu);