pivotal-legacy / PivotalCoreKit

Shared library and test code for iOS and macOS projects
http://pivotallabs.com
Other
168 stars 85 forks source link

-transitionFromVC:toVC:... SpecHelper stub behaves more like UIKit #182

Closed medmonds closed 8 years ago

medmonds commented 8 years ago

This change makes the 'pck_transitionFromViewController' SpecHelper stub behave more like the UIKit implementation. UIKit adds the incoming viewController's view to the outgoing viewController's view's superview. It also removes the outgoing viewController's view from its superview. Now 'pck_transitionFromViewController' does too.

medmonds commented 8 years ago

@akitchen Do you have any thoughts on this?

akitchen commented 8 years ago

Thanks for bumping this, @medmonds . I think it looks reasonable, but I'd like to get another set of eyes on it. /cc @wileykestner @cbguder @younata

briancroom commented 8 years ago

LGTM!

Also, it occurs to me while looking at this that it would be really cool if we could set up the test suite to run some of these tests against both our stubbed implementation and against Apple's (potentially with extra runloop spinning) to increase confidence that the stubs behave reasonably and continue do so as UIKit changes.

joemasilotti commented 8 years ago

Hmm, interesting @briancroom. I wonder if you could run the tests against Apple's code with UI Testing. Some explicit labels would need to be set so properties are exposed via accessibility, but I think it could work.

akitchen commented 8 years ago

If it's not strictly required, let's not introduce Apple's UI testing here.