Skip to content

Commit

Permalink
E2E: Cross-platform support for Playwright E2E tests (#39765)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano authored Apr 16, 2022
1 parent 6fcd3c8 commit 7c35f5f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/e2e/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* External dependencies
*/
import path from 'path';
import { fileURLToPath } from 'url';
import { devices } from '@playwright/test';
import type { PlaywrightTestConfig } from '@playwright/test';

Expand All @@ -19,10 +20,11 @@ const config: PlaywrightTestConfig = {
timeout: parseInt( process.env.TIMEOUT || '', 10 ) || 100_000, // Defaults to 100 seconds.
// Don't report slow test "files", as we will be running our tests in serial.
reportSlowTests: null,
testDir: new URL( './specs', 'file:' + __filename ).pathname,
testDir: fileURLToPath( new URL( './specs', 'file:' + __filename ).href ),
outputDir: path.join( process.cwd(), 'artifacts/test-results' ),
globalSetup: new URL( './config/global-setup.ts', 'file:' + __filename )
.pathname,
globalSetup: fileURLToPath(
new URL( './config/global-setup.ts', 'file:' + __filename ).href
),
use: {
baseURL: process.env.WP_BASE_URL || 'http://localhost:8889',
headless: true,
Expand Down

0 comments on commit 7c35f5f

Please sign in to comment.