-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
How to remove duplicate screenshot name from report? #16456
Comments
Is the issue that the text is repeated (like you have in the screenshot above), or is the issue if you call attach multiple times:
you end up with multiple screenshots in the report? Both? Regardless, looks like we need to clean up the repetition and/or formatting that is observed in your screenshot! Thanks for pointing it out! |
@rwoll So I have this type of code repeated throughout my tests...
But nowhere that I am making a double call to attach, as you mentioned...
It is only taking one screenshot, but listing the name as a link and as a text element right after the link. Here's the markup being emitted by the report...
|
Fixes microsoft#16456. The extra span/name was coming from https://github.com/microsoft/playwright/blob/077b8a928960493a4cf275bc4fc4d4176b2a6098/packages/html-reporter/src/links.tsx#L72 (in conjunction with the line above it). These two lines assume `path` and `body` are mutally exclusive. Regression likely introduced by the PR that added the now removed line microsoft#10778.
Fixes #16456. The extra span/name was coming from https://github.com/microsoft/playwright/blob/077b8a928960493a4cf275bc4fc4d4176b2a6098/packages/html-reporter/src/links.tsx#L72 (in conjunction with the line above it). These two lines assume `path` and `body` are mutally exclusive. Regression likely introduced by the PR that added the now removed line #10778.
When I add screenshots to a test, the test report displays the name twice. While, functionally, this isn't an issue, the detail oriented part of me is annoyed by this :)
I have tried specifying the path when taking a screenshot, and that does not produce the duplicate file name in the report, however, I want to use the default behavior in Playwright for taking screenshots, as it cleans up the screenshot directory every time the tests are run.
The text was updated successfully, but these errors were encountered: