Skip to content

Commit b708635

Browse files
test: skip production-only tests
1 parent 3f2eb6f commit b708635

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

e2e/tests/privacy-preferences.spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,13 @@ test.describe('Privacy Preferences Page', () => {
169169
await acceptMeteredWarningIfPresent(page);
170170
await waitForDatabaseReady(page);
171171

172+
// Skip test if running on dev server (analytics disabled in development)
173+
const url = page.url()
174+
const isDev = url.includes(':5173')
175+
if (isDev) {
176+
test.skip(true, 'Analytics loading is disabled in development mode')
177+
}
178+
172179
// Verify Umami script is NOT loaded yet
173180
let hasUmamiScript = await page.evaluate(() => {
174181
const scripts = Array.from(document.querySelectorAll('script'));
@@ -364,6 +371,13 @@ test.describe('Privacy Banner - Dynamic Script Loading', () => {
364371
await acceptMeteredWarningIfPresent(page);
365372
await waitForDatabaseReady(page);
366373

374+
// Skip test if running on dev server (analytics disabled in development)
375+
const url = page.url()
376+
const isDev = url.includes(':5173')
377+
if (isDev) {
378+
test.skip(true, 'Analytics loading is disabled in development mode')
379+
}
380+
367381
// Banner should be visible
368382
const banner = page.locator('[data-testid="analytics-banner"]');
369383
await expect(banner).toBeVisible();

0 commit comments

Comments
 (0)