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:
AetherForge
2026-06-07 07:06:19 -07:00
parent e3d7ecc33f
commit f9ce44b962
3 changed files with 5 additions and 9 deletions

View File

@@ -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();
});
});