generated from mmisty/cypress-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
85 additions
and
13 deletions.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { registerTags } from 'cy-local/setup'; | ||
|
||
Cypress.env('cyTagsShowTagsInTitle', false); | ||
registerTags(); | ||
|
||
describe('should keep tags in object when inline tags and show taga is false', () => { | ||
it('one @tag("info1")', function () { | ||
expect(this.test?.tags).to.deep.eq([{ tag: '@tag', info: ['info1'] }]); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { tag } from 'cy-local/utils/tags'; | ||
import { registerTags } from 'cy-local/setup'; | ||
|
||
[true, false].forEach(cyTagsShowTagsInTitle => { | ||
Cypress.env('cyTagsShowTagsInTitle', cyTagsShowTagsInTitle); | ||
registerTags(); | ||
|
||
describe(`should have proper infos when cyTagsShowTagsInTitle is ${cyTagsShowTagsInTitle}`, () => { | ||
it('one @tag("info1")', function () { | ||
expect(this.test?.tags).to.deep.eq([{ tag: '@tag', info: ['info1'] }]); | ||
}); | ||
|
||
it('several @tag("info1","info2")', function () { | ||
expect(this.test?.tags).to.deep.eq([{ tag: '@tag', info: ['info1', 'info2'] }]); | ||
}); | ||
|
||
it('several with spaces @tag("info1 one", "info2 two")', function () { | ||
console.log(this.test?.tags); | ||
expect(this.test?.tags).to.deep.eq([{ tag: '@tag', info: ['info1 one', 'info2 two'] }]); | ||
}); | ||
|
||
it('one with spaces @tag("some info with spaces")', function () { | ||
expect(this.test?.tags).to.deep.eq([{ tag: '@tag', info: ['some info with spaces'] }]); | ||
}); | ||
|
||
it('one with special symbols', { tags: [{ tag: '@tag', info: ['Special symbol $%^@@$`'] }] }, function () { | ||
console.log(this.test?.tags); | ||
expect(this.test?.tags).to.deep.eq([{ tag: '@tag', info: ['Special symbol $%^@@$`'] }]); | ||
}); | ||
|
||
it(`one with special symbols (helper for title) ${tag('tag', 'Special symbol $%^@@$`')} `, function () { | ||
expect(this.test?.tags).to.deep.eq([{ tag: '@tag', info: ['Special symbol $%^@@$`'] }]); | ||
}); | ||
}); | ||
}); |
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