CreateApp Test Update
Timing issues affecting some tests - Updated some cy.visit commands to include timeouts
This commit is contained in:
parent
7495b859c8
commit
b5fcff3213
|
@ -48,7 +48,7 @@ filterTests(['smoke', 'all'], () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should enforce a valid url before submission", () => {
|
it("should enforce a valid url before submission", () => {
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 })
|
||||||
|
|
||||||
// Start create app process. If apps already exist, click second button
|
// Start create app process. If apps already exist, click second button
|
||||||
cy.get(interact.CREATE_APP_BUTTON, { timeout: 1000 }).click({ force: true })
|
cy.get(interact.CREATE_APP_BUTTON, { timeout: 1000 }).click({ force: true })
|
||||||
|
@ -101,9 +101,6 @@ filterTests(['smoke', 'all'], () => {
|
||||||
|
|
||||||
it("should create the first application from scratch with a default name", () => {
|
it("should create the first application from scratch with a default name", () => {
|
||||||
cy.createApp()
|
cy.createApp()
|
||||||
|
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
|
||||||
|
|
||||||
cy.applicationInAppTable("My app")
|
cy.applicationInAppTable("My app")
|
||||||
cy.deleteApp("My app")
|
cy.deleteApp("My app")
|
||||||
})
|
})
|
||||||
|
@ -138,7 +135,7 @@ filterTests(['smoke', 'all'], () => {
|
||||||
|
|
||||||
cy.importApp(exportedApp, "")
|
cy.importApp(exportedApp, "")
|
||||||
|
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 2000 })
|
||||||
|
|
||||||
cy.applicationInAppTable("My app")
|
cy.applicationInAppTable("My app")
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ Cypress.Commands.add("createApp", (name, addDefaultTable) => {
|
||||||
const shouldCreateDefaultTable =
|
const shouldCreateDefaultTable =
|
||||||
typeof addDefaultTable != "boolean" ? true : addDefaultTable
|
typeof addDefaultTable != "boolean" ? true : addDefaultTable
|
||||||
|
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 })
|
||||||
cy.get(`[data-cy="create-app-btn"]`, { timeout: 2000 }).click({ force: true })
|
cy.get(`[data-cy="create-app-btn"]`, { timeout: 2000 }).click({ force: true })
|
||||||
|
|
||||||
// If apps already exist
|
// If apps already exist
|
||||||
|
@ -315,7 +315,7 @@ Cypress.Commands.add("alterAppVersion", (appId, version) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
Cypress.Commands.add("importApp", (exportFilePath, name) => {
|
Cypress.Commands.add("importApp", (exportFilePath, name) => {
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 })
|
||||||
|
|
||||||
cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`)
|
cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`)
|
||||||
.its("body")
|
.its("body")
|
||||||
|
@ -343,7 +343,7 @@ Cypress.Commands.add("importApp", (exportFilePath, name) => {
|
||||||
cy.get(".confirm-wrap button")
|
cy.get(".confirm-wrap button")
|
||||||
.should("not.be.disabled")
|
.should("not.be.disabled")
|
||||||
.click({ force: true })
|
.click({ force: true })
|
||||||
cy.wait(5000)
|
cy.wait(3000)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -372,7 +372,7 @@ Cypress.Commands.add("searchForApplication", appName => {
|
||||||
|
|
||||||
// Assumes there are no others
|
// Assumes there are no others
|
||||||
Cypress.Commands.add("applicationInAppTable", appName => {
|
Cypress.Commands.add("applicationInAppTable", appName => {
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 2000 })
|
||||||
cy.get(".appTable", { timeout: 2000 }).within(() => {
|
cy.get(".appTable", { timeout: 2000 }).within(() => {
|
||||||
cy.get(".title").contains(appName).should("exist")
|
cy.get(".title").contains(appName).should("exist")
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue