fix: feat: E2E quality gate — mobile viewports + cross-browser matrix (#1099)
Add Playwright projects for Chromium, Firefox, WebKit, iPhone 14, and
Pixel 7 viewports. Chromium runs all specs (01-07); other projects run
read-only specs (03, 06, 07) after Chromium finishes, using project
dependencies to ensure chain state exists.
Coverage audit:
- Tests 01/02 already cover /app/get-krk, /app/cheats as part of flows
- Test 03 verifies GraphQL endpoints
- Test 06 covers wallet + position dashboards
- New test 07 adds landing page and docs smoke coverage
Changes:
- playwright.config.ts: 5 projects (3 desktop browsers + 2 mobile)
- wallet-provider.ts: accept optional viewport/screen for mobile contexts
- 03, 06 specs: pass project viewport to wallet context
- 07-landing-pages.spec.ts: new spec for landing homepage + docs
- e2e.yml: timeout 600→900s for cross-browser matrix, updated comments
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 10:55:01 +00:00
|
|
|
|
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Cross-browser + mobile viewport matrix for E2E quality gate.
|
|
|
|
|
|
*
|
|
|
|
|
|
* - `chromium` runs ALL numbered specs (01-07) including transactional tests
|
|
|
|
|
|
* that mutate on-chain state.
|
|
|
|
|
|
* - Other projects depend on `chromium` finishing first (chain state must exist)
|
|
|
|
|
|
* and only run read-only / UI-rendering specs (03, 06, 07).
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
2026-03-23 11:41:33 +00:00
|
|
|
|
// Lightweight read-only specs for cross-browser/viewport validation.
|
|
|
|
|
|
// Test 06 (dashboard pages) is excluded because each subtest creates a wallet
|
|
|
|
|
|
// context, making it too slow for 4× additional browser runs in CI.
|
|
|
|
|
|
const CROSS_BROWSER_SPECS = '0[37]-*.spec.ts';
|
2025-10-05 19:40:14 +02:00
|
|
|
|
|
2026-03-23 11:18:53 +00:00
|
|
|
|
// Chromium-specific launch flags (not valid for Firefox/WebKit).
|
|
|
|
|
|
const CHROMIUM_ARGS = ['--disable-dev-shm-usage', '--no-sandbox'];
|
|
|
|
|
|
|
2025-10-05 19:40:14 +02:00
|
|
|
|
export default defineConfig({
|
|
|
|
|
|
testDir: './tests/e2e',
|
2026-02-18 00:19:05 +01:00
|
|
|
|
testMatch: process.env.CI ? '[0-9]*.spec.ts' : '**/*.spec.ts',
|
2025-10-05 19:40:14 +02:00
|
|
|
|
fullyParallel: false,
|
fix: feat: E2E quality gate — mobile viewports + cross-browser matrix (#1099)
Add Playwright projects for Chromium, Firefox, WebKit, iPhone 14, and
Pixel 7 viewports. Chromium runs all specs (01-07); other projects run
read-only specs (03, 06, 07) after Chromium finishes, using project
dependencies to ensure chain state exists.
Coverage audit:
- Tests 01/02 already cover /app/get-krk, /app/cheats as part of flows
- Test 03 verifies GraphQL endpoints
- Test 06 covers wallet + position dashboards
- New test 07 adds landing page and docs smoke coverage
Changes:
- playwright.config.ts: 5 projects (3 desktop browsers + 2 mobile)
- wallet-provider.ts: accept optional viewport/screen for mobile contexts
- 03, 06 specs: pass project viewport to wallet context
- 07-landing-pages.spec.ts: new spec for landing homepage + docs
- e2e.yml: timeout 600→900s for cross-browser matrix, updated comments
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 10:55:01 +00:00
|
|
|
|
timeout: 10 * 60 * 1000,
|
2025-10-05 19:40:14 +02:00
|
|
|
|
expect: {
|
|
|
|
|
|
timeout: 30_000,
|
|
|
|
|
|
},
|
|
|
|
|
|
retries: process.env.CI ? 1 : 0,
|
2026-02-18 00:19:05 +01:00
|
|
|
|
workers: process.env.CI ? 1 : undefined,
|
2025-10-05 19:40:14 +02:00
|
|
|
|
use: {
|
|
|
|
|
|
headless: true,
|
|
|
|
|
|
actionTimeout: 0,
|
|
|
|
|
|
},
|
fix: feat: E2E quality gate — mobile viewports + cross-browser matrix (#1099)
Add Playwright projects for Chromium, Firefox, WebKit, iPhone 14, and
Pixel 7 viewports. Chromium runs all specs (01-07); other projects run
read-only specs (03, 06, 07) after Chromium finishes, using project
dependencies to ensure chain state exists.
Coverage audit:
- Tests 01/02 already cover /app/get-krk, /app/cheats as part of flows
- Test 03 verifies GraphQL endpoints
- Test 06 covers wallet + position dashboards
- New test 07 adds landing page and docs smoke coverage
Changes:
- playwright.config.ts: 5 projects (3 desktop browsers + 2 mobile)
- wallet-provider.ts: accept optional viewport/screen for mobile contexts
- 03, 06 specs: pass project viewport to wallet context
- 07-landing-pages.spec.ts: new spec for landing homepage + docs
- e2e.yml: timeout 600→900s for cross-browser matrix, updated comments
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 10:55:01 +00:00
|
|
|
|
projects: [
|
|
|
|
|
|
/* ── Desktop browsers ─────────────────────────────────── */
|
|
|
|
|
|
{
|
|
|
|
|
|
name: 'chromium',
|
|
|
|
|
|
use: {
|
|
|
|
|
|
...devices['Desktop Chrome'],
|
|
|
|
|
|
viewport: { width: 1280, height: 720 },
|
|
|
|
|
|
screen: { width: 1280, height: 720 },
|
2026-03-23 11:18:53 +00:00
|
|
|
|
launchOptions: { args: CHROMIUM_ARGS },
|
fix: feat: E2E quality gate — mobile viewports + cross-browser matrix (#1099)
Add Playwright projects for Chromium, Firefox, WebKit, iPhone 14, and
Pixel 7 viewports. Chromium runs all specs (01-07); other projects run
read-only specs (03, 06, 07) after Chromium finishes, using project
dependencies to ensure chain state exists.
Coverage audit:
- Tests 01/02 already cover /app/get-krk, /app/cheats as part of flows
- Test 03 verifies GraphQL endpoints
- Test 06 covers wallet + position dashboards
- New test 07 adds landing page and docs smoke coverage
Changes:
- playwright.config.ts: 5 projects (3 desktop browsers + 2 mobile)
- wallet-provider.ts: accept optional viewport/screen for mobile contexts
- 03, 06 specs: pass project viewport to wallet context
- 07-landing-pages.spec.ts: new spec for landing homepage + docs
- e2e.yml: timeout 600→900s for cross-browser matrix, updated comments
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 10:55:01 +00:00
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: 'firefox',
|
|
|
|
|
|
use: {
|
|
|
|
|
|
...devices['Desktop Firefox'],
|
|
|
|
|
|
viewport: { width: 1280, height: 720 },
|
|
|
|
|
|
screen: { width: 1280, height: 720 },
|
|
|
|
|
|
},
|
|
|
|
|
|
dependencies: ['chromium'],
|
|
|
|
|
|
testMatch: CROSS_BROWSER_SPECS,
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: 'webkit',
|
|
|
|
|
|
use: {
|
|
|
|
|
|
...devices['Desktop Safari'],
|
|
|
|
|
|
viewport: { width: 1280, height: 720 },
|
|
|
|
|
|
screen: { width: 1280, height: 720 },
|
|
|
|
|
|
},
|
|
|
|
|
|
dependencies: ['chromium'],
|
|
|
|
|
|
testMatch: CROSS_BROWSER_SPECS,
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/* ── Mobile viewports ─────────────────────────────────── */
|
|
|
|
|
|
{
|
|
|
|
|
|
name: 'iphone',
|
|
|
|
|
|
use: {
|
|
|
|
|
|
...devices['iPhone 14'],
|
|
|
|
|
|
},
|
|
|
|
|
|
dependencies: ['chromium'],
|
|
|
|
|
|
testMatch: CROSS_BROWSER_SPECS,
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: 'android',
|
|
|
|
|
|
use: {
|
|
|
|
|
|
...devices['Pixel 7'],
|
2026-03-23 11:18:53 +00:00
|
|
|
|
launchOptions: { args: CHROMIUM_ARGS },
|
fix: feat: E2E quality gate — mobile viewports + cross-browser matrix (#1099)
Add Playwright projects for Chromium, Firefox, WebKit, iPhone 14, and
Pixel 7 viewports. Chromium runs all specs (01-07); other projects run
read-only specs (03, 06, 07) after Chromium finishes, using project
dependencies to ensure chain state exists.
Coverage audit:
- Tests 01/02 already cover /app/get-krk, /app/cheats as part of flows
- Test 03 verifies GraphQL endpoints
- Test 06 covers wallet + position dashboards
- New test 07 adds landing page and docs smoke coverage
Changes:
- playwright.config.ts: 5 projects (3 desktop browsers + 2 mobile)
- wallet-provider.ts: accept optional viewport/screen for mobile contexts
- 03, 06 specs: pass project viewport to wallet context
- 07-landing-pages.spec.ts: new spec for landing homepage + docs
- e2e.yml: timeout 600→900s for cross-browser matrix, updated comments
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 10:55:01 +00:00
|
|
|
|
},
|
|
|
|
|
|
dependencies: ['chromium'],
|
|
|
|
|
|
testMatch: CROSS_BROWSER_SPECS,
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
2025-10-05 19:40:14 +02:00
|
|
|
|
});
|