fix: move Chromium-specific launch args out of root use block, fix CTA text match
- launchOptions with --disable-dev-shm-usage and --no-sandbox are
Chromium-specific; passing them to Firefox/WebKit causes errors.
Move to chromium and android project use blocks only.
- Fix landing page CTA assertion to match actual button text
("Get $KRK", "Get Your Edge") instead of generic patterns.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f3a2a7100f
commit
c66b553692
2 changed files with 7 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue