Timeout changes for Cypress Commands file

Cypress visit and requests in some cases need a timeout value included. This is specific for smoke build and CI runs (has no effect on local runs)
This commit is contained in:
Mitch-Budibase 2022-07-18 13:52:21 +01:00
parent 9914a83737
commit 7ab64c730b
1 changed files with 5 additions and 3 deletions

View File

@ -4,7 +4,7 @@ Cypress.on("uncaught:exception", () => {
// ACCOUNTS & USERS
Cypress.Commands.add("login", (email, password) => {
cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 })
cy.wait(2000)
cy.url().then(url => {
if (url.includes("builder/admin")) {
@ -223,9 +223,11 @@ Cypress.Commands.add("deleteApp", name => {
})
Cypress.Commands.add("deleteAllApps", () => {
cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 })
cy.wait(500)
cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`)
cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`, {
timeout: 5000,
})
.its("body")
.then(val => {
for (let i = 0; i < val.length; i++) {