Browse Source
Merge pull request #6600 from Budibase/cypress-testing
Cypress: Increasing timeout values
master
Mitch-Budibase
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
7 deletions
-
packages/builder/cypress/integration/datasources/postgreSql.spec.js
-
packages/builder/cypress/support/commands.js
|
|
@ -231,10 +231,9 @@ filterTests(["all"], () => { |
|
|
// Run and Save query
|
|
|
// Run and Save query
|
|
|
cy.get(".spectrum-Button").contains("Run Query").click({ force: true }) |
|
|
cy.get(".spectrum-Button").contains("Run Query").click({ force: true }) |
|
|
cy.wait(500) |
|
|
cy.wait(500) |
|
|
cy.get(".spectrum-Button", { timeout: 500 }).contains("Save Query").click({ force: true }) |
|
|
cy.get(".spectrum-Button", { timeout: 2000 }).contains("Save Query").click({ force: true }) |
|
|
//cy.reload()
|
|
|
cy.reload({ timeout: 5000 }) |
|
|
//cy.wait(500)
|
|
|
cy.get(".nav-item", { timeout: 2000 }).should("contain", queryRename) |
|
|
cy.get(".nav-item").should("contain", queryRename) |
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
it("should delete a query", () => { |
|
|
it("should delete a query", () => { |
|
|
|
|
|
@ -134,16 +134,18 @@ 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`, { timeout: 5000 }) |
|
|
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 10000 }) |
|
|
cy.wait(1000) |
|
|
cy.wait(1000) |
|
|
cy.get(`[data-cy="create-app-btn"]`, { timeout: 2000 }).click({ force: true }) |
|
|
cy.get(`[data-cy="create-app-btn"]`, { timeout: 5000 }).click({ force: true }) |
|
|
|
|
|
|
|
|
// If apps already exist
|
|
|
// If apps already exist
|
|
|
cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`) |
|
|
cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`) |
|
|
.its("body") |
|
|
.its("body") |
|
|
.then(val => { |
|
|
.then(val => { |
|
|
if (val.length > 0) { |
|
|
if (val.length > 0) { |
|
|
cy.get(`[data-cy="create-app-btn"]`).click({ force: true }) |
|
|
cy.get(`[data-cy="create-app-btn"]`, { timeout: 5000 }).click({ |
|
|
|
|
|
force: true, |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|