From 753d2f51bcca0c846de9ef29439578a216d1e19c Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 9 Nov 2021 18:35:19 +0100 Subject: [PATCH] updating delete app cypress command --- packages/builder/cypress/support/commands.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index 82e3c45a1f..ff1d13d6cb 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -43,7 +43,7 @@ Cypress.Commands.add("createApp", name => { }) }) -Cypress.Commands.add("deleteApp", () => { +Cypress.Commands.add("deleteApp", appName => { cy.visit(`localhost:${Cypress.env("PORT")}/builder`) cy.wait(1000) cy.request(`localhost:${Cypress.env("PORT")}/api/applications?status=all`) @@ -52,6 +52,7 @@ Cypress.Commands.add("deleteApp", () => { console.log(val) if (val.length > 0) { cy.get(".title > :nth-child(3) > .spectrum-Icon").click() + cy.get("input").type(appName) cy.contains("Delete").click() cy.get(".spectrum-Button--warning").click() } @@ -60,7 +61,7 @@ Cypress.Commands.add("deleteApp", () => { Cypress.Commands.add("createTestApp", () => { const appName = "Cypress Tests" - cy.deleteApp() + cy.deleteApp(appName) cy.createApp(appName, "This app is used for Cypress testing.") })