Skip to content
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

Open
vitalets opened this issue Dec 21, 2024 · 0 comments
Open

[Bug]: Playwright does not append testDir to the error location #34125

vitalets opened this issue Dec 21, 2024 · 0 comments

Comments

@vitalets
Copy link
Contributor

vitalets commented Dec 21, 2024

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.

  1 failed
    test/sample.test.ts:9:1 › my test ─────────────────────────────────────────────────────────────────

Actual behavior

Error location contains path, relative to the testDir:

  1 failed
    sample.test.ts:9:1 › my test ─────────────────────────────────────────────────────────────────

Additional context

If I remove testDir from Playwright config and it uses default testDir, then error location contains testDir and navigation by CMD+Click is correct.

Environment

System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Pro
    Memory: 77.61 MB / 16.00 GB
  Binaries:
    Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
  Languages:
    Bash: 3.2.57 - /bin/bash
  npmPackages:
    @playwright/test: ^1.49.1 => 1.49.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant