Skip to content

Commit

Permalink
Fixed item-edit.cy.ts regularly failing because of aria-required-chil…
Browse files Browse the repository at this point in the history
…dren for role="row" & added missing roles to edit comcol tabs
  • Loading branch information
alexandrevryghem committed May 15, 2024
1 parent c2684d3 commit 77d0f9c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions cypress/e2e/item-edit.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ describe('Edit Item > Edit Metadata tab', () => {
// <ds-edit-item-page> tag must be loaded
cy.get('ds-edit-item-page').should('be.visible');

// wait for all the ds-dso-edit-metadata-value components to be rendered
cy.get('ds-dso-edit-metadata-value div[role="row"]').each(($row: HTMLDivElement) => {
cy.wrap($row).find('div[role="cell"]').should('be.visible');
});

// Analyze <ds-edit-item-page> for accessibility issues
testA11y('ds-edit-item-page');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ <h1>{{ type + '.edit.head' | translate }}</h1>
</div>
</div>
<div class="pt-2">
<ul class="nav nav-tabs justify-content-start mb-2">
<li *ngFor="let page of pages" class="nav-item">
<a class="nav-link"
<ul class="nav nav-tabs justify-content-start mb-2" role="tablist">
<li *ngFor="let page of pages" class="nav-item" role="presentation">
<a class="nav-link" role="tab"
[attr.aria-selected]="page === currentPage"
[ngClass]="{'active' : page === currentPage}"
[routerLink]="['./' + page]"
[attr.data-test]="page">
Expand Down

0 comments on commit 77d0f9c

Please sign in to comment.