Skip to content
Closed
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
4 changes: 2 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ const chromiumExecutablePath = process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH;
// Tag-level filters keep production and prototype journeys disjoint even when
// they share a spec file.
const productionSpecPattern =
/.*ui-(smoke|stress|accessibility|tools|overlap|universal-search|specifiers|formulation|pwa)\.spec\.ts/;
/.*(?:answer-progress-ui-smoke|ui-(smoke|stress|accessibility|tools|overlap|universal-search|specifiers|formulation|pwa))\.spec\.ts/;
const mockupSpecPattern = /.*ui-(tools|tools-collapse|tools-task-directory)\.spec\.ts/;
Comment on lines +15 to 16

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Keep the production matcher aligned with testMatch.

Line 15 still omits ui-tools-collapse and ui-tools-task-directory, although Line 22 and the PR objective include both. If the Chromium production project uses productionSpecPattern, those specs will remain excluded from the production UI gate. Add both alternatives here or explicitly remove them from the production-scope objective.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@playwright.config.ts` around lines 15 - 16, Update productionSpecPattern in
the Playwright configuration to include the ui-tools-collapse and
ui-tools-task-directory spec alternatives, keeping it aligned with testMatch and
the production UI gate scope.

const mockupTag = /@mockup/;

export default defineConfig({
testDir: "./tests",
testMatch:
/.*ui-(smoke|stress|accessibility|tools|tools-collapse|tools-task-directory|overlap|universal-search|specifiers|formulation|pwa)\.spec\.ts/,
/.*(?:answer-progress-ui-smoke|ui-(smoke|stress|accessibility|tools|tools-collapse|tools-task-directory|overlap|universal-search|specifiers|formulation|pwa))\.spec\.ts/,
timeout: 60_000,
retries: 0,
// Fail the run if a stray `test.only` is committed: otherwise it silently
Expand Down
11 changes: 11 additions & 0 deletions scripts/ci-change-scope.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ const uiPatterns = [
"src/components",
"src/styles",
"public",
// Answer progress is a production Playwright journey even though its
// historical filename does not start with `ui-`. Keep its CI trigger in
// lockstep with playwright.config.ts so an edited assertion cannot evade
// the required UI job (Vitest does not collect *.spec.ts files).
"tests/answer-progress-ui-smoke.spec.ts",
/^tests\/ui-.*\.spec\.ts$/,
/^tests\/playwright-.*\.ts$/,
/^playwright(?:\..*)?\.config\.ts$/,
Expand Down Expand Up @@ -420,6 +425,12 @@ function selfTest() {
ui_changed: true,
build_changed: true,
});
assertScope("answer-progress-playwright", ["tests/answer-progress-ui-smoke.spec.ts"], {
source_changed: true,
coverage_changed: true,
ui_changed: true,
build_changed: false,
});
assertScope("db", ["supabase/migrations/20260710000000_example.sql"], {
db_changed: true,
source_changed: true,
Expand Down
Loading