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 ourterms of serviceand privacy statement.We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 'grep' CLI option ignored when using 'ui' CLI option #31617

Closed
kacy-weakleyopened this issue Jul 9, 2024 · 0 comments · Fixed by#31815
Closed

[Bug]: 'grep' CLI option ignored when using 'ui' CLI option #31617

kacy-weakleyopened this issue Jul 9, 2024 · 0 comments · Fixed by#31815
Assignees

Comments

@kacy-weakley
Copy link

kacy-weakley commented Jul 9, 2024

Version

1.45.1

Steps to reproduce

  1. Set up barebones Playwright example.
    • npm init playwright@latest
  2. Run the Playwright command with both 'grep' and 'ui' CLI options.
    • npx playwright test --grep 'has title' --ui
  3. Notice that the UI mode opens with all tests, not just those matching the 'grep' pattern.

Expected behavior

When using bothgrepanduiCLI options, the UI mode should only display tests that match the specifiedgreppattern.

Actual behavior

When using bothgrepanduiCLI options, the UI mode displays all tests, not just those matching the specifiedgreppattern. It seems that thegrepCLI option is ignored entirely when theuiCLI option is also used.

Additional context

These two CLI options worked well together in version 1.42.1. They stopped working together via CLI from 1.43 onward.

These two options do work together if you specifygrepas an option in the Playwright config file, rather than specifying it command line, and then use theuiCLI option alone. This will open the UI mode filtered to only tests that match thegrepoption specified in the config.

Environment

System:
OS: macOS 14.5
CPU: (10) arm64 Apple M1 Pro
Memory: 119.23 MB / 32.00 GB
Binaries:
Node: 20.12.2 -~/.n/bin/node
Yarn: 1.22.21 - /opt/homebrew/bin/yarn
npm: 10.5.0 -~/.n/bin/npm
Languages:
Bash: 5.2.26 - /opt/homebrew/bin/bash
npmPackages:
@playwright/test: ^1.45.1 =>1.45.1
playwright-lighthouse: ^3.1.0 =>3.1.0
@kacy-weakley kacy-weakley changed the title [Bug]: 'grep' CLI option ignored when using 'ui' CLI option in Playwright [Bug]: 'grep' CLI option ignored when using 'ui' CLI option Jul 9, 2024
@Skn0tt Skn0tt self-assigned this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants