From 8f7b57837e74a301bc097759c95163457ccd3e94 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Wed, 10 Nov 2021 14:08:34 +0100 Subject: [PATCH] adding cypress tag to input --- packages/builder/cypress/support/commands.js | 4 ++-- packages/builder/src/pages/builder/portal/apps/index.svelte | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index 5682dcb2e2..af60272d49 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`) @@ -51,7 +51,7 @@ Cypress.Commands.add("deleteApp", () => { .then(val => { if (val.length > 0) { cy.get(".title > :nth-child(3) > .spectrum-Icon").click() - cy.contains("Delete").click() + cy.get(`[data-cy="delete-app-confirmation"]`).type(appName) cy.get(".spectrum-Button--warning").click() } }) diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index d465f7b978..53ad661f72 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -303,7 +303,7 @@ Are you sure you want to delete the app {selectedApp?.name}?

Please enter the app name below to confirm.

- +