Updated commands.js

createScreen command now uses a specific data-cy id

also added 1 second wait within selectExternalDatasource - assists with timing for smoke build
This commit is contained in:
Mitch-Budibase 2022-04-26 15:56:11 +01:00
parent 5f963b2bfa
commit 2b2035b187
1 changed files with 2 additions and 1 deletions

View File

@ -292,7 +292,7 @@ Cypress.Commands.add("createScreen", (route, accessLevelLabel) => {
cy.contains("Design").click()
cy.get("[aria-label=AddCircle]").click()
cy.get(".spectrum-Modal").within(() => {
cy.get(".item").contains("Blank screen").click()
cy.get("[data-cy='blank-screen']").click()
cy.get(".spectrum-Button").contains("Continue").click({ force: true })
cy.wait(500)
})
@ -473,6 +473,7 @@ Cypress.Commands.add("selectExternalDatasource", datasourceName => {
cy.get(".add-button").click()
})
// Clicks specified datasource & continue
cy.wait(1000)
cy.get(".item-list").contains(datasourceName).click()
cy.get(".spectrum-Dialog-grid").within(() => {
cy.get(".spectrum-Button").contains("Continue").click({ force: true })