fix cypress tests

This commit is contained in:
Peter Clement 2021-11-15 11:04:22 +00:00
parent fba0975c54
commit a6d8c791e1
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()
})
})