-
Notifications
You must be signed in to change notification settings - Fork 4.9k
feat(playwright-html-report): added global checkbox for enabling/disabling html snippets to Playwright Report #35203
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
Conversation
Added functionality such that enabling the checkbox shows snippets, while disabling, hides snippets Co-authored-by: Asher Alacar <asher.alacar@gmail.com> Co-authored-by: Jiayi Chen <chenjiayi484@gmail.com>
…box state Co-authored-by: Agamjot Singh <agamjot.singh@gmail.com> Co-authored-by: Jiayi Chen <chenjiayi484@gmail.com>
This comment has been minimized.
This comment has been minimized.
Test results for "tests 1"3 flaky38771 passed, 808 skipped Merge workflow run. |
dgozman
left a comment
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.
@agamjots05 Could you please include a screenshot that demonstrates the new feature? It is particularly important for UI changes, because it's hard to assess otherwise.
| await thirdTreeItem.click(); | ||
|
|
||
| const codeSnippets = page.locator('[data-testid="test-snippet"]'); | ||
| await expect(codeSnippets.first()).toBeVisible(); |
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.
It is better to use toHaveCount(3) with the right number here, and toHaveCount(0) to check that snippets are hidden.
|
I don't like having this checkbox so front-and-center. Maybe we could have it in an options dialog, or use an iconbutton that doesn't take up as much visual space? |
|
A cog icon on the right of the screen could work, yes. Try it out and see if you like the feel of it! |
|
Check out my comment on the issue. I don't think we need a setting in the UI for now, we can start with an html report option. |
|
I'll close this for now, since the new approach is to have a config option. We can always reopen if needed. Thank you for the PR! |

fixes #34052
Before:

After:

Not Showing Snippets:
Showing Snippets
