Files
clean-architecture-frontend…/playwright.storybook.config.ts
DongHyeonka 6160e51edb
frontend-quality-gates / merge / browser tests (r1, w2) (pull_request) Successful in 5m38s
frontend-quality-gates / merge / browser tests (r1, w3) (pull_request) Successful in 4m44s
frontend-quality-gates / merge / browser tests (r1, w4) (pull_request) Successful in 4m33s
frontend-quality-gates / merge / browser tests (r1, w6) (pull_request) Successful in 4m38s
frontend-quality-gates / merge / browser tests (r2, w2) (pull_request) Successful in 5m36s
frontend-quality-gates / merge / browser tests (r2, w3) (pull_request) Successful in 4m44s
frontend-quality-gates / merge / browser tests (r2, w4) (pull_request) Successful in 4m33s
frontend-quality-gates / merge / browser tests (r2, w6) (pull_request) Successful in 4m39s
frontend-quality-gates / merge / browser tests (r3, w2) (pull_request) Successful in 5m37s
frontend-quality-gates / merge / browser tests (r3, w3) (pull_request) Successful in 4m47s
frontend-quality-gates / merge / browser tests (r3, w4) (pull_request) Successful in 4m33s
frontend-quality-gates / merge / browser tests (r3, w6) (pull_request) Successful in 4m37s
ci(playwright): CI-FE-0002 러너 workers 측정용 임시 매트릭스를 구성한다
2026-12-04 09:42:37 +09:00

61 lines
1.9 KiB
TypeScript

import { defineConfig, devices } from "@playwright/test";
import { flakyJudgement, flakyJudgementReporter } from "./scripts/lib/playwright-flaky-judgement.ts";
import {
reservePort,
TEST_PORT_VARIABLES,
testRunPath,
} from "./scripts/lib/run-isolation.ts";
import { storybookStaticServer } from "./scripts/lib/storybook-static.ts";
import { childProcessTimeout } from "./tests/helpers/child-process-timeout.ts";
// 1105/12-04. Under TEST_RUN_ID the workshop build (storybookStaticServer),
// the results and the report are the run's own. The static server listens on
// a free port (TEST_STORYBOOK_PORT pins one).
const port = await reservePort(TEST_PORT_VARIABLES.storybook);
const origin = `http://127.0.0.1:${port}`;
const benchWorkers = process.env["CI_PLAYWRIGHT_WORKERS"]
? Number.parseInt(process.env["CI_PLAYWRIGHT_WORKERS"], 10)
: undefined;
export default defineConfig({
testDir: "./tests/storybook",
...(benchWorkers ? { workers: benchWorkers } : {}),
forbidOnly: true,
...flakyJudgement(),
outputDir: testRunPath("artifacts/tests/storybook/results"),
reporter: [
["list"],
flakyJudgementReporter,
[
"html",
{
outputFolder: testRunPath("artifacts/tests/storybook/report"),
open: "never",
},
],
[
"junit",
{ outputFile: testRunPath("artifacts/tests/storybook/results.xml"), includeRetries: true },
],
],
use: {
baseURL: origin,
trace: "retain-on-failure",
screenshot: "only-on-failure",
},
webServer: {
// REV-FE-0015. The command builds the workshop first: longest start
// 8,887 ms on desktop (2026-11-23, 2 runs), sized like a child process of
// a test (tests/helpers/child-process-timeout.ts).
timeout: childProcessTimeout(8_887),
command: storybookStaticServer(port).command,
url: origin,
reuseExistingServer: false,
},
projects: [
{ name: "chromium-workshop", use: { ...devices["Desktop Chrome"] } },
],
});