1
0
Fork 0
mirror of synced 2024-06-23 08:30:31 +12:00

Fix cypress tests not deleting old apps

This commit is contained in:
Andrew Kingston 2021-04-07 15:08:59 +01:00
parent 99c8897500
commit a9f50556d3

View file

@ -57,9 +57,9 @@ Cypress.Commands.add("createApp", name => {
Cypress.Commands.add("deleteApp", name => {
cy.visit(`localhost:${Cypress.env("PORT")}/builder`)
cy.get("body").then($body => {
cy.get(".apps").then($apps => {
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=settings-icon]").click()
cy.get(".modal-content").within(() => {