-
Notifications
You must be signed in to change notification settings - Fork 576
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
Use keyboardLayoutGuide #859
Comments
I found out that it does work if a safe area is defined with any non null bottom value. Works: assertSnapshot(matching: vc, as: .image(on: .init(safeArea: .init(top: 0, left: 0, bottom: 1, right: 0), size: .init(width: 375, height: 812)))) Does not work: assertSnapshot(matching: vc, as: .image(on: .init(safeArea: .init(top: 0, left: 0, bottom: 0, right: 0), size: .init(width: 375, height: 812)))) Since all predefined configs have a safe area, this issue should not happen when these are used: assertSnapshot(matching: vc, as: .image(on: .iPhoneX)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When trying to use Keyboard Layout Guide it seems that the keyboard layout is not set (at top with no height) and the resulting screenshot is incorrect therefore. I am aware that for screenshot tests there is no keyboard, but my expectation would have been that the keyboard layout then matches the bottom part below the safe area (in other words keyboard layout top = safe area bottom). This would be in line with what Apple documents:
Example:
It correctly works when replacing the keyboard layout guide:
How do you use keyboard layout guide in snapshot tests? Is it possible to somehow set the keyboard layout guide in tests? Or are you using the keyboard layout guide differently (maybe always in combination with safe area layout guide)?
The text was updated successfully, but these errors were encountered: