Skip to content

Commit 28e50bb

Browse files
committed
✅(e2e) fix e2e test to expect aria-current instead of aria-selected
aria-current is correct for nav links; test was misaligned with a11y best practices Signed-off-by: Cyril <c.gromoff@gmail.com>
1 parent 676b757 commit 28e50bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/frontend/apps/e2e/__tests__/app-impress/doc-grid.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,18 +227,18 @@ test.describe('Documents filters', () => {
227227

228228
// Initial state
229229
await expect(allDocs).toBeVisible();
230-
await expect(allDocs).toHaveAttribute('aria-selected', 'true');
230+
await expect(allDocs).toHaveAttribute('aria-current', 'page');
231231

232232
await expect(myDocs).toBeVisible();
233233
await expect(myDocs).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)');
234-
await expect(myDocs).toHaveAttribute('aria-selected', 'false');
234+
await expect(myDocs).not.toHaveAttribute('aria-current');
235235

236236
await expect(sharedWithMe).toBeVisible();
237237
await expect(sharedWithMe).toHaveCSS(
238238
'background-color',
239239
'rgba(0, 0, 0, 0)',
240240
);
241-
await expect(sharedWithMe).toHaveAttribute('aria-selected', 'false');
241+
await expect(sharedWithMe).not.toHaveAttribute('aria-current');
242242

243243
await allDocs.click();
244244

0 commit comments

Comments
 (0)