1
0
Fork 0
mirror of synced 2024-06-16 01:14:48 +12:00

Additional timing based changes for createApp

All tests pass locally, just having issues with timing on the CI run

Also reduced test retries (runs a total of 2 times instead of 3, the 3rd run does not add any value)
This commit is contained in:
Mitch-Budibase 2022-06-30 13:53:16 +01:00
parent 0d4773241b
commit 0941615b94
3 changed files with 10 additions and 9 deletions

View file

@ -13,7 +13,7 @@
"HOST_IP": ""
},
"retries": {
"runMode": 2,
"runMode": 1,
"openMode": 0
}
}

View file

@ -6,7 +6,7 @@ filterTests(['smoke', 'all'], () => {
before(() => {
cy.login()
cy.deleteApp("Cypress Tests")
cy.deleteAllApps()
})
if (!(Cypress.env("TEST_ENV"))) {
@ -48,7 +48,7 @@ filterTests(['smoke', 'all'], () => {
})
it("should enforce a valid url before submission", () => {
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 })
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 10000 })
// Start create app process. If apps already exist, click second button
cy.get(interact.CREATE_APP_BUTTON, { timeout: 1000 }).click({ force: true })
@ -91,7 +91,7 @@ filterTests(['smoke', 'all'], () => {
it("should create the first application from scratch", () => {
const appName = "Cypress Tests"
cy.createApp(appName)
cy.createApp(appName, false)
cy.visit(`${Cypress.config().baseUrl}/builder`)
@ -100,7 +100,7 @@ filterTests(['smoke', 'all'], () => {
})
it("should create the first application from scratch with a default name", () => {
cy.createApp()
cy.createApp("", false)
cy.applicationInAppTable("My app")
cy.deleteApp("My app")
})
@ -110,7 +110,7 @@ filterTests(['smoke', 'all'], () => {
cy.updateUserInformation("Ted", "Userman")
cy.createApp()
cy.createApp("", false)
cy.visit(`${Cypress.config().baseUrl}/builder`)
@ -120,7 +120,7 @@ filterTests(['smoke', 'all'], () => {
//Accomodate names that end in 'S'
cy.updateUserInformation("Chris", "Userman")
cy.createApp()
cy.createApp("", false)
cy.visit(`${Cypress.config().baseUrl}/builder`)

View file

@ -323,7 +323,8 @@ Cypress.Commands.add("importApp", (exportFilePath, name) => {
if (val.length > 0) {
cy.get(`[data-cy="create-app-btn"]`).click({ force: true })
}
cy.get(`[data-cy="import-app-btn"]`, { timeout: 500 }).click({
cy.wait(500)
cy.get(`[data-cy="import-app-btn"]`).click({
force: true,
})
})
@ -372,7 +373,7 @@ Cypress.Commands.add("searchForApplication", appName => {
// Assumes there are no others
Cypress.Commands.add("applicationInAppTable", appName => {
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 2000 })
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 10000 })
cy.get(".appTable", { timeout: 2000 }).within(() => {
cy.get(".title").contains(appName).should("exist")
})