Harden E2E selectors for Forge mode toggle and spread actions card.
Use scoped Simple button locator, containText for hostname in actions card, and card-scoped TRACE click to avoid strict-mode and encoding flakes.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
import { expect, test } from '@playwright/test';
|
||||
import { loginToDashboard } from './fixtures';
|
||||
|
||||
test.describe('Page smoke', () => {
|
||||
@@ -46,6 +46,6 @@ test.describe('Page smoke', () => {
|
||||
await page.getByRole('link', { name: /Forge/i }).click();
|
||||
await expect(page.getByRole('heading', { level: 1, name: 'Forge', exact: true })).toBeVisible({ timeout: 10_000 });
|
||||
await expect(page.getByRole('heading', { name: 'Quick Forge' })).toBeVisible();
|
||||
await expect(page.getByRole('button', { name: 'Simple', exact: true })).toBeVisible();
|
||||
await expect(page.locator('.forge-mode-toggle').getByRole('button', { name: 'Simple', exact: true }).first()).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user