From b5ebedc4d2cc486b2811c13d22ffa6d12f2c3ec7 Mon Sep 17 00:00:00 2001 From: neverland Date: Fri, 31 Jul 2026 13:39:27 +0800 Subject: [PATCH] chore(ci): remove redundant Rstest Playwright setup --- tests/rsbuild/rstest.ts | 5 +---- tests/rslib/rstest.ts | 5 +---- tests/rspack/rstest.ts | 3 ++- tests/rstest/examples.ts | 5 +---- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/tests/rsbuild/rstest.ts b/tests/rsbuild/rstest.ts index fd34b3e7..6b74a476 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({ @@ -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`; - }, }); } diff --git a/tests/rslib/rstest.ts b/tests/rslib/rstest.ts index 398ab000..7277a72b 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({ @@ -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`; - }, }); } diff --git a/tests/rspack/rstest.ts b/tests/rspack/rstest.ts index 3eff8835..def43406 100644 --- a/tests/rspack/rstest.ts +++ b/tests/rspack/rstest.ts @@ -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`; }, }); } diff --git a/tests/rstest/examples.ts b/tests/rstest/examples.ts index 8922afbb..3fc3b0aa 100644 --- a/tests/rstest/examples.ts +++ b/tests/rstest/examples.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,8 +7,5 @@ export async function test(options: RunOptions) { repo: 'rstackjs/rstack-examples', branch: 'main', test: ['test:rstest'], - beforeTest: async () => { - await $`pnpm exec playwright install chromium --with-deps`; - }, }); }