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

WIP native visual regression testing #6920

Closed
wants to merge 4 commits into from

Conversation

drewvolz
Copy link
Member

@drewvolz drewvolz commented Feb 6, 2023

Playing with visual regression changes from screenshots!

While we could mock the library actions through jest, we’d be missing an opportunity to provide full testing coverage to this feature.

Testing with XCUITest gives us access to a full e2e flow with native views like the PHPickerViewController from apple that are not rendered within the view hierarchy and cannot be accessed by detox/jest.

Another bonus: PSPDFKit has some pretty cool posts on how to do pixel regression checking with thresholds on images!

Todo

  • Regression checking as-is assumes we want images to be the same, but for changing the background image we want them to be different. So the errors thrown revolve around threshold minimums which fail when an image is different up to a certain amount of pixels. We need to invert the expectation that an image should fail if it is different for this test case

📸 Screenshots

~ ~
09B34699-EA08-4363-AB5A-803D39D469E7 1C1A415F-E82B-4401-9024-AD8C054E4947

@drewvolz
Copy link
Member Author

Closing in favor of #6952

@drewvolz drewvolz closed this Feb 18, 2023
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.

1 participant