-
Notifications
You must be signed in to change notification settings - Fork 252
Support for different Size Classes #92
Comments
Hello @maremmle How do you run your tests now? If you run them on Xcode you can pick the device you want to build and test. If you run them on you CI tool, you will need specify on what device will the test run. One solution would be to create your own macro for these cases. For example:
Once you have your custom macro |
Hi @nscoding, thanks for your response. I was playing around in XCode … so I used the Simulator. I picked iPhone (compact width) but it did always rendered my view in regular width. The view itself is loaded from a XIB file via |
@maremmle That's an interesting problem but I haven't worked much with interface builder, can you please provide me with a sample project (with a similar load of nibs and tests) to debug this further? |
Sure … I will setup one up for you within the next days. |
@maremmle thank you for your time, much appreciated. |
@nscoding i have pushed a sampel app here https://github.com/maremmle/ios-snapshot-test-case_size_class_sample/. The I hope that helps. Feel free to get in touch if I can help otherwise. |
Hey @maremmle Thank you so much for this it was very helpful. It's very similar to #91 and it requires a window to load things correctly. So something like this should work for your case:
Can you try it? |
@nscoding thanks a lot for you help. It now works. Since you labeled it as a bug I am actually wondering if the Testcase maybe should take care of embedding the view into a window. Just a quick idea ;) |
@maremmle yes maybe the framework can control this but I am not yet sure, I'll keep the issue open. |
#100 is addressing this issue, I will now close the issue but please reopen if you think otherwise. |
Hey *,
I am wondering if / how it is possible to test a view in different Size Classes as we different constants and even constraints.
The text was updated successfully, but these errors were encountered: