fix(e2e): use specific regex for overview heading
The /intel.gpu/i regex was too broad and could match multiple headings on the overview page, causing strict mode violations in Playwright. Use /Intel GPU — Overview/i to match only the actual page heading, which contains 'Intel GPU' before 'Overview'. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -19,14 +19,14 @@ test.describe('Intel GPU plugin smoke tests', () => {
|
||||
|
||||
// Should navigate to the overview route
|
||||
await expect(page).toHaveURL(/\/intel-gpu$/);
|
||||
await expect(page.getByRole('heading', { name: /intel.gpu/i })).toBeVisible();
|
||||
await expect(page.getByRole('heading', { name: /Intel GPU — Overview/i })).toBeVisible();
|
||||
});
|
||||
|
||||
test('overview page renders GPU device list or empty state', async ({ page }) => {
|
||||
await page.goto('/c/main/intel-gpu');
|
||||
|
||||
// Overview heading should be present
|
||||
await expect(page.getByRole('heading', { name: /intel.gpu/i })).toBeVisible({
|
||||
await expect(page.getByRole('heading', { name: /Intel GPU — Overview/i })).toBeVisible({
|
||||
timeout: 15_000,
|
||||
});
|
||||
|
||||
@@ -61,7 +61,7 @@ test.describe('Intel GPU plugin smoke tests', () => {
|
||||
// not after clicking the parent entry from the overview. Test route
|
||||
// accessibility via direct navigation — each route must render its heading.
|
||||
await page.goto('/c/main/intel-gpu');
|
||||
await expect(page.getByRole('heading', { name: /intel.gpu/i })).toBeVisible({
|
||||
await expect(page.getByRole('heading', { name: /Intel GPU — Overview/i })).toBeVisible({
|
||||
timeout: 15_000,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user