1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

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);
This commit is contained in:
Nuno Góis 2023-08-10 12:55:02 +01:00 committed by GitHub
parent 0a233ba519
commit 22273d79e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -122,6 +122,10 @@ describe('imports', () => {
) )
.invoke('attr', 'aria-label') .invoke('attr', 'aria-label')
.should('eq', 'development'); .should('eq', 'development');
cy.get(
'[data-testid="FEATURE_ENVIRONMENT_ACCORDION_development"]'
).click();
cy.contains('50%'); cy.contains('50%');
}); });
}); });

View File

@ -118,7 +118,9 @@ describe('project-access', () => {
).as('editAccess'); ).as('editAccess');
cy.get(`[data-testid='${PA_ROLE_ID}']`).click(); 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.get(`[data-testid='${PA_ASSIGN_CREATE_ID}']`).click();
cy.wait('@editAccess'); cy.wait('@editAccess');