From 22273d79e3ab24c0882e2de33d375dedfcbac726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Thu, 10 Aug 2023 12:55:02 +0100 Subject: [PATCH] test: fix import and access e2e tests due to recent changes (#4467) This should fix `import` and `access` Cypress e2e tests after recent changes were introduced: - `import.spec.ts` - Expected '50%' to be contained in the page, however now [we are lazy loading the accordion content](https://github.com/Unleash/unleash/pull/4454); - `access.spec.ts` - Expected 'within a project are allowed' to be visible as a role description, however [we updated the predefined roles descriptions](https://github.com/Unleash/unleash/pull/4451); --- frontend/cypress/integration/import/import.spec.ts | 4 ++++ frontend/cypress/integration/projects/access.spec.ts | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/cypress/integration/import/import.spec.ts b/frontend/cypress/integration/import/import.spec.ts index 3b90440eaf..f934c925bb 100644 --- a/frontend/cypress/integration/import/import.spec.ts +++ b/frontend/cypress/integration/import/import.spec.ts @@ -122,6 +122,10 @@ describe('imports', () => { ) .invoke('attr', 'aria-label') .should('eq', 'development'); + + cy.get( + '[data-testid="FEATURE_ENVIRONMENT_ACCORDION_development"]' + ).click(); cy.contains('50%'); }); }); diff --git a/frontend/cypress/integration/projects/access.spec.ts b/frontend/cypress/integration/projects/access.spec.ts index 2cd6c7f1cd..c2d48bea32 100644 --- a/frontend/cypress/integration/projects/access.spec.ts +++ b/frontend/cypress/integration/projects/access.spec.ts @@ -118,7 +118,9 @@ describe('project-access', () => { ).as('editAccess'); cy.get(`[data-testid='${PA_ROLE_ID}']`).click(); - cy.contains('within a project are allowed').click({ force: true }); + cy.contains('update feature toggles within a project').click({ + force: true, + }); cy.get(`[data-testid='${PA_ASSIGN_CREATE_ID}']`).click(); cy.wait('@editAccess');