feat(FN-4572): add viewport zoom regression assertions to PWA test

Adds viewport zoom regression assertions to the PWA test suite, covering the behavior fixed in FN-4572.

Fusion-Task-Id: FN-4572
This commit is contained in:
Fusion
2026-05-15 00:58:02 -07:00
committed by gsxdsm
parent 38267f479f
commit d84744d241

View File

@@ -54,6 +54,16 @@ describe("PWA configuration", () => {
expect(indexHtml).toMatch(/<meta\s+name="viewport"[^>]*content="[^"]*viewport-fit=cover[^"]*"/i);
});
it("viewport meta disables pinch-zoom on mobile", () => {
const indexHtml = readFileSync(resolve(__dirname, "../index.html"), "utf8");
expect(indexHtml).toMatch(/<meta\s+name="viewport"[^>]*content="[^"]*width=device-width[^"]*"/i);
expect(indexHtml).toMatch(/<meta\s+name="viewport"[^>]*content="[^"]*initial-scale=1\.0[^"]*"/i);
expect(indexHtml).toMatch(/<meta\s+name="viewport"[^>]*content="[^"]*maximum-scale=1\.0[^"]*"/i);
expect(indexHtml).toMatch(/<meta\s+name="viewport"[^>]*content="[^"]*user-scalable=no[^"]*"/i);
expect(indexHtml).toMatch(/<meta\s+name="viewport"[^>]*content="[^"]*viewport-fit=cover[^"]*"/i);
});
it("CSS includes display-mode: standalone rule with a :root token override only", () => {
const cssContent = loadAllAppCss();
const standaloneBlock = getStandaloneDisplayModeBlock(cssContent);