From a0b52706623f0fdf86bad67decc6f5e37135744f Mon Sep 17 00:00:00 2001 From: Devin Foley Date: Mon, 28 Sep 2026 14:21:13 -0700 Subject: [PATCH] test: include company context regression in browser CI Place the regression in the default e2e discovery tree so the existing Chrome CI shards run it. Keep a focused config for fast local runs and honor the configured browser channel. The focused Chromium test passes, the default Playwright project lists it, and CI shard discovery includes it. Co-Authored-By: Paperclip --- doc/DEVELOPING.md | 4 +++- package.json | 2 +- tests/browser-context/playwright.config.ts | 11 ----------- .../company-context-refresh.spec.ts} | 0 tests/e2e/playwright-company-context.config.ts | 16 ++++++++++++++++ 5 files changed, 20 insertions(+), 13 deletions(-) delete mode 100644 tests/browser-context/playwright.config.ts rename tests/{browser-context/company-context.spec.ts => e2e/company-context-refresh.spec.ts} (100%) create mode 100644 tests/e2e/playwright-company-context.config.ts diff --git a/doc/DEVELOPING.md b/doc/DEVELOPING.md index e6b63a80011..dda043b404a 100644 --- a/doc/DEVELOPING.md +++ b/doc/DEVELOPING.md @@ -1641,4 +1641,6 @@ module version. Production builds do not use the development cache. Run `pnpm test:e2e:browser-context` to test this with real Vite modules and Chromium. The test starts its own loopback Vite server and mocks API responses; -it needs no running Paperclip instance or provider credentials. +it needs no running Paperclip instance or provider credentials. The same spec lives +in the default `test:e2e` discovery tree, so the existing Chrome CI shards run it +on pull requests. diff --git a/package.json b/package.json index d5110ca5f68..fc3c8b0bae9 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "test:e2e:runner:models:update": "node cli/node_modules/tsx/dist/cli.mjs tests/runner-e2e/openrouter-models-update.ts", "test:e2e:runner:history:publish": "node cli/node_modules/tsx/dist/cli.mjs tests/runner-e2e/history-publish.ts", "test:runner-recovery": "vitest run server/src/services/native-runtime/native-replacement-evidence.test.ts server/src/services/native-runtime/stopped-codex-turn.test.ts server/src/services/native-runtime/native-safe-replacement.test.ts", - "test:e2e:browser-context": "playwright test --config tests/browser-context/playwright.config.ts", + "test:e2e:browser-context": "playwright test --config tests/e2e/playwright-company-context.config.ts", "test:e2e:runner:browser-support": "playwright test --config tests/runner-e2e/playwright-support.config.ts", "test:e2e:runner:unit": "vitest run --config tests/runner-e2e/vitest.config.ts", "test:e2e:runner:typecheck": "tsc -p tests/runner-e2e/tsconfig.json", diff --git a/tests/browser-context/playwright.config.ts b/tests/browser-context/playwright.config.ts deleted file mode 100644 index 53dd5febbf6..00000000000 --- a/tests/browser-context/playwright.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { defineConfig } from "@playwright/test"; - -export default defineConfig({ - testDir: ".", - testMatch: "*.spec.ts", - workers: 1, - timeout: 30_000, - use: { headless: true }, - outputDir: "./test-results", - reporter: "list", -}); diff --git a/tests/browser-context/company-context.spec.ts b/tests/e2e/company-context-refresh.spec.ts similarity index 100% rename from tests/browser-context/company-context.spec.ts rename to tests/e2e/company-context-refresh.spec.ts diff --git a/tests/e2e/playwright-company-context.config.ts b/tests/e2e/playwright-company-context.config.ts new file mode 100644 index 00000000000..15c5f3a8300 --- /dev/null +++ b/tests/e2e/playwright-company-context.config.ts @@ -0,0 +1,16 @@ +import { defineConfig } from "@playwright/test"; + +export default defineConfig({ + testDir: ".", + testMatch: "company-context-refresh.spec.ts", + workers: 1, + timeout: 30_000, + use: { + headless: true, + ...(process.env.PAPERCLIP_PLAYWRIGHT_CHANNEL + ? { channel: process.env.PAPERCLIP_PLAYWRIGHT_CHANNEL } + : {}), + }, + outputDir: "./test-results", + reporter: "list", +});