Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions e2e/mobile-visual-regression.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { test, expect } from '@playwright/test';
import { waitForReactMount, CONSOLE_BASE } from './helpers';
import { existsSync } from 'fs';
import { join } from 'path';
import { dirname, join } from 'path';
import { fileURLToPath } from 'url';

/**
* P3 Mobile Visual Regression tests.
Expand All @@ -22,7 +23,7 @@ const MOBILE_VIEWPORTS = [
// Keep in sync with Console app route definitions (apps/console/src/routes).
const ROUTES = ['/', '/dashboard'];

const snapshotsDir = join(__dirname, 'mobile-visual-regression.spec.ts-snapshots');
const snapshotsDir = join(dirname(fileURLToPath(import.meta.url)), 'mobile-visual-regression.spec.ts-snapshots');
const hasBaselines = existsSync(snapshotsDir);

test.describe('Mobile Visual Regression', () => {
Expand Down