From 51201571e6f656de111da03e6afab77e2c80af27 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 18:34:25 +0000 Subject: [PATCH] test: fix Playwright smoke test for multiple matching buttons Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com> --- e2e/smoke.spec.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/e2e/smoke.spec.ts b/e2e/smoke.spec.ts index 71c7fef14..42e8f300a 100644 --- a/e2e/smoke.spec.ts +++ b/e2e/smoke.spec.ts @@ -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 }) => {