Fix cypress tests not deleting old apps

This commit is contained in:
Andrew Kingston 2021-04-07 15:08:59 +01:00
parent 0ac0f2f742
commit 359e628156
1 changed files with 2 additions and 2 deletions

View File

@ -57,9 +57,9 @@ Cypress.Commands.add("createApp", name => {
Cypress.Commands.add("deleteApp", name => { Cypress.Commands.add("deleteApp", name => {
cy.visit(`localhost:${Cypress.env("PORT")}/builder`) cy.visit(`localhost:${Cypress.env("PORT")}/builder`)
cy.get("body").then($body => { cy.get(".apps").then($apps => {
cy.wait(1000) cy.wait(1000)
if ($body.find(`[data-cy="app-${name}"]`).length) { if ($apps.find(`[data-cy="app-${name}"]`).length) {
cy.get(`[data-cy="app-${name}"] a`).click() cy.get(`[data-cy="app-${name}"] a`).click()
cy.get("[data-cy=settings-icon]").click() cy.get("[data-cy=settings-icon]").click()
cy.get(".modal-content").within(() => { cy.get(".modal-content").within(() => {