Skip to content

Commit 4878dce

Browse files
Cristopher Bengeclaude
authored andcommitted
fix(e2e): update test for ExternalLink aria-label pattern
ExternalLink component uses aria-label instead of sr-only spans. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 280e4cd commit 4878dce

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

e2e/about.spec.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,17 @@ test.describe('About Page', () => {
180180
}) => {
181181
await page.goto('/about');
182182

183-
const srOnlyText = page.locator('.education-card .sr-only');
184-
const count = await srOnlyText.count();
183+
// ExternalLink component uses aria-label instead of sr-only spans
184+
const externalLinks = page.locator(
185+
'.education-card a[aria-label*="opens in new tab"]',
186+
);
187+
const count = await externalLinks.count();
185188
expect(count).toBeGreaterThanOrEqual(3);
186189

187-
const firstSrText = await srOnlyText.first().textContent();
188-
expect(firstSrText).toContain('opens in new tab');
190+
const firstAriaLabel = await externalLinks
191+
.first()
192+
.getAttribute('aria-label');
193+
expect(firstAriaLabel).toContain('opens in new tab');
189194
});
190195
});
191196

0 commit comments

Comments
 (0)