Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

test: the Playwright spec search skips folders git ignores (#10467)

Christopher Chedeaue03914699360
diff --git a/.gitignore b/.gitignore
index 640c022c96..60ed15d571 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,7 +53,13 @@ internal/vibe-tests/results/
internal/vibe-tests/.fixture-runs/
# Astryx agent docs and test scratch directories (generated)
-.astryx-*/
+# A test that makes a scratch folder inside the repository lists it here:
+# the Playwright spec search skips what this file lists. A leading **/
+# makes Playwright match at any depth.
+**/.astryx-*/
+.tmp-theme-app-types-*/
+tmp-swizzle-*-test/
+packages/cli/.tmp-component-icons-*/
apps/sandbox/.next/
apps/sandbox/out/
apps/sandbox/next-env.d.ts
diff --git a/playwright.config.ts b/playwright.config.ts
index 719240b754..0667311aba 100644
--- a/playwright.config.ts
+++ b/playwright.config.ts
@@ -67,6 +67,11 @@ function contractWorkers(): number {
export default defineConfig({
testDir: '.',
+ // Node tests make scratch folders inside the repository and remove them
+ // when they end, and .gitignore lists them. The search for spec files
+ // skips what .gitignore lists, so a folder removed during the search
+ // cannot fail it.
+ respectGitIgnore: true,
testMatch: [...A11Y_SPEC_GLOBS],
// The contract mounts, focuses, and types into one page at a time, so a spec
// file's tests run in order on one worker (`fullyParallel: false`). Workers
diff --git a/playwright.interaction.config.ts b/playwright.interaction.config.ts
index 6bc65076e1..cb0fc45da5 100644
--- a/playwright.interaction.config.ts
+++ b/playwright.interaction.config.ts
@@ -61,6 +61,11 @@ function workers(): number {
export default defineConfig({
testDir: '.',
+ // Node tests make scratch folders inside the repository and remove them
+ // when they end, and .gitignore lists them. The search for spec files
+ // skips what .gitignore lists, so a folder removed during the search
+ // cannot fail it.
+ respectGitIgnore: true,
testMatch: [
'internal/interaction-harness/src/**/*.interaction.browser.spec.ts',
'packages/*/src/**/*.interaction.browser.spec.ts',