mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
test(pwa): guard static stylesheet regression spec
This commit is contained in:
1 parent
bb4e386c6c
commit
a2bda8fd36
1 file changed
+7
-1
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user