From 90e4a3eca80fdc0525f4e1e2c8cd3ef8ca577753 Mon Sep 17 00:00:00 2001 From: 9aoy <9aoyuao@gmail.com> Date: Tue, 6 Jan 2026 14:08:46 +0800 Subject: [PATCH 1/2] chore: rstest playwright install --- tests/rsbuild/rstest.ts | 5 ++++- tests/rslib/rstest.ts | 5 ++++- tests/rspack/rstest.ts | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/rsbuild/rstest.ts b/tests/rsbuild/rstest.ts index 4b43814..f837157 100644 --- a/tests/rsbuild/rstest.ts +++ b/tests/rsbuild/rstest.ts @@ -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({ @@ -8,5 +8,8 @@ export async function test(options: RunOptions) { branch: process.env.RSTEST ?? 'main', // ignore snapshot changes test: ['test -u'], + beforeTest: async () => { + await $`pnpm playwright install chromium`; + }, }); } diff --git a/tests/rslib/rstest.ts b/tests/rslib/rstest.ts index e104597..fa61e4d 100644 --- a/tests/rslib/rstest.ts +++ b/tests/rslib/rstest.ts @@ -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({ @@ -7,5 +7,8 @@ export async function test(options: RunOptions) { repo: 'web-infra-dev/rstest', branch: process.env.RSTEST ?? 'main', test: ['test'], + beforeTest: async () => { + await $`pnpm playwright install chromium`; + }, }); } diff --git a/tests/rspack/rstest.ts b/tests/rspack/rstest.ts index 9e4c234..fa732cb 100644 --- a/tests/rspack/rstest.ts +++ b/tests/rspack/rstest.ts @@ -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({ @@ -8,5 +8,8 @@ export async function test(options: RunOptions) { branch: process.env.RSTEST ?? 'main', // ignore snapshot changes test: ['test -u', 'e2e'], + beforeTest: async () => { + await $`pnpm playwright install chromium`; + }, }); } From ef24509d934458ef806e5842fae27545cd25ffe3 Mon Sep 17 00:00:00 2001 From: 9aoy <9aoyuao@gmail.com> Date: Tue, 6 Jan 2026 14:16:00 +0800 Subject: [PATCH 2/2] fix: playwright install --- tests/rsbuild/rstest.ts | 2 +- tests/rslib/rstest.ts | 2 +- tests/rspack/rstest.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/rsbuild/rstest.ts b/tests/rsbuild/rstest.ts index f837157..2ccd547 100644 --- a/tests/rsbuild/rstest.ts +++ b/tests/rsbuild/rstest.ts @@ -9,7 +9,7 @@ export async function test(options: RunOptions) { // ignore snapshot changes test: ['test -u'], beforeTest: async () => { - await $`pnpm playwright install chromium`; + await $`npx playwright install chromium webkit`; }, }); } diff --git a/tests/rslib/rstest.ts b/tests/rslib/rstest.ts index fa61e4d..a781cf4 100644 --- a/tests/rslib/rstest.ts +++ b/tests/rslib/rstest.ts @@ -8,7 +8,7 @@ export async function test(options: RunOptions) { branch: process.env.RSTEST ?? 'main', test: ['test'], beforeTest: async () => { - await $`pnpm playwright install chromium`; + await $`npx playwright install chromium webkit`; }, }); } diff --git a/tests/rspack/rstest.ts b/tests/rspack/rstest.ts index fa732cb..bec442e 100644 --- a/tests/rspack/rstest.ts +++ b/tests/rspack/rstest.ts @@ -9,7 +9,7 @@ export async function test(options: RunOptions) { // ignore snapshot changes test: ['test -u', 'e2e'], beforeTest: async () => { - await $`pnpm playwright install chromium`; + await $`npx playwright install chromium webkit`; }, }); }