From a2bda8fd361603748b32c1de883516b160bb68fd Mon Sep 17 00:00:00 2001 From: 4gray Date: Sun, 24 May 2026 15:35:28 +0300 Subject: [PATCH] test(pwa): guard static stylesheet regression spec --- apps/web-e2e/src/pwa-styles.e2e.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/web-e2e/src/pwa-styles.e2e.ts b/apps/web-e2e/src/pwa-styles.e2e.ts index 7a92f304d..3d91ec4c5 100644 --- a/apps/web-e2e/src/pwa-styles.e2e.ts +++ b/apps/web-e2e/src/pwa-styles.e2e.ts @@ -1,5 +1,11 @@ import { expect, test } from '@playwright/test'; +// eslint-disable-next-line playwright/no-skipped-test -- Static PWA assertions require the built service worker artifact. +test.skip( + process.env['IPTVNATOR_E2E_STATIC_PWA'] !== '1', + 'Static PWA stylesheet regression test only runs against the built PWA output.' +); + test('@pwa-static PWA build applies the full stylesheet under CSP', async ({ page, }) => { @@ -28,7 +34,7 @@ test('@pwa-static PWA build applies the full stylesheet under CSP', async ({ ); const appStylesheet = stylesheetMedia.find((link) => - /^styles-.*\.css$/.test(link.href ?? '') + /(?:^|\/)styles-.*\.css$/.test(link.href ?? '') ); expect(appStylesheet).toBeDefined(); expect(appStylesheet?.media).not.toBe('print');