Cypress Command + Rest Timeout update
rest.spec.js - Test was flakey on last nights smoke run - Updated to specifically search for query-buttons and then add query commands.js - Increasing timeout values for createTable & createDatasourceScreen commands
This commit is contained in:
parent
8031b3666c
commit
7f94953c3a
|
@ -14,7 +14,7 @@ filterTests(["smoke", "all"], () => {
|
|||
// Select REST data source
|
||||
cy.selectExternalDatasource(datasource)
|
||||
// Enter incorrect api & attempt to send query
|
||||
cy.get(".spectrum-Button", { timeout: 500 }).contains("Add query").click({ force: true })
|
||||
cy.get(".query-buttons", { timeout: 1000 }).contains("Add query").click({ force: true })
|
||||
cy.intercept("**/preview").as("queryError")
|
||||
cy.get("input").clear().type("random text")
|
||||
cy.get(".spectrum-Button").contains("Send").click({ force: true })
|
||||
|
|
|
@ -457,8 +457,8 @@ Cypress.Commands.add("createTable", (tableName, initialTable) => {
|
|||
cy.get(".spectrum-ButtonGroup").contains("Create").click()
|
||||
})
|
||||
// Ensure modal has closed and table is created
|
||||
cy.get(".spectrum-Modal").should("not.exist")
|
||||
cy.get(".spectrum-Tabs-content", { timeout: 1000 }).should(
|
||||
cy.get(".spectrum-Modal", { timeout: 2000 }).should("not.exist")
|
||||
cy.get(".spectrum-Tabs-content", { timeout: 2000 }).should(
|
||||
"contain",
|
||||
tableName
|
||||
)
|
||||
|
@ -642,25 +642,25 @@ Cypress.Commands.add(
|
|||
cy.get(".spectrum-Button").contains("Continue").click({ force: true })
|
||||
})
|
||||
cy.get(".spectrum-Modal [data-cy='data-source-modal']", {
|
||||
timeout: 500,
|
||||
timeout: 20000,
|
||||
}).within(() => {
|
||||
for (let i = 0; i < datasourceNames.length; i++) {
|
||||
cy.wait(500)
|
||||
cy.get(".data-source-entry").contains(datasourceNames[i]).click()
|
||||
cy.get(".data-source-entry", { timeout: 10000 })
|
||||
.contains(datasourceNames[i])
|
||||
.click({ force: true })
|
||||
//Ensure the check mark is visible
|
||||
cy.get(".data-source-entry")
|
||||
.contains(datasourceNames[i])
|
||||
.get(".data-source-check")
|
||||
.get(".data-source-check", { timeout: 10000 })
|
||||
.should("exist")
|
||||
}
|
||||
|
||||
cy.get(".spectrum-Button").contains("Confirm").click({ force: true })
|
||||
})
|
||||
|
||||
cy.get(".spectrum-Modal").within(() => {
|
||||
cy.get(".spectrum-Modal", { timeout: 10000 }).within(() => {
|
||||
if (accessLevelLabel) {
|
||||
cy.get(".spectrum-Picker-label").click()
|
||||
cy.wait(500)
|
||||
cy.get(".spectrum-Picker-label", { timeout: 10000 }).click()
|
||||
cy.contains(accessLevelLabel).click()
|
||||
}
|
||||
cy.get(".spectrum-Button").contains("Done").click({ force: true })
|
||||
|
|
Loading…
Reference in New Issue