Skip to content

fix(reporter): deduplicate tags when same tag appears in multiple scopes#40400

Open
abhi41289 wants to merge 1 commit intomicrosoft:mainfrom
abhi41289:fix-40368
Open

fix(reporter): deduplicate tags when same tag appears in multiple scopes#40400
abhi41289 wants to merge 1 commit intomicrosoft:mainfrom
abhi41289:fix-40368

Conversation

@abhi41289
Copy link
Copy Markdown

Summary

  • test.tags returned duplicate entries when the same @tag appeared in both a describe title and a test title (or across nested describe blocks)
  • Fixed by wrapping the result of get tags() in [...new Set(...)] in packages/playwright/src/common/test.ts
  • Added a test case to tests/playwright-test/test-tag.spec.ts covering describe+test title dedup and explicit { tag } dedup

Fixes #40368

When the same @tag appears in both a describe title and a test title
(or in nested describe blocks), test.tags returned it multiple times.
Wrap the result in Set to deduplicate.

Fixes microsoft#40368
@abhi41289
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Tags are duplicated in HTML report

1 participant