ci(bstein-home): stabilize e2e preview startup
This commit is contained in:
parent
5d8d1bc465
commit
852ce6a2c0
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
@ -309,7 +309,8 @@ if [ "${npm_ci_rc}" -eq 0 ]; then
|
||||
npm run lint
|
||||
npm run test:unit
|
||||
npm run test:component
|
||||
npm run test:e2e
|
||||
npm run build
|
||||
PLAYWRIGHT_REUSE_DIST=1 npm run test:e2e
|
||||
frontend_rc=$?
|
||||
else
|
||||
echo "frontend dependency install failed after retries" >&2
|
||||
|
||||
@ -4,6 +4,8 @@ import { defineConfig } from "../../frontend/node_modules/@playwright/test/index
|
||||
|
||||
const testingDir = path.dirname(fileURLToPath(import.meta.url));
|
||||
const frontendRoot = path.resolve(testingDir, "../../frontend");
|
||||
const previewCommand = "npm run preview -- --host 127.0.0.1 --port 4173 --strictPort";
|
||||
const webServerCommand = process.env.PLAYWRIGHT_REUSE_DIST === "1" ? previewCommand : `npm run build && ${previewCommand}`;
|
||||
|
||||
export default defineConfig({
|
||||
testDir: path.resolve(testingDir, "e2e"),
|
||||
@ -18,11 +20,11 @@ export default defineConfig({
|
||||
viewport: { width: 1440, height: 1080 },
|
||||
},
|
||||
webServer: {
|
||||
command: "npm run build && npm run preview -- --host 127.0.0.1 --port 4173",
|
||||
command: webServerCommand,
|
||||
cwd: frontendRoot,
|
||||
url: "http://127.0.0.1:4173",
|
||||
reuseExistingServer: !process.env.CI,
|
||||
timeout: 120000,
|
||||
timeout: process.env.CI ? 420000 : 120000,
|
||||
},
|
||||
reporter: [["list"], ["junit", { outputFile: path.resolve(testingDir, "../../build/junit-frontend-e2e.xml") }]],
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user