| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
ci(preview): smoke-test each deployed PR preview for a clean console (#2922) * ci(preview): smoke-test each deployed PR preview for a clean console Previews deploy to Cloudflare under /demo/, but nothing loaded the deployed app, and no spec failed on console errors. That is how #2916 (deployment.json 404) and #2919 (base-path fetches from the site root) reached web.geolibre.app and every preview unnoticed. - e2e/preview/: a config and spec that load PREVIEW_URL, wait for the MapLibre map to report loaded(), and fail on any console.error, page error, or same-origin 4xx/5xx. - pr-preview-deploy.yml: a smoke job runs it against the Cloudflare deployment from a default-branch checkout with a read-only token, and a smoke-status job posts the result as a commit status on the PR head, since workflow_run jobs do not appear in a PR's checks. - smoke.spec.ts (core): the same clean-console check against the local build on every PR (~3 s). - collectPageProblems and waitForMapLoaded shared in e2e/helpers.ts. * Address review feedback - collectPageProblems: always count the page's own document response. It can arrive before the frame commits its URL, so the same-origin check against page.url() dropped a 404'd app (Claude review). - preview config: collapse repeated slashes in PREVIEW_URL, so a deployment URL with a trailing slash plus "/demo/" still loads the app's directory (Claude review, CodeRabbit). - preview spec: attach and log the collected problems even when an earlier assertion fails first, so a 404'd app reports its status. - pr-preview-deploy.yml: document why smoke-status needs statuses: write (CodeRabbit / zizmor). | 2 天前 | |
test(e2e): unload map pages before disposing each test's context (#2879) (#2937) * test(e2e): unload map pages before disposing each test's context Disposing a browser context kills its renderer outright. With a live SwiftShader WebGL map still in it, that wedges the browser process, and the next test in the worker pays: its browser.newContext() took 3 s to over 60 s, charged to its own timeout. That is the "Test timeout ... while setting up context" first-attempt failure, and it also leaves the next spec too little time to finish (#2879). A shared fixture in e2e/test.ts now navigates a passing test's pages to about:blank before the context is disposed, so the page unloads in order and the next context opens in milliseconds. Every spec imports test from there, and a frontend test keeps it that way. Refs #2879 * Address review feedback - The import guard now rejects any value import from @playwright/test (named, aliased such as `test as base`, or namespace); type-only imports still pass. e2e/test.ts re-exports the whole package, so a spec never needs one (CodeRabbit, Claude). - It scans e2e/ recursively, and the enterprise-sso and preview specs now import from ../test too (Claude). * Address review feedback - Say in the guard's comment that only an `import type` declaration passes and an inline `import { type X }` is rejected, matching what the regex does (Claude, CodeRabbit). | 2 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 天前 | ||
| 2 天前 |