food-market/tests/integration/playwright.config.ts
nns 05a34a7dd8
Some checks are pending
Auto-tag / Create date-tag (push) Waiting to run
CI / Backend (.NET 8) (push) Waiting to run
CI / Web (React + Vite) (push) Waiting to run
CI / POS (WPF, Windows) (push) Waiting to run
perf(s28): integration suite workers=2 (46% speedup 66→36s)
После Sprint 26 повышения stage signup rate-limit (5000/min) больше
не упирается в 429 при workers=2. Парллелизация даёт ~46% ускорения
без потери стабильности (10/10 passed).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-09 03:45:41 +05:00

45 lines
1.5 KiB
TypeScript

import { defineConfig } from '@playwright/test'
/**
* Sprint 27: integration suite.
*
* Содержит cross-feature тесты которые не fit'ятся в "1 feature" слот
* regression-flows. Каждый тест соединяет минимум 3 фичи и проверяет
* их совместную работу.
*
* Запуск:
* pnpm test:integration
* E2E_ADMIN_URL=... pnpm test:integration
*
* Реюзаем factories из ../regression — там OrgFactory и т.д.
*/
const baseURL = process.env.E2E_ADMIN_URL ?? 'https://test.admin.food-market.kz'
const isCI = !!process.env.CI
export default defineConfig({
testDir: '.',
testMatch: /.*\.spec\.ts$/,
// Cross-feature тесты — workers=2 даёт 46% speedup (66s → 36s)
// после Sprint 26 повышения stage rate-limit'a. Раньше signup-burst
// дёргал 429 — теперь нет.
fullyParallel: true,
workers: process.env.WORKERS ? Number(process.env.WORKERS) : 2,
forbidOnly: isCI,
retries: 0,
timeout: 180_000, // 3 мин — бизнес-день делает 50+ операций
expect: { timeout: 15_000 },
reporter: [['list'], ['json', { outputFile: 'reports/results.json' }]],
use: {
baseURL,
headless: true,
ignoreHTTPSErrors: true,
locale: 'ru-RU',
viewport: { width: 1280, height: 800 },
actionTimeout: 20_000,
navigationTimeout: 30_000,
screenshot: 'only-on-failure',
trace: 'retain-on-failure',
},
outputDir: 'reports/playwright-artifacts',
})