You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: --only-changed skips changed test files with non-ASCII names #43661
mkdir repro &&cd repro && git init -q
npm init -y > /dev/null && npm i -D @playwright/test@1.64.1 > /dev/null
echo node_modules > .gitignore
echo"export default {};"> playwright.config.mjs
fornamein plain cadastro-usuário;doprintf"import { test } from '@playwright/test';\ntest('%s', () => {});\n""$name">"$name.spec.ts"done
git add .&& git commit -qm init
echo'// changed'>> plain.spec.ts
echo'// changed'>> cadastro-usuário.spec.ts
printf"import { test } from '@playwright/test';\ntest('ação', () => {});\n"> ação.spec.ts
git status --short
npx playwright test --only-changed --list
Expected behavior
All 3 tests are listed: the two modified files and the untracked one.
Actual behavior
Only the ASCII-named file is picked up:
M "cadastro-usu\303\241rio.spec.ts"
M plain.spec.ts
?? "a\303\247\303\243o.spec.ts"
Listing tests:
plain.spec.ts:2:5 › plain
Total: 1 test in 1 file
A real run (without --list) passes, so in CI the changed tests just silently don't run.
Additional context
Git quotes paths with non-ASCII bytes by default (core.quotePath), so git diff --name-only and git ls-files --others print "cadastro-usu\303\241rio.spec.ts". detectChangedTestFiles in packages/playwright/src/runner/vcs.ts splits that output on \n and joins it with the root dir, so the quoted paths never match a real file. Changed helper files with such names go through the same list, so tests that import them aren't picked up either.
-c core.quotePath=false would cover non-ASCII names but not paths with ", \ or tabs, which git also quotes. Passing -z to ls-files and diff and splitting on \0 handles all of them. I patched that into 1.64.1 locally and all 3 tests get listed.
I'd like to send a PR with that fix and a test in tests/playwright-test/only-changed.spec.ts, if that works for you.
With -z you get the raw names for all of them, which is what I tested against 1.64.1. Happy to send that version with a test if you want to go that way.
Hi, I'm the Playwright bot and I reproduced this on Linux.
Reproduced on main (1.65.0-next, 1b9b602724484df3ebc41aba77824fdfaba861f6). Git quotes these filenames, but --only-changed treats the quoted text as a literal path. The fix uses -z and NUL separators for both tracked and untracked file lists, without changing Git settings.
Reproduction and verification
I extended the existing list-mode test with a modified cadastro-usuário.spec.ts, an untracked ação.spec.ts, and a filename containing quotes, a tab, and a newline, alongside an ASCII file. Main lists only the ASCII file; the fix lists all four.
I also built and tested #43678 at 29a509b424dc9c4c248a1cda9e62309b86062915. It lists the ordinary Unicode files, but still skips the name with quotes and control characters: three of four files.
With the NUL-delimited fix, all 12 only-changed.spec.ts tests and all 18 related command-line-filter/Git-ignore tests pass. npm run build and npm run flint pass. These are browser-independent runner tests; no headed/headless or browser-specific runs were needed. Windows and macOS were not tested.
Activity
zerotohero3 commentedon Oct 28, 2026
Heads up on #43678:
core.quotePath=falseonly stops quoting non-ASCII bytes. Git still quotes names with",\or control chars:With
-zyou get the raw names for all of them, which is what I tested against 1.64.1. Happy to send that version with a test if you want to go that way.github-actions commentedon Oct 28, 2026
github-actions commentedon Oct 28, 2026
Hi, I'm the Playwright bot and I reproduced this on Linux.
Reproduced on main (
1.65.0-next,1b9b602724484df3ebc41aba77824fdfaba861f6). Git quotes these filenames, but--only-changedtreats the quoted text as a literal path. The fix uses-zand NUL separators for both tracked and untracked file lists, without changing Git settings.Reproduction and verification
I extended the existing list-mode test with a modified
cadastro-usuário.spec.ts, an untrackedação.spec.ts, and a filename containing quotes, a tab, and a newline, alongside an ASCII file. Main lists only the ASCII file; the fix lists all four.I also built and tested #43678 at
29a509b424dc9c4c248a1cda9e62309b86062915. It lists the ordinary Unicode files, but still skips the name with quotes and control characters: three of four files.With the NUL-delimited fix, all 12
only-changed.spec.tstests and all 18 related command-line-filter/Git-ignore tests pass.npm run buildandnpm run flintpass. These are browser-independent runner tests; no headed/headless or browser-specific runs were needed. Windows and macOS were not tested.Draft fix: #43726
Triaged on Linux by the Playwright bot - agent run