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

fix cypress tests

This commit is contained in:
Peter Clement 2021-11-15 11:04:22 +00:00
parent 0c7da50562
commit 8ad1906865
2 changed files with 12 additions and 5 deletions

View file

@ -1,9 +1,9 @@
{
"baseUrl": "http://localhost:10001/builder/",
"baseUrl": "http://localhost:10000/builder/",
"video": true,
"projectId": "bmbemn",
"env": {
"PORT": "10001",
"PORT": "10000",
"JWT_SECRET": "test"
}
}

View file

@ -49,7 +49,6 @@ Cypress.Commands.add("deleteApp", () => {
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.contains("Delete").click()
@ -186,8 +185,16 @@ Cypress.Commands.add("navigateToFrontend", () => {
Cypress.Commands.add("createScreen", (screenName, route) => {
cy.get("[aria-label=AddCircle]").click()
cy.get(".spectrum-Modal").within(() => {
cy.get("input").first().type(screenName)
cy.get("input").eq(1).type(route)
cy.get(".item").first().click()
cy.get(".spectrum-Button--cta").click()
})
cy.get(".spectrum-Modal").within(() => {
cy.get("input").first().clear().type(screenName)
cy.get("input").eq(1).clear().type(route)
cy.get(".spectrum-Button--cta").click()
})
cy.get(".spectrum-Modal").within(() => {
cy.get(`[data-cy="left-nav"]`).click()
cy.get(".spectrum-Button--cta").click()
})
})