Skip to content
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

[Feature] Show expected and actual images in test results UI when test passes #23197

Open
mscottford opened this issue May 21, 2023 · 2 comments

Comments

@mscottford
Copy link

Context

When writing tests that compare screenshots using expect(locator).toHaveScreenshot(), the assertion's outcome is partly controlled by configuration values such as maxDiffPixelRatio. These configuration values can generate passing test results that the test author might consider a false positive. Or there might be inconsistencies between tests that are capturing a full-page image a different viewport sizes. Tests for larger viewports will be less sensitive to subtle changes than smaller viewport sizes.

Problem

The test results web UI currently only shows these results when the assertion fails.

Solution

To be able to determine if the configuration should be adjusted, there's value in being able to see the "actual" and "expected" images for screenshots assertions that have passed. As such, the test results UI should show the "actual" and "expected" images when a passing step is expanded in the test results UI.

@dgozman
Copy link
Contributor

dgozman commented May 23, 2023

@mscottford Are you using built-in html report? We do not save passed screenshots, because that would be expensive. Not sure how we could make this work to avoid significant performance issues for the average case. Perhaps an opt-in?

@mscottford
Copy link
Author

mscottford commented Jun 5, 2023 via email

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

No branches or pull requests

2 participants