1
0
Fork 0
mirror of synced 2024-06-27 02:20:35 +12:00

fix cypress tests

This commit is contained in:
Martin McKeaveney 2021-11-10 13:04:59 +01:00
parent b66d76f010
commit a8066909df

View file

@ -43,16 +43,14 @@ Cypress.Commands.add("createApp", name => {
})
})
Cypress.Commands.add("deleteApp", appName => {
Cypress.Commands.add("deleteApp", () => {
cy.visit(`localhost:${Cypress.env("PORT")}/builder`)
cy.wait(1000)
cy.request(`localhost:${Cypress.env("PORT")}/api/applications?status=all`)
.its("body")
.then(val => {
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()
}