-
Notifications
You must be signed in to change notification settings - Fork 69
fix: tags no operator #1184
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: tags no operator #1184
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -674,6 +674,22 @@ describe("test-reader/test-parser", () => { | |
| assert.isTrue(filter(test)); | ||
| }); | ||
|
|
||
| it("installed filter should accept matched test with not operator and parent test for tags", async () => { | ||
| await parse_({ tag: compileTagFilter("!smoke") }); | ||
|
|
||
| const filter = TreeBuilder.prototype.addTestFilter.lastCall.args[0]; | ||
| const test = { | ||
| fullTitle: () => "Some name", | ||
| tags: new Map([["slow", false]]), | ||
| parent: { | ||
| fullTitle: () => "Some parent", | ||
| tags: new Map([["smoke", false]]), | ||
| }, | ||
| }; | ||
|
|
||
| assert.isFalse(filter(test)); | ||
| }); | ||
|
|
||
| it("installed filter should accept matched test with not operator for tags", async () => { | ||
| await parse_({ tag: compileTagFilter("!smoke&!slow") }); | ||
|
|
||
|
|
@@ -684,6 +700,10 @@ describe("test-reader/test-parser", () => { | |
| ["smoke", false], | ||
| ["slow", false], | ||
| ]), | ||
| parent: { | ||
| fullTitle: () => "Some parent", | ||
| tags: new Map([]), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't it be Also, as far as I can tell, the bug was that if parent has tag "smoke" and we ran testplane with
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we use map for understanding dynamic tag or not, in key we have a tag name in value true or false |
||
| }, | ||
| }; | ||
|
|
||
| assert.isFalse(filter(test)); | ||
|
|
||
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.
why keys()? I know it's an alias in set for values, or we actually use Map for
tags? It's becoming hard to follow, i think we should use either Map or Set everywhere for tags.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.
answered above