nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.21k stars 2.31k forks source link

@nx/playwright ignoring --project argument #26965

Open MillerSvt opened 1 month ago

MillerSvt commented 1 month ago

Current Behavior

nx e2e app --project=chromium Runs all tests, ignoring the --project parameter

Expected Behavior

Runs only tests in the chromium project

GitHub Repo

https://github.com/nrwl/nx/issues/26965#issuecomment-2258177471

Steps to Reproduce

  1. Create angular application with playwright as e2e test runner
  2. Create e2e test
  3. Add some projects for different browsers in playwright.config.ts
  4. Run nx e2e app --project=some-project

Nx Report

nx report

 NX   Report complete - copy this into the issue template

Node   : 20.12.2
OS     : darwin-arm64
npm    : 10.5.0

nx              : 18.3.5
@nx/js          : 18.3.5
@nx/jest        : 18.3.5
@nx/linter      : 18.3.5
@nx/eslint      : 18.3.5
@nx/workspace   : 18.3.5
@nx/angular     : 18.3.5
@nx/devkit      : 18.3.5
@nx/playwright  : 18.3.5
@nrwl/tao       : 18.3.5
@nx/web         : 18.3.5
@nx/webpack     : 18.3.5
typescript      : 5.4.5
---------------------------------------
Community plugins:
@jsverse/transloco         : 7.4.2
@ngrx/effects              : 17.0.1
@ngrx/entity               : 17.0.1
@ngrx/store                : 17.0.1
@ngrx/store-devtools       : 17.0.1
@taiga-ui/cdk              : 3.84.0
@taiga-ui/core             : 3.84.0
@taiga-ui/proprietary-core : 3.84.0

Failure Logs

No response

Package Manager Version

No response

Operating System

Additional Information

No response

Coly010 commented 1 month ago

Hey, can you retry this with the latest of Nx (19.5)?

If it still doesn't work, could you provide a repo with a minimal reproduction, it would be super helpful.

MillerSvt commented 1 month ago

Repo: https://github.com/MillerSvt/nx-playwright-bug-repro Command: nx e2e app-e2e --project=chromium Result:

  3 failed
    [chromium] › example.spec.ts:3:5 › has title ───────────────────────────────────────────────────
    [firefox] › example.spec.ts:3:5 › has title ────────────────────────────────────────────────────
    [webkit] › example.spec.ts:3:5 › has title ─────────────────────────────────────────────────────

Workaround: playwright test -c app-e2e --project=chromium Result:

  1 failed
    [chromium] › example.spec.ts:3:5 › has title ───────────────────────────────────────────────────
MillerSvt commented 1 month ago

Could you fix it for version 18 as well?

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because no reproduction was provided within 7 days. Please help us help you. Providing a repository exhibiting the issue helps us diagnose and fix the issue. Any time that we spend reproducing this issue is time taken away from addressing this issue and other issues. This issue will be closed in 21 days if a reproduction is not provided. If a reproduction has been provided, please reply to keep it active. Thanks for being a part of the Nx community! 🙏

MillerSvt commented 1 month ago

@Coly010 what?