Skip to content
This repository was archived by the owner on Mar 29, 2023. It is now read-only.

Commit 3d22715

Browse files
committed
add test for issue #92
1 parent ca58e2d commit 3d22715

File tree

7 files changed

+44
-0
lines changed

7 files changed

+44
-0
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,22 @@ jobs:
183183
--env grepTags=@smoke \
184184
--expect expects/describe-tags-spec.json
185185
186+
# several specs with tags using OR condition
187+
# https://github.com/cypress-io/cypress-grep/issues/92
188+
- name: Tags OR specs 🧪
189+
run: |
190+
npx cypress-expect \
191+
--config testFiles="tags/*.spec.js" \
192+
--env grepTags="high smoke" \
193+
--expect-exactly expects/tags-or.json
194+
195+
- name: Tags AND specs 🧪
196+
run: |
197+
npx cypress-expect \
198+
--config testFiles="tags/*.spec.js" \
199+
--env grepTags="high+smoke" \
200+
--expect-exactly expects/tags-and.json
201+
186202
- name: Specify is an alias to it 🧪
187203
run: |
188204
npx cypress-expect \

cypress/integration/tags/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Testing tags
2+
3+
Test case for [#92](https://github.com/cypress-io/cypress-grep/issues/92)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="cypress" />
2+
3+
it('Test 1', { tags: ['smoke', 'regression'] }, () => {
4+
expect(true).to.be.true
5+
})
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="cypress" />
2+
3+
it('Test 2', { tags: ['high', 'smoke'] }, () => {
4+
expect(true).to.be.true
5+
})
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="cypress" />
2+
3+
it('Test 3', { tags: ['smoke'] }, () => {
4+
expect(true).to.be.true
5+
})

expects/tags-and.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"Test 1": "pending",
3+
"Test 2": "passing",
4+
"Test 3": "pending"
5+
}

expects/tags-or.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"Test 1": "passing",
3+
"Test 2": "passing",
4+
"Test 3": "passing"
5+
}

0 commit comments

Comments
 (0)