Minor test updates and formatting
This commit is contained in:
parent
aaa46e8992
commit
cffdad78e5
4 changed files with 81 additions and 51 deletions
|
@ -1,6 +1,18 @@
|
|||
import filterTests from "../support/filterTests"
|
||||
|
||||
filterTests(["smoke", "all"], () => {
|
||||
/*
|
||||
Blank screen
|
||||
URL
|
||||
Screen access
|
||||
Screen access confirmation.
|
||||
|
||||
CRUD Tests
|
||||
list the sources
|
||||
check for exluded contents
|
||||
rest, user table etc
|
||||
*/
|
||||
|
||||
context("Screen Tests", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -21,5 +33,12 @@ filterTests(["smoke", "all"], () => {
|
|||
cy.contains("/test-with-spaces").should("exist")
|
||||
})
|
||||
})
|
||||
|
||||
it("Should update create the screen with the selected", () => {
|
||||
cy.createScreen("Test Screen", "admin only", "Admin")
|
||||
cy.get(".nav-items-container").within(() => {
|
||||
cy.contains("/admin-only").should("exist")
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -270,7 +270,8 @@ Cypress.Commands.add("navigateToDataSection", () => {
|
|||
cy.contains("Data").click()
|
||||
})
|
||||
|
||||
Cypress.Commands.add("createScreen", (screenName, route) => {
|
||||
//Blank
|
||||
Cypress.Commands.add("createScreen", (screenName, route, accessLevelLabel) => {
|
||||
cy.contains("Design").click()
|
||||
cy.get("[aria-label=AddCircle]").click()
|
||||
cy.get(".spectrum-Modal").within(() => {
|
||||
|
@ -279,8 +280,14 @@ Cypress.Commands.add("createScreen", (screenName, route) => {
|
|||
cy.wait(500)
|
||||
})
|
||||
cy.get(".spectrum-Dialog-grid").within(() => {
|
||||
cy.get(".spectrum-Form-itemField").eq(0).type(screenName)
|
||||
cy.get(".spectrum-Form-itemField").eq(1).type(route)
|
||||
cy.get(".spectrum-Form-itemField").eq(0).type(route)
|
||||
|
||||
if(accessLevelLabel){
|
||||
cy.get(".spectrum-Picker-label").click()
|
||||
cy.wait(500)
|
||||
cy.contains(accessLevelLabel).click()
|
||||
}
|
||||
|
||||
cy.get(".spectrum-Button").contains("Continue").click({ force: true })
|
||||
cy.wait(1000)
|
||||
})
|
||||
|
@ -290,9 +297,13 @@ Cypress.Commands.add("createAutogeneratedScreens", screenNames => {
|
|||
// Screen name must already exist within data source
|
||||
cy.contains("Design").click()
|
||||
cy.get("[aria-label=AddCircle]").click()
|
||||
cy.get(".spectrum-Button").contains("Add screens").click({ force: true })
|
||||
cy.wait(500)
|
||||
|
||||
for (let i = 0; i < screenNames.length; i++) {
|
||||
cy.get(".item").contains(screenNames[i]).click()
|
||||
cy.get(".data-source-entry").contains(screenNames[i]).click()
|
||||
}
|
||||
|
||||
cy.get(".spectrum-Button").contains("Add screens").click({ force: true })
|
||||
cy.wait(4000)
|
||||
})
|
||||
|
|
|
@ -22,7 +22,7 @@ export const Events = {
|
|||
},
|
||||
SCREEN: {
|
||||
CREATED: "Screen Created",
|
||||
CREATE_ROLE_UPDATED: "Changed Role On Screen Creation"
|
||||
CREATE_ROLE_UPDATED: "Changed Role On Screen Creation",
|
||||
},
|
||||
AUTOMATION: {
|
||||
CREATED: "Automation Created",
|
||||
|
|
Loading…
Reference in a new issue