Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
test: introduction element is highlighted (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
bugITwhisperer authored Oct 7, 2023
1 parent 0bde86c commit ac3fd2f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/docs/introduction.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,16 @@ test('Page Heading is correct', async ({ page }) => {
expect(await page.textContent('h1')).toBe('Introduction');
});

test.fixme('is the highlighted item in the left-menu is the correct one', async ({ page }) => {
test('Introduction element is highlighted', async ({ page }) => {
// navigate to the docs landing page /docs
await page.goto('/docs');

// check if the Introduction element in the left menu is highlighted
const introElement = page.getByRole('link', { name: 'Docs' });
const highlightedColor = await introElement.evaluate((element) =>
window.getComputedStyle(element).getPropertyValue('--primary-100'),
);
await expect(highlightedColor).toEqual('#ff5a00');
});

test.fixme(
Expand Down

0 comments on commit ac3fd2f

Please sign in to comment.