Update command file

Including a wait which seems necessary when logging in for the first time
This commit is contained in:
Mitch-Budibase 2022-07-22 17:39:38 +01:00
parent 9fdcecf8da
commit 9eceb2b9b0
1 changed files with 1 additions and 0 deletions

View File

@ -5,6 +5,7 @@ Cypress.on("uncaught:exception", () => {
// ACCOUNTS & USERS
Cypress.Commands.add("login", (email, password) => {
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 10000 })
cy.wait(2000)
cy.url().then(url => {
if (url.includes("builder/admin")) {
// create admin user