-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: hide link to non existent about route (#3588)
fix: hide link to non existent about route Only show link if about page exists and info in page is describes catalogue Closes #3555
- Loading branch information
1 parent
78d453b
commit 602dcd0
Showing
2 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('should not show about menu item on non catalogue spesific page', async ({ page }) => { | ||
await page.goto('/catalogue-demo/ssr-catalogue/all'); | ||
await page.getByRole('button', { name: 'Accept' }).click(); | ||
await expect(page.getByRole('link', { name: 'About' })).toHaveCount(0); | ||
}); | ||
|
||
test('should show about menu item on catalogue spesific page', async ({ page }) => { | ||
await page.goto('/catalogue-demo/ssr-catalogue/IPEC'); | ||
await page.getByRole('button', { name: 'Accept' }).click(); | ||
await expect(page.getByRole('link', { name: 'About' })).toHaveCount(1); | ||
}); |