Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

deviceAgnostic strictly enforces key window requirement unnecessarily #235

Open
alanzeino opened this issue Aug 11, 2017 · 2 comments
Open

Comments

@alanzeino
Copy link
Contributor

In our testing, host applications are not a hard requirement for snapshot tests. @bgerstle added this in #137. Would you object to me changing this code to not raise an exception?

In our setup, we have thousands of snapshot tests without host applications. But we cannot use deviceAgnostic to have OS–specific snapshot file names because fb_strictKeyWindow raises an exception if there is no key window.

From what I can tell, this window is used only to get the bounds to use in the file name. But when it is removed, the bounds used for the file name is 0x0.

Alternatively instead of removing the exception we can split deviceAgnostic into deviceAgnostic and osAgnostic, which would allow for leaving the exception since it might make sense to have non–zero sizes in those file names while still having the OS version in the path without the exception.

@kronik
Copy link

kronik commented Jan 11, 2018

I have the same issue. Can't figure out how to run this test properly with deviceAgnostic flag enabled. Any clues?

@alanzeino
Copy link
Contributor Author

We have this fixed in our fork which we're hoping to open soon (#245). In the meantime, you can just remove the NSException in fb_strictKeyWindow but you'll also have to fork.

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

No branches or pull requests

2 participants