diff --git a/playwright.config.ts b/playwright.config.ts index c283fb5..5d0da08 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -12,6 +12,9 @@ import { defineConfig, devices } from '@playwright/test'; // Read-only specs safe to run in every browser/viewport after chain state exists. const CROSS_BROWSER_SPECS = '0[367]-*.spec.ts'; +// Chromium-specific launch flags (not valid for Firefox/WebKit). +const CHROMIUM_ARGS = ['--disable-dev-shm-usage', '--no-sandbox']; + export default defineConfig({ testDir: './tests/e2e', testMatch: process.env.CI ? '[0-9]*.spec.ts' : '**/*.spec.ts', @@ -25,9 +28,6 @@ export default defineConfig({ use: { headless: true, actionTimeout: 0, - launchOptions: { - args: ['--disable-dev-shm-usage', '--no-sandbox'], - }, }, projects: [ /* ── Desktop browsers ─────────────────────────────────── */ @@ -37,6 +37,7 @@ export default defineConfig({ ...devices['Desktop Chrome'], viewport: { width: 1280, height: 720 }, screen: { width: 1280, height: 720 }, + launchOptions: { args: CHROMIUM_ARGS }, }, }, { @@ -73,6 +74,7 @@ export default defineConfig({ name: 'android', use: { ...devices['Pixel 7'], + launchOptions: { args: CHROMIUM_ARGS }, }, dependencies: ['chromium'], testMatch: CROSS_BROWSER_SPECS, diff --git a/tests/e2e/07-landing-pages.spec.ts b/tests/e2e/07-landing-pages.spec.ts index 4764526..2e3e5d8 100644 --- a/tests/e2e/07-landing-pages.spec.ts +++ b/tests/e2e/07-landing-pages.spec.ts @@ -21,8 +21,8 @@ test.describe('Landing Pages', () => { // Page should contain recognisable KRAIKEN branding const body = await page.textContent('body'); expect(body).toBeTruthy(); - // Landing page always has a call-to-action button - const cta = page.getByRole('link', { name: /app|stake|launch|get started/i }).first(); + // Landing page always has a call-to-action link ("Get $KRK", "Get Your Edge", etc.) + const cta = page.getByRole('link', { name: /get.*krk|get.*edge|stake|launch/i }).first(); await expect(cta).toBeVisible({ timeout: 15_000 }); await page.screenshot({ path: 'test-results/landing-homepage.png', fullPage: true });