Skip to content

Commit

Permalink
fix(1-3374): access e2e test (#9313)
Browse files Browse the repository at this point in the history
Fix e2e test, failing because of subtle table syntax change. Nested `span`s are counted twice in Cypress `:contains`
  • Loading branch information
Tymek authored Feb 14, 2025
1 parent 4a72580 commit 8dc6fbf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/cypress/integration/projects/access.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ describe('project-access', () => {

cy.get(`[data-testid='${PA_ASSIGN_CREATE_ID}']`).click();
cy.wait('@editAccess');
cy.get("td span:contains('Owner')").should('have.length', 2);
cy.get("td span:contains('Member')").should('have.length', 1);
cy.get("td a span:contains('Owner')").should('have.length', 2);
cy.get("td a span:contains('Member')").should('have.length', 1);
});

it('can edit role to multiple roles', () => {
Expand All @@ -145,8 +145,8 @@ describe('project-access', () => {

cy.get(`[data-testid='${PA_ASSIGN_CREATE_ID}']`).click();
cy.wait('@editAccess');
cy.get("td span:contains('Owner')").should('have.length', 2);
cy.get("td span:contains('2 roles')").should('have.length', 1);
cy.get("td a span:contains('Owner')").should('have.length', 2);
cy.get("td a span:contains('2 roles')").should('have.length', 1);
});

it('can remove access', () => {
Expand Down

0 comments on commit 8dc6fbf

Please sign in to comment.