Skip to content
Merged
Show file tree
Hide file tree
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: 1 addition & 4 deletions tests/rsbuild/rstest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { RunOptions } from '../../types';
import { $, runInRepo } from '../../utils';
import { runInRepo } from '../../utils';

export async function test(options: RunOptions) {
await runInRepo({
Expand All @@ -9,8 +9,5 @@ export async function test(options: RunOptions) {
build: 'node --run build',
// ignore snapshot changes
test: ['test -u', 'test:examples'],
beforeTest: async () => {
await $`pnpm exec playwright install chromium --with-deps`;
},
});
}
5 changes: 1 addition & 4 deletions tests/rslib/rstest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { RunOptions } from '../../types';
import { $, runInRepo } from '../../utils';
import { runInRepo } from '../../utils';

export async function test(options: RunOptions) {
await runInRepo({
Expand All @@ -8,8 +8,5 @@ export async function test(options: RunOptions) {
branch: process.env.RSTEST ?? 'main',
build: 'node --run build',
test: ['test', 'test:examples'],
beforeTest: async () => {
await $`pnpm exec playwright install chromium --with-deps`;
},
});
}
3 changes: 2 additions & 1 deletion tests/rspack/rstest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export async function test(options: RunOptions) {
},
],
beforeTest: async () => {
await $`pnpm exec playwright install chromium webkit --with-deps`;
// Browser e2e still covers WebKit; Chromium uses GitHub's Chrome.
await $`pnpm exec playwright install webkit`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep Chromium installation for non-GitHub runs

When this suite is run locally via pnpm test --stack rspack rstest, GITHUB_ACTIONS is absent, so Rstest does not select the GitHub runner's system Chrome; this hook now downloads only WebKit even though the e2e suite still covers Chromium, leaving Playwright without a Chromium executable on a clean checkout. Preserve the Chromium install outside GitHub Actions (and likewise in the other changed Rstest suites) while skipping it only when the system Chrome channel is actually selected.

AGENTS.md reference: AGENTS.md:L7-L9

Useful? React with 👍 / 👎.

},
});
}
5 changes: 1 addition & 4 deletions tests/rstest/examples.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import type { RunOptions } from '../../types';
import { $, runInRepo } from '../../utils';
import { runInRepo } from '../../utils';

export async function test(options: RunOptions) {
await runInRepo({
...options,
repo: 'rstackjs/rstack-examples',
branch: 'main',
test: ['test:rstest'],
beforeTest: async () => {
await $`pnpm exec playwright install chromium --with-deps`;
},
});
}
Loading