-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Filter test cases by annotation text in HTML report #30751
Filter test cases by annotation text in HTML report #30751
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
packages/html-reporter/src/filter.ts
Outdated
@@ -45,6 +46,10 @@ export class Filter { | |||
labels.add(token); | |||
continue; | |||
} | |||
if (token.startsWith('a:')) { |
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.
a: would be ambiguous here (thing attachments, etc). How about "annot:"
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.
a: comment, otherwise looks good!
0ffa4ba
to
4f0e48d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
packages/html-reporter/src/filter.ts
Outdated
@@ -45,6 +46,10 @@ export class Filter { | |||
labels.add(token); | |||
continue; | |||
} | |||
if (token.startsWith('annot:')) { | |||
annotations.add(token.slice(6)); |
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.
annotations.add(token.slice(6)); | |
annotations.add(token.substring('annot:'.length)); |
packages/html-reporter/src/filter.ts
Outdated
|
||
if (this.annotations.length) { | ||
const matches = this.annotations.every(annotation => | ||
searchValues.annotations.some(_annotation => _annotation.includes(annotation))); |
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.
searchValues.annotations.some(_annotation => _annotation.includes(annotation))); | |
searchValues.annotations.some(a => a.includes(annotation))); |
@microsoft-github-policy-service agree |
Thanks! I'll merge it once the nits from the previous review are addressed. |
4f0e48d
to
2b2e958
Compare
Test results for "tests 1"1 flaky27056 passed, 609 skipped Merge workflow run. |
woohoo 🎉 |
Feature request : #30141
At Atlassian , we add team name , component name to annotations . If we want to search test case by teams on the HTML report we don't have any way .
In this PR , I had added the functionality to search by annotation .
Out of all tests there are two test cases with annotations .
If we just add to
author
in annotation search , both the test case appears .If we add
author=aman
only one test case appears . Same withauthor=alex