diff --git a/.github/actions/install-playwright/action.yml b/.github/actions/install-playwright/action.yml index b9f554031f9b..b3c5391f54a7 100644 --- a/.github/actions/install-playwright/action.yml +++ b/.github/actions/install-playwright/action.yml @@ -23,6 +23,11 @@ runs: process.stdout.write(range.replace(/^[~^=]/, '')); ") echo "version=$version" >> "$GITHUB_OUTPUT" + if [[ "$version" == npm:flashwright-test@* ]]; then + echo "package=${version/npm:flashwright-test@/flashwright@}" >> "$GITHUB_OUTPUT" + else + echo "package=playwright@$version" >> "$GITHUB_OUTPUT" + fi shell: bash working-directory: ${{ inputs.cwd }} @@ -40,8 +45,8 @@ runs: # `npx` runs outside the repo, so it can't pick up a `playwright` that a parallel `pnpm install` is still linking. - name: Install Playwright browsers (uncached) env: - PLAYWRIGHT_VERSION: ${{ steps.playwright-version.outputs.version }} - run: npx -y "playwright@$PLAYWRIGHT_VERSION" install chromium webkit firefox + PLAYWRIGHT_PACKAGE: ${{ steps.playwright-version.outputs.package }} + run: npx -y "$PLAYWRIGHT_PACKAGE" install chromium webkit firefox if: steps.playwright-version.outputs.version != '' && steps.playwright-cache.outputs.cache-hit != 'true' shell: bash working-directory: ${{ runner.temp }} diff --git a/dev-packages/browser-integration-tests/package.json b/dev-packages/browser-integration-tests/package.json index 58201c278c44..b364029a8377 100644 --- a/dev-packages/browser-integration-tests/package.json +++ b/dev-packages/browser-integration-tests/package.json @@ -58,7 +58,7 @@ "devDependencies": { "@babel/core": "^7.29.6", "@babel/preset-typescript": "^7.16.7", - "@playwright/test": "1.64.1", + "@playwright/test": "npm:flashwright-test@1.64.1-flashwright.12", "@sentry/browser": "11.17.0", "@sentry/browser-utils": "11.17.0", "@sentry/conventions": "0.35.0", diff --git a/dev-packages/e2e-tests/lib/copyToTemp.mjs b/dev-packages/e2e-tests/lib/copyToTemp.mjs index 269c95f9c736..ecd8b3831769 100644 --- a/dev-packages/e2e-tests/lib/copyToTemp.mjs +++ b/dev-packages/e2e-tests/lib/copyToTemp.mjs @@ -39,6 +39,13 @@ function fixPackageJson(originalPath, cwd) { fixFileLinkDependencies(packageJson.devDependencies); } + // Benchmark every app with the fork without rewriting each fixture's manifest and lockfile. + for (const dependencies of [packageJson.dependencies, packageJson.devDependencies]) { + if (dependencies?.['@playwright/test']) { + dependencies['@playwright/test'] = 'npm:flashwright-test@1.64.1-flashwright.12'; + } + } + // 2. Pin node and pnpm. The tmp dir has no parent package.json to inherit them from. const { nodeRuntime, packageManager } = resolveToolPins(originalPath); if (!nodeRuntime || !packageManager) { diff --git a/dev-packages/e2e-tests/test-applications/ember-classic/playwright.config.ts b/dev-packages/e2e-tests/test-applications/ember-classic/playwright.config.ts index 8d378b127c72..9708b048cfa3 100644 --- a/dev-packages/e2e-tests/test-applications/ember-classic/playwright.config.ts +++ b/dev-packages/e2e-tests/test-applications/ember-classic/playwright.config.ts @@ -19,6 +19,7 @@ const eventProxyPort = 3031; * See https://playwright.dev/docs/test-configuration. */ const config: PlaywrightTestConfig = { + workersPerProcess: 4, testDir: './tests', /* Maximum time one test can run for. */ timeout: 30_000, @@ -38,6 +39,7 @@ const config: PlaywrightTestConfig = { reporter: process.env.CI ? [['list'], ['junit', { outputFile: 'results.junit.xml' }]] : 'list', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { + instantAnimations: true, /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ actionTimeout: 0, /* Base URL to use in actions like `await page.goto('/')`. */ diff --git a/dev-packages/e2e-tests/test-applications/ember-embroider/playwright.config.ts b/dev-packages/e2e-tests/test-applications/ember-embroider/playwright.config.ts index 8d378b127c72..9708b048cfa3 100644 --- a/dev-packages/e2e-tests/test-applications/ember-embroider/playwright.config.ts +++ b/dev-packages/e2e-tests/test-applications/ember-embroider/playwright.config.ts @@ -19,6 +19,7 @@ const eventProxyPort = 3031; * See https://playwright.dev/docs/test-configuration. */ const config: PlaywrightTestConfig = { + workersPerProcess: 4, testDir: './tests', /* Maximum time one test can run for. */ timeout: 30_000, @@ -38,6 +39,7 @@ const config: PlaywrightTestConfig = { reporter: process.env.CI ? [['list'], ['junit', { outputFile: 'results.junit.xml' }]] : 'list', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { + instantAnimations: true, /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ actionTimeout: 0, /* Base URL to use in actions like `await page.goto('/')`. */ diff --git a/dev-packages/e2e-tests/test-applications/node-express-send-to-sentry/playwright.config.mjs b/dev-packages/e2e-tests/test-applications/node-express-send-to-sentry/playwright.config.mjs index 9401872607c3..e7421e6cfdbf 100644 --- a/dev-packages/e2e-tests/test-applications/node-express-send-to-sentry/playwright.config.mjs +++ b/dev-packages/e2e-tests/test-applications/node-express-send-to-sentry/playwright.config.mjs @@ -6,6 +6,7 @@ const expressPort = 3030; * See https://playwright.dev/docs/test-configuration. */ const config = { + workersPerProcess: 4, testDir: './tests', /* Maximum time one test can run for. Spans take ~2min to become queryable via the trace endpoint. */ timeout: 210_000, @@ -26,6 +27,7 @@ const config = { reporter: process.env.CI ? [['list'], ['junit', { outputFile: 'results.junit.xml' }]] : 'list', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { + instantAnimations: true, /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ actionTimeout: 0, diff --git a/dev-packages/e2e-tests/test-applications/nuxt-4/app/pages/fetch-server-routes.vue b/dev-packages/e2e-tests/test-applications/nuxt-4/app/pages/fetch-server-routes.vue index 2768eb370f94..9117d7257173 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-4/app/pages/fetch-server-routes.vue +++ b/dev-packages/e2e-tests/test-applications/nuxt-4/app/pages/fetch-server-routes.vue @@ -1,13 +1,18 @@ - Fetch Server API Error - Fetch Nitro $fetch - Fetch Third-Party HTTPError + Fetch Server API Error + Fetch Nitro $fetch + Fetch Third-Party HTTPError