Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 41 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"flexsearch": "^0.8.212",
"marked": "^4.3.0",
"mdsvex": "^0.12.7",
"shiki": "^4.1.0",
"shiki": "^4.2.0",
"tailwindcss": "^4.2.2"
},
"type": "module",
Expand Down
19 changes: 16 additions & 3 deletions playwright.bazel.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ type TraceMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry';
const chromiumExecutable =
process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH || process.env.GF_RBE_CHROMIUM_EXECUTABLE || process.env.CHROME_BIN;
const traceMode = parseTraceMode(process.env.PLAYWRIGHT_TRACE_MODE);
const e2ePort = parsePort(process.env.PLAYWRIGHT_E2E_PORT);

if (!chromiumExecutable) {
throw new Error(
Expand All @@ -21,7 +22,7 @@ export default defineConfig({
workers: 1,
reporter: process.env.GITHUB_ACTIONS ? 'github' : 'line',
use: {
baseURL: 'http://127.0.0.1:3000',
baseURL: `http://127.0.0.1:${e2ePort}`,
trace: traceMode,
},
projects: [
Expand All @@ -42,8 +43,8 @@ export default defineConfig({
},
],
webServer: {
command: 'node scripts/serve-static-build.mjs build 3000',
port: 3000,
command: `node scripts/serve-static-build.mjs build ${e2ePort}`,
port: e2ePort,
reuseExistingServer: false,
timeout: 300_000,
},
Expand All @@ -55,3 +56,15 @@ function parseTraceMode(value: string | undefined): TraceMode {
}
return 'off';
}

function parsePort(value: string | undefined): number {
if (!value) {
return 3000;
}

const port = Number(value);
if (!Number.isInteger(port) || port < 1 || port > 65535) {
throw new Error(`Invalid PLAYWRIGHT_E2E_PORT: ${value}`);
}
return port;
}
Loading
Loading