adding cypress tag to input

This commit is contained in:
Martin McKeaveney 2021-11-10 14:08:34 +01:00
parent f5406cecf2
commit 8f7b57837e
2 changed files with 3 additions and 3 deletions

View File

@ -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()
}
})

View File

@ -303,7 +303,7 @@
Are you sure you want to delete the app <b>{selectedApp?.name}</b>?
<p>Please enter the app name below to confirm.</p>
<Input bind:value={appName} />
<Input bind:value={appName} data-cy="delete-app-confirmation" />
</ConfirmDialog>
<ConfirmDialog
bind:this={unpublishModal}