-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix(grep): references to cypress-grep #26108
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ All other tests will be marked pending, see why in the [Cypress test statuses](h | |
|
||
If you have multiple spec files, all specs will be loaded, and every test will be filtered the same way, since the grep is run-time operation and cannot eliminate the spec files without loading them. If you want to run only specific tests, use the built-in [--spec](https://on.cypress.io/command-line#cypress-run-spec-lt-spec-gt) CLI argument. | ||
|
||
Watch the video [intro to cypress-grep plugin](https://www.youtube.com/watch?v=HS-Px-Sghd8) | ||
Watch the video [intro to @cypress/grep plugin](https://www.youtube.com/watch?v=HS-Px-Sghd8) | ||
|
||
Table of Contents | ||
|
||
|
@@ -499,18 +499,18 @@ Cypress.grep('hello', '@smoke', 10) | |
|
||
## Debugging | ||
|
||
When debugging a problem, first make sure you are using the expected version of this plugin, as some features might be only available in the [later releases](https://github.com/cypress-io/cypress-grep/releases). | ||
When debugging a problem, first make sure you are using the expected version of this plugin, as some features might be only available in the [later releases](https://www.npmjs.com/package/@cypress/grep?activeTab=versions). | ||
|
||
``` | ||
# get the cypress-grep version using NPM | ||
$ npm ls cypress-grep | ||
# get the @cypress/grep version using NPM | ||
$ npm ls @cypress/grep | ||
... | ||
└── cypress-[email protected] | ||
# get the cypress-grep version using Yarn | ||
$ yarn why cypress-grep | ||
└── @cypress/[email protected] | ||
# get the @cypress/grep version using Yarn | ||
$ yarn why @cypress/grep | ||
... | ||
=> Found "cypress-grep@2.10.1" | ||
info Has been hoisted to "cypress-grep" | ||
=> Found "@cypress/grep@3.1.0" | ||
info Has been hoisted to "@cypress/grep" | ||
info This module exists because it's specified in "devDependencies". | ||
... | ||
``` | ||
|
@@ -531,30 +531,30 @@ This module uses [debug](https://github.com/visionmedia/debug#readme) to log ver | |
|
||
### Debugging in the plugin | ||
|
||
Start Cypress with the environment variable `DEBUG=cypress-grep`. You will see a few messages from this plugin in the terminal output: | ||
Start Cypress with the environment variable `DEBUG=@cypress/grep`. You will see a few messages from this plugin in the terminal output: | ||
|
||
``` | ||
$ DEBUG=cypress-grep npx cypress run --env grep=works,grepFilterSpecs=true | ||
cypress-grep: tests with "works" in their names | ||
cypress-grep: filtering specs using "works" in the title | ||
cypress-grep Cypress config env object: { grep: 'works', grepFilterSpecs: true } | ||
$ DEBUG=@cypress/grep npx cypress run --env grep=works,grepFilterSpecs=true | ||
@cypress/grep: tests with "works" in their names | ||
@cypress/grep: filtering specs using "works" in the title | ||
@cypress/grep Cypress config env object: { grep: 'works', grepFilterSpecs: true } | ||
... | ||
cypress-grep found 1 spec files +5ms | ||
cypress-grep [ 'spec.js' ] +0ms | ||
cypress-grep spec file spec.js +5ms | ||
cypress-grep suite and test names: [ 'hello world', 'works', 'works 2 @tag1', | ||
@cypress/grep found 1 spec files +5ms | ||
@cypress/grep [ 'spec.js' ] +0ms | ||
@cypress/grep spec file spec.js +5ms | ||
@cypress/grep suite and test names: [ 'hello world', 'works', 'works 2 @tag1', | ||
'works 2 @tag1 @tag2', 'works @tag2' ] +0ms | ||
cypress-grep found "works" in 1 specs +0ms | ||
cypress-grep [ 'spec.js' ] +0ms | ||
@cypress/grep found "works" in 1 specs +0ms | ||
@cypress/grep [ 'spec.js' ] +0ms | ||
``` | ||
|
||
### Debugging in the browser | ||
|
||
To enable debug console messages in the browser, from the DevTools console set `localStorage.debug='cypress-grep'` and run the tests again. | ||
To enable debug console messages in the browser, from the DevTools console set `localStorage.debug='@cypress/grep'` and run the tests again. | ||
|
||
![Debug messages](./images/debug.png) | ||
|
||
To see how to debug this plugin, watch the video [Debug cypress-grep Plugin](https://youtu.be/4YMAERddHYA). | ||
To see how to debug this plugin, watch the video [Debug @cypress/grep Plugin](https://youtu.be/4YMAERddHYA). | ||
|
||
## Examples | ||
|
||
|
@@ -595,11 +595,11 @@ The above scenario was confusing - did you want to find all tests with title con | |
|
||
### from v2 to v3 | ||
|
||
Version >= 3 of cypress-grep _only_ supports Cypress >= 10. | ||
Version >= 3 of @cypress/grep _only_ supports Cypress >= 10. | ||
|
||
## Small Print | ||
|
||
License: MIT - do anything with the code, but don't blame me if it does not work. | ||
|
||
Support: if you find any problems with this module, email / tweet / | ||
[open issue](https://github.com/cypress-io/cypress/issues) on Github | ||
[open issue](https://github.com/cypress-io/cypress/issues) on Github. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
system-tests/projects/nx-monorepo was this file added on accident?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed