@bahmutov/cy-grep 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +9 -0
- package/package.json +2 -2
- package/src/plugin.js +8 -1
package/README.md
CHANGED
@@ -119,6 +119,15 @@ registerCypressGrep()
|
|
119
119
|
|
120
120
|
Installing the plugin via `setupNodeEvents()` is required to enable the [grepFilterSpecs](#pre-filter-specs-grepfilterspecs) feature.
|
121
121
|
|
122
|
+
**Tip:** you probably want to set these `env` settings in your config file
|
123
|
+
|
124
|
+
```js
|
125
|
+
module.exports = defineConfig({
|
126
|
+
env: { grepFilterSpecs: true, grepOmitFiltered: true },
|
127
|
+
...
|
128
|
+
})
|
129
|
+
```
|
130
|
+
|
122
131
|
## Usage Overview
|
123
132
|
|
124
133
|
You can filter tests to run using part of their title via `grep`, and via explicit tags via `grepTags` Cypress environment variables.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@bahmutov/cy-grep",
|
3
|
-
"version": "1.3.
|
3
|
+
"version": "1.3.1",
|
4
4
|
"description": "Filter Cypress tests using title or tags",
|
5
5
|
"main": "src/support.js",
|
6
6
|
"scripts": {
|
@@ -20,7 +20,7 @@
|
|
20
20
|
"cypress-each": "^1.11.0",
|
21
21
|
"cypress-expect": "^2.5.3",
|
22
22
|
"prettier": "^2.8.1",
|
23
|
-
"semantic-release": "^20.0.
|
23
|
+
"semantic-release": "^20.0.4",
|
24
24
|
"typescript": "^4.7.4"
|
25
25
|
},
|
26
26
|
"peerDependencies": {
|
package/src/plugin.js
CHANGED
@@ -124,7 +124,14 @@ function cypressGrepPlugin(config) {
|
|
124
124
|
debug('effective test tags %o', testTags)
|
125
125
|
return Object.keys(testTags).some((testTitle) => {
|
126
126
|
const effectiveTags = testTags[testTitle].effectiveTags
|
127
|
-
|
127
|
+
const requiredTags = testTags[testTitle].requiredTags
|
128
|
+
return shouldTestRun(
|
129
|
+
parsedGrep,
|
130
|
+
null,
|
131
|
+
effectiveTags,
|
132
|
+
false,
|
133
|
+
requiredTags,
|
134
|
+
)
|
128
135
|
})
|
129
136
|
} catch (err) {
|
130
137
|
console.error('Could not determine test names in file: %s', specFile)
|