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

On failure, the reference image uses the wrong DPI, resulting in bizarre diff image #190

Open
acecilia opened this issue Oct 3, 2023 · 2 comments

Comments

@acecilia
Copy link

acecilia commented Oct 3, 2023

👋

I am using latest version 8.0. I have configured the following:

fileNameOptions = .none

When recording, the framework generates the image correctly. The generated image is:

  • test_iconWithLabel.png, 600 × 200 pixels, 144 pixels/inch

When having a test failure in the same image, these are the generated failure diff images:

  • diff_test_iconWithLabel.png, 1200 × 400 pixels, 144 pixels/inch
  • failed_test_iconWithLabel.png, 600 × 200 pixels, 144 pixels/inch
  • reference_test_iconWithLabel.png, 600 × 200 pixels, 72 pixels/inch

As you can see:

  • The DPI of the reference_test_iconWithLabel.png image does not match the DPI of the test_iconWithLabel.png recorded image
  • The diff_test_iconWithLabel.png contains the following very unexpected content:
Screenshot 2023-10-03 at 17 18 40

Find all images attached here: Images.zip

@acecilia
Copy link
Author

acecilia commented Oct 3, 2023

Similar thing (but not the same) reported in #99 (comment)

@acecilia acecilia changed the title On failure the reference image uses the wrong DPI, resulting in bizarre diff image On failure, the reference image uses the wrong DPI, resulting in bizarre diff image Oct 3, 2023
@roman-stetsenko-reed
Copy link

Yeah, same for me.
Looks like library ignore reference image resolution and use suffix to decide if it 72 or 144
No issue if fileNameOptions has .screenScale

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

No branches or pull requests

2 participants