1
0
Fork 0
mirror of synced 2024-06-27 18:40:42 +12:00

Code styling

This commit is contained in:
Dean 2022-04-22 16:36:33 +01:00
parent cf15ed2511
commit 86eb359cac
2 changed files with 32 additions and 27 deletions

View file

@ -39,9 +39,7 @@ filterTests(["smoke", "all"], () => {
})
it("Should create a set of datasource screens with the selected access level", () => {
cy.createDatasourceScreen("Cypress Tests", "Public")
})
})
})

View file

@ -307,7 +307,9 @@ Cypress.Commands.add("createScreen", (route, accessLevelLabel) => {
})
})
Cypress.Commands.add("createDatasourceScreen", (datasourceName, accessLevelLabel) => {
Cypress.Commands.add(
"createDatasourceScreen",
(datasourceName, accessLevelLabel) => {
cy.contains("Design").click()
cy.get("[aria-label=AddCircle]").click()
cy.get(".spectrum-Modal").within(() => {
@ -317,9 +319,14 @@ Cypress.Commands.add("createDatasourceScreen", (datasourceName, accessLevelLabel
})
cy.get(".spectrum-Modal [data-cy='data-source-modal']").within(() => {
cy.get(".data-source-entry").contains(datasourceName).should("exist")
cy.get(".data-source-entry").contains(datasourceName).click({ force: true })
cy.get(".data-source-entry")
.contains(datasourceName)
.click({ force: true })
cy.get(".data-source-entry").contains(datasourceName).get(".data-source-check").should("exist")
cy.get(".data-source-entry")
.contains(datasourceName)
.get(".data-source-check")
.should("exist")
cy.get(".spectrum-Button").contains("Confirm").click({ force: true })
})
@ -333,8 +340,8 @@ Cypress.Commands.add("createDatasourceScreen", (datasourceName, accessLevelLabel
})
cy.contains("Design").click()
})
}
)
Cypress.Commands.add("navigateToAutogeneratedModal", () => {
// Screen name must already exist within data source