From 3a563fe922b62a27de7560f553dfe6daab652c4d Mon Sep 17 00:00:00 2001 From: Dean Date: Fri, 8 Apr 2022 10:29:19 +0100 Subject: [PATCH] Minor updates for cypress tests. Check that access filtering is reflected --- packages/builder/cypress/integration/autoScreensUI.spec.js | 5 +++++ packages/builder/cypress/integration/createScreen.js | 2 ++ 2 files changed, 7 insertions(+) diff --git a/packages/builder/cypress/integration/autoScreensUI.spec.js b/packages/builder/cypress/integration/autoScreensUI.spec.js index c3fbf2bd7d..79c38600f8 100644 --- a/packages/builder/cypress/integration/autoScreensUI.spec.js +++ b/packages/builder/cypress/integration/autoScreensUI.spec.js @@ -80,6 +80,11 @@ filterTests(['smoke', 'all'], () => { cy.get(".nav-item").contains("/table-four").click() cy.get(".nav-item").should('contain', 'table-four/:id') .and('contain', 'table-four/new/row') + + //The access level should now be set to admin. Previous screens should be filtered. + cy.get(".nav-item").contains("/table-two").should('not.exist') + cy.get(".nav-item").contains("/cypress-tests").should('not.exist') + }) }) diff --git a/packages/builder/cypress/integration/createScreen.js b/packages/builder/cypress/integration/createScreen.js index 450b360145..6147d519ba 100644 --- a/packages/builder/cypress/integration/createScreen.js +++ b/packages/builder/cypress/integration/createScreen.js @@ -33,6 +33,8 @@ filterTests(["smoke", "all"], () => { cy.get(".nav-items-container").within(() => { cy.contains("/open-to-all").should("exist") + //The access level should now be set to admin. Previous screens should be filtered. + cy.get(".nav-item").contains("/test-screen").should('not.exist') }) }) })