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 e2e test runner doesn't run any tests #18566

Closed
1 of 4 tasks
jafaircl opened this issue Aug 10, 2023 · 2 comments · Fixed by #18559
Closed
1 of 4 tasks

Playwright e2e test runner doesn't run any tests #18566

jafaircl opened this issue Aug 10, 2023 · 2 comments · Fixed by #18559

Comments

@jafaircl
Copy link

jafaircl commented Aug 10, 2023

Current Behavior

When starting an Angular project with version 16.7.0-beta.x and using Playwright as the e2e test runner, no tests are actually run with the e2e command. They don't fail and no obvious errors are thrown. But, no tests are run.

Expected Behavior

The test runner should find and run at least the default test.

GitHub Repo

https://github.com/jafaircl/nx-playwright-bug

Steps to Reproduce

  1. Create a new workspace with npx [email protected] as an integrated monorepo with no initial apps.
  2. Install the Angular plugin with npm install @nx/[email protected] --save-dev.
  3. Create an Angular app with npx nx g @nx/angular:application. Choose all of the default options EXCEPT to use playwright as the e2e test runner. (I named the app "my-app").
  4. Run npx nx e2e my-app-e2e.
  5. Run npx playwright show-report dist/.playwright/apps/my-app-e2e/playwright-report and observe that no tests actually ran

Nx Report

>  NX   Report complete - copy this into the issue template

   Node   : 18.17.1
   OS     : darwin-arm64
   npm    : 9.6.7

   nx                 : 16.7.0-beta.3
   @nx/js             : 16.7.0-beta.3
   @nx/jest           : 16.7.0-beta.3
   @nx/linter         : 16.7.0-beta.3
   @nx/workspace      : 16.7.0-beta.3
   @nx/angular        : 16.7.0-beta.3
   @nx/cypress        : 16.7.0-beta.3
   @nx/devkit         : 16.7.0-beta.3
   @nx/eslint-plugin  : 16.7.0-beta.3
   @nx/playwright     : 16.7.0-beta.3
   @nrwl/tao          : 16.7.0-beta.3
   @nx/webpack        : 16.7.0-beta.3
   typescript         : 5.1.6

Failure Logs

N/A

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

I traced the issue to this line of code:

...nxE2EPreset(__filename, { testDir: './<>' }),

Playwright is looking in ./<> rather than ./src for tests. Changing the folder to ./src fixes the issue. It's possible that #18558 may fix this behavior but I'm not sure. I'm happy to open a PR if not.

@barbados-clemens
Copy link
Contributor

thanks for testing out the beta playwright plugin.
those issues will be fixed in #18559

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants