budibase/packages/builder/cypress/integration/createScreen.js

40 lines
1.1 KiB
JavaScript
Raw Normal View History

import filterTests from "../support/filterTests"
2022-01-21 14:12:16 +01:00
filterTests(["smoke", "all"], () => {
context("Screen Tests", () => {
before(() => {
cy.login()
cy.createTestApp()
cy.navigateToFrontend()
})
it("Should successfully create a screen", () => {
cy.createScreen("Test Screen", "/test")
cy.get(".nav-items-container").within(() => {
cy.contains("/test").should("exist")
})
})
it("Should update the url", () => {
cy.createScreen("Test Screen", "test with spaces")
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", () => {
cy.createScreen("Test Screen Admin", "admin only", "Admin")
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
cy.createScreen("Test Screen Public", "open to all", "Public")
cy.get(".nav-items-container").within(() => {
cy.contains("/open-to-all").should("exist")
})
2022-04-07 13:22:16 +02:00
})
2022-01-21 14:12:16 +01:00
})
})