test: fix Playwright smoke test for multiple matching buttons

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-16 18:34:25 +00:00
parent f9d712a943
commit 51201571e6

View File

@@ -28,8 +28,15 @@ test.describe('Basic Smoke Tests', () => {
// Check if the page has loaded
await page.waitForLoadState('domcontentloaded');
// Check if navigation buttons are present (more reliable than text search)
await expect(page.getByRole('button', { name: /sign in|get started/i })).toBeVisible();
// Check if navigation buttons are present - check for at least one
const signInButton = page.getByRole('button', { name: /sign in/i });
const getStartedButton = page.getByRole('button', { name: /get started/i });
// At least one of these buttons should be visible
const signInVisible = await signInButton.isVisible().catch(() => false);
const getStartedVisible = await getStartedButton.isVisible().catch(() => false);
expect(signInVisible || getStartedVisible).toBeTruthy();
});
test('should not have critical console errors on load', async ({ page }) => {