Open
Description
Current Behavior
Playwright accepts multiple tags in grep if they are separated by a pipe and wrapped in quotes. When command is run with nx the quotes are stripped and the command fails.
Both commands below fail:
nx affected -t e2e --grep="@visual-regression|@smoke"
nx affected -t e2e -- --grep="@visual-regression|@smoke"
/bin/sh: @smoke: command not found
node:events:496
throw er; // Unhandled 'error' event
^
...
Node.js v20.12.2
Warning: command "npx playwright test --grep=@visual-regression|@smoke" exited with non-zero status code
When run directly with playwright from working directory it succeeds:
npx playwright test --grep "@visual-regression|@smoke"
Expected Behavior
Nx playwright executor should support multiple grep arguments and not strip the quotes
GitHub Repo
No response
Steps to Reproduce
- Add a playwright e2e project
- Create two tests with different tags
- Run the command
npx nx affected e2e --grep "@tag1|@tag2"
- Notice failure
Nx Report
Node : 20.12.2
OS : darwin-arm64
npm : 10.5.0
nx (global) : 18.3.1
nx : 18.3.1
@nx/js : 18.3.1
@nx/jest : 18.3.1
@nx/linter : 18.3.1
@nx/eslint : 18.3.1
@nx/workspace : 18.3.1
@nx/cypress : 18.3.1
@nx/devkit : 18.3.1
@nx/eslint-plugin : 18.3.1
@nx/next : 18.3.1
@nx/playwright : 18.3.1
@nx/plugin : 18.3.1
@nx/react : 18.3.1
@nx/storybook : 18.3.1
@nrwl/tao : 18.3.1
@nx/vite : 18.3.1
@nx/web : 18.3.1
@nx/webpack : 18.3.1
typescript : 5.3.3
---------------------------------------
Failure Logs
No response
Package Manager Version
No response
Operating System
- macOS
- Linux
- Windows
- Other (Please specify)
Additional Information
No response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment