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

Playwright could not find tests with Nextjs 15 experimental testmode #71773

Open
KagamiChan opened this issue Oct 24, 2024 · 0 comments
Open
Labels
bug Issue was opened via the bug report template. Testing Related to testing with Next.js.

Comments

@KagamiChan
Copy link
Contributor

Link to the code that reproduces this issue

https://github.com/KagamiChan/next15-playwright-test-not-found

To Reproduce

  1. run npm run build
  2. run npx playwright test
  3. playwright reports "No tests found"
next15-playwright-test-not-found> npx playwright test
Error: No tests found

To open last HTML report run:

  npx playwright show-report

Current vs. Expected behavior

playwright should detect the test cases and run it.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 64618
  Available CPU cores: 32
Binaries:
  Node: 21.7.1
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 15.0.1 // Latest available version is detected (15.0.1).
  eslint-config-next: 15.0.1
  react: 19.0.0-rc-69d4b800-20241021
  react-dom: 19.0.0-rc-69d4b800-20241021
  typescript: 5.6.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Testing

Which stage(s) are affected? (Select all that apply)

next start (local)

Additional context

I also tried with pnpm and the result is the same, so it might not be an issue of package manager

The setup is following the instructions here: https://github.com/vercel/next.js/blob/canary/packages/next/src/experimental/testmode/playwright/README.md

This used to work with v14

@KagamiChan KagamiChan added the bug Issue was opened via the bug report template. label Oct 24, 2024
@github-actions github-actions bot added the Testing Related to testing with Next.js. label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Testing Related to testing with Next.js.
Projects
None yet
Development

No branches or pull requests

1 participant