-
Notifications
You must be signed in to change notification settings - Fork 675
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
Fix Screenshots in macOS Safari - adapt to rounded corners #8161
Conversation
Regarding Tests: functional tests seem unstable on my machine, therefore I hope to get better results on the functional test from TestCafes Test Actions on GitHub. |
Hmm. Looking at the failed tests, the test machine seems to either also have/emulate a retina screen or to use a color profile other than sRGB. The test looks at the corners of the screenshot, at coordinates inferred from the set size. If the color profile is set to something else than sRGB then the RGB color values don't match - the red box is red, but not exactly the expected value of #FF0000. @PavelMor25 can you check the specs of the macOS machine for me? Also: I don't understand why the Docker tests fail. |
Hello @htho, Thank you for your pull request. We will review it. The
Regarding Docker tests, you need to merge the latest changes from the master branch. This should fix the tests. |
@PavelMor25 is it possible for your, to trigger the tests? |
Hello @htho, We have reviewed the pull request. Could you please revert the tests to their original state and retain only changes to the |
@PavelMor25 I reset my branch to the commit that changes Are you sure, you also want me to remove the commit that parameterizes the server tests? |
For future reference, this is a branch with the additional changes I made to fix functional tests for Safari, including adjustments for Retina screens, and color profiles: https://github.com/htho/testcafe/commits/fix-functional-safari-tests |
great thanks! |
Purpose
#8154 addresses the issue, where screenshots are not cropped on macOS (14) Safari.
The problem is, that the screenshot mark can not be found.
This is because part of the mark is not visible because of the rounded corners in macOS.
Approach
The solution is to increase
MARK_RIGHT_MARGIN
insrc/screenshots/constants.js
.I found that
25
is the lowest value that works for all resolutions I was able to test.MARK_RIGHT_MARGIN
.I enabled the screenshot-tests that were skipped in the safari browserfix testsretina awarecolor-profile awareReferences
#8154
Pre-Merge TODO