-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Playwright does not append testDir
to the error location
#34125
Comments
After taking a look at the source code, I think everything's working as intended here. The reason you're navigated to the wrong file is that you have two |
Yes, I intentionally included the second
In this case, VS Code also can't determine the correct file location, and navigation by Cmd+Click is broken. |
I think we have a bug and I have a fix on the way. Terminal/CLI reporters should use cwd to resolve file names so that the tooling that runs them (VSCode) could pick those paths up. |
Version
1.49.1
Steps to reproduce
Follow the steps in the reproduction repo: https://github.com/vitalets/playwright-issues/tree/invalid-location
In the error output Playwright does not append
testDir
to the error location. Due to that, I'm navigated to the wrong file by CMD+Click:Screen.Recording.2024-12-21.at.14.19.59.mp4
Expected behavior
Error location contains full path to the failed test, relative to the project root.
Actual behavior
Error location contains path, relative to the
testDir
:Additional context
If I remove
testDir
from Playwright config and it uses defaulttestDir
, then error location containstestDir
and navigation by CMD+Click is correct.Environment
The text was updated successfully, but these errors were encountered: