2022-01-21 13:43:27 +01:00
|
|
|
import filterTests from "../support/filterTests"
|
2021-03-05 15:36:38 +01:00
|
|
|
|
2022-01-21 14:12:16 +01:00
|
|
|
filterTests(["smoke", "all"], () => {
|
2022-02-17 15:06:17 +01:00
|
|
|
context("Screen Tests", () => {
|
2022-01-21 13:43:27 +01:00
|
|
|
before(() => {
|
|
|
|
cy.login()
|
|
|
|
cy.createTestApp()
|
|
|
|
cy.navigateToFrontend()
|
2021-07-28 09:09:37 +02:00
|
|
|
})
|
|
|
|
|
2022-01-21 13:43:27 +01:00
|
|
|
it("Should successfully create a screen", () => {
|
2022-04-22 15:57:13 +02:00
|
|
|
cy.createScreen("/test")
|
2022-01-21 13:43:27 +01:00
|
|
|
cy.get(".nav-items-container").within(() => {
|
|
|
|
cy.contains("/test").should("exist")
|
|
|
|
})
|
2021-07-28 09:09:37 +02:00
|
|
|
})
|
2022-01-21 13:43:27 +01:00
|
|
|
|
|
|
|
it("Should update the url", () => {
|
2022-04-22 15:57:13 +02:00
|
|
|
cy.createScreen("test with spaces")
|
2022-01-21 13:43:27 +01:00
|
|
|
cy.get(".nav-items-container").within(() => {
|
|
|
|
cy.contains("/test-with-spaces").should("exist")
|
|
|
|
})
|
|
|
|
})
|
2022-04-07 13:22:16 +02:00
|
|
|
|
2022-04-08 10:56:20 +02:00
|
|
|
it("Should create a blank screen with the selected access level", () => {
|
2022-04-22 15:57:13 +02:00
|
|
|
cy.createScreen("admin only", "Admin")
|
2022-04-08 10:56:20 +02:00
|
|
|
|
2022-04-07 13:22:16 +02:00
|
|
|
cy.get(".nav-items-container").within(() => {
|
|
|
|
cy.contains("/admin-only").should("exist")
|
|
|
|
})
|
2022-04-08 10:56:20 +02:00
|
|
|
|
2022-04-22 15:57:13 +02:00
|
|
|
cy.createScreen("open to all", "Public")
|
2022-04-08 10:56:20 +02:00
|
|
|
|
|
|
|
cy.get(".nav-items-container").within(() => {
|
|
|
|
cy.contains("/open-to-all").should("exist")
|
2022-04-08 11:29:19 +02:00
|
|
|
//The access level should now be set to admin. Previous screens should be filtered.
|
2022-04-08 11:31:04 +02:00
|
|
|
cy.get(".nav-item").contains("/test-screen").should("not.exist")
|
2022-04-08 10:56:20 +02:00
|
|
|
})
|
2022-04-07 13:22:16 +02:00
|
|
|
})
|
2022-04-22 15:57:13 +02:00
|
|
|
|
|
|
|
it("Should create a set of datasource screens with the selected access level", () => {
|
|
|
|
|
|
|
|
cy.createDatasourceScreen("Cypress Tests", "Public")
|
|
|
|
|
|
|
|
})
|
2022-01-21 14:12:16 +01:00
|
|
|
})
|
2021-03-05 15:36:38 +01:00
|
|
|
})
|