cypress-plugin-grep-boxes 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,6 +17,7 @@ A companion Cypress plugin for <code>cy-grep</code> that allows user to run spec
|
|
|
17
17
|
- [Installation](#-installation)
|
|
18
18
|
- [Setup](#-setup)
|
|
19
19
|
- [Open mode](#-open-mode)
|
|
20
|
+
- [Use Required Test Tags Instead Of Skipping Tests](#use-required-test-tags-instead-of-skipping-tests)
|
|
20
21
|
- [Contributions](#contributions)
|
|
21
22
|
|
|
22
23
|
---
|
|
@@ -66,6 +67,29 @@ Within each spec, you can select any given number of suite(s) or individual test
|
|
|
66
67
|
|
|
67
68
|

|
|
68
69
|
|
|
70
|
+
### Use Required Test Tags Instead Of Skipping Tests
|
|
71
|
+
|
|
72
|
+
> [!NOTE]
|
|
73
|
+
> Read more about this topic within a blog post [Use Required Test Tags Instead Of Skipping Tests](https://glebbahmutov.com/blog/required-tags-instead-of-skipped-tests/) and within the [README for `@bahmutov/cy-grep`](https://github.com/bahmutov/cy-grep#required-tags).
|
|
74
|
+
|
|
75
|
+
Normally, any Cypress test or suite of tests marked with a `.skip` will be shown when running tests or within the Cypress test runner UI.
|
|
76
|
+
|
|
77
|
+
Since this plugin uses `@bahmutov/cy-grep` plugin, we can instead designate skipped tests using a **required tag**:
|
|
78
|
+
|
|
79
|
+
```js
|
|
80
|
+
it('deletes an item', { requiredTags: '@skip' }, () => {
|
|
81
|
+
expect(1).to.equal(2);
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Now running or opening Cypress in interactive mode, **you will not see any tests with `requiredTags` including `@skip`** (unless setting environment variable `grepTags=@skip`).
|
|
86
|
+
|
|
87
|
+
To run just those tests with the required tag `@skip` in interactive mode:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npx cypress open --env grepTags=@skip
|
|
91
|
+
```
|
|
92
|
+
|
|
69
93
|
## Contributions
|
|
70
94
|
|
|
71
95
|
Feel free to open a pull request or drop any feature request or bug in the [issues](https://github.com/dennisbergevin/cypress-plugin-grep-boxes/issues).
|