test(ui): assert relative manifest start_url in the PWA spec
Tests · UI / test (push) Successful in 2m28s
Tests · Integration / integration (pull_request) Successful in 1m46s
Build · Site / build (pull_request) Successful in 10s
Tests · Go / test (pull_request) Successful in 2m1s
Tests · UI / test (pull_request) Successful in 2m46s
Tests · UI / test (push) Successful in 2m28s
Tests · Integration / integration (pull_request) Successful in 1m46s
Build · Site / build (pull_request) Successful in 10s
Tests · Go / test (pull_request) Successful in 2m1s
Tests · UI / test (pull_request) Successful in 2m46s
The single-origin manifest now uses relative URLs (`start_url: "./"`) so it stays base-agnostic under `/` and `/game/`. Update the PWA spec to assert the relative value instead of the old absolute `/`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,10 @@ test.describe("PWA", () => {
|
||||
.get(href!)
|
||||
.then((r) => r.json());
|
||||
expect(manifest.name).toBe("Galaxy");
|
||||
expect(manifest.start_url).toBe("/");
|
||||
// Relative so the manifest is base-agnostic: served under the app
|
||||
// base (`/` at the root, `/game/` in the single-origin deploy) it
|
||||
// resolves to the app root either way.
|
||||
expect(manifest.start_url).toBe("./");
|
||||
expect(manifest.display).toBe("standalone");
|
||||
const sizes = (manifest.icons as { sizes: string }[]).map((i) => i.sizes);
|
||||
expect(sizes).toContain("192x192");
|
||||
|
||||
Reference in New Issue
Block a user