Skip to content

Conversation

@agamjots05
Copy link
Contributor

@agamjots05 agamjots05 commented Mar 15, 2025

fixes #34052

Before:
before

After:
Not Showing Snippets:
afterNotShowing

Showing Snippets
afterShowing

agamjots05 and others added 2 commits March 14, 2025 20:29
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>
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

Test results for "tests 1"

3 flaky ⚠️ [firefox-page] › tests/page/page-evaluate.spec.ts:403:3 › should throw for too deep reference chain @firefox-ubuntu-22.04-node18
⚠️ [playwright-test] › tests/ui-mode-trace.spec.ts:341:5 › should work behind reverse proxy @macos-latest-node18-1
⚠️ [webkit-page] › tests/page/page-screenshot.spec.ts:345:5 › page screenshot › should work while navigating @webkit-ubuntu-22.04-node18

38771 passed, 808 skipped
✔️✔️✔️

Merge workflow run.

@agamjots05 agamjots05 changed the title feat(playwright-html-report): added checkbox for enabling/disabling html snippets to Playwright Report feat(playwright-html-report): added global checkbox for enabling/disabling html snippets to Playwright Report Mar 16, 2025
@agamjots05 agamjots05 marked this pull request as draft March 17, 2025 22:43
@agamjots05 agamjots05 marked this pull request as ready for review March 17, 2025 22:43
Copy link
Contributor

@dgozman dgozman left a 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();
Copy link
Contributor

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.

@Skn0tt
Copy link
Member

Skn0tt commented Mar 31, 2025

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?

@agamjots05
Copy link
Contributor Author

agamjots05 commented Apr 1, 2025

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?

Two questions:

  1. When you say an options dialog, do you mean something like a cog icon on the edge of the screen? Similar to that on the trace viewer?

    Ex. CogIcon on Trace Report

    Screenshot 2025-03-31 at 7 19 11 PM
  2. Regarding a potential solution using an iconbutton, I got stuck figuring out how we can convey that a singular iconbutton will disable/enable code snippets

@Skn0tt
Copy link
Member

Skn0tt commented Apr 1, 2025

A cog icon on the right of the screen could work, yes. Try it out and see if you like the feel of it!

@pavelfeldman
Copy link
Member

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.

@dgozman
Copy link
Contributor

dgozman commented Apr 28, 2025

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!

@dgozman dgozman closed this Apr 28, 2025
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.

[Feature]: Add a parameter in the test.step() method to hide code in report

5 participants