Fix cypress tests

This commit is contained in:
Andrew Kingston 2020-10-17 19:07:12 +01:00
parent 5d2e4d506c
commit fcd3257044
1 changed files with 6 additions and 2 deletions

View File

@ -155,9 +155,13 @@ Cypress.Commands.add("navigateToFrontend", () => {
Cypress.Commands.add("createScreen", (screenName, route) => { Cypress.Commands.add("createScreen", (screenName, route) => {
cy.contains("Create New Screen").click() cy.contains("Create New Screen").click()
cy.get(".modal").within(() => { cy.get(".modal").within(() => {
cy.get("input:first").type(screenName) cy.get("input")
.eq(0)
.type(screenName)
if (route) { if (route) {
cy.get("input:last").type(route) cy.get("input")
.eq(1)
.type(route)
} }
cy.contains("Create Screen").click() cy.contains("Create Screen").click()
}) })