Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Unit Tests No Longer Launch App Fully #7047
This PR disconnects the WordPressAppDelegate when running the unit tests. This means that none of the app is really brought up into a running state (Analytics, Core Data, Reachability, etc). It results in both a quicker launch time for tests and also totally breaks any dependencies tests have on the state of the app as a whole.
The TestingAppDelegate class replaces WordPressAppDelegate inside of main.m when unit tests are running (specifically when the test bundle is injected and that class exists). The old main UI XIBs were deleted and replaced with an instantiation of the main UIWindow in the regular app delegate.
Things to Note
I'm seeing a bunch of constraint break warnings in the console but I'm not 100% sure this PR didn't introduce them. @frosty & @kurzee you may want to take a look as I've seen split VC mentioned in the warnings.
@jleandroperez I had to update the notifications manager test to bring up an instance of Helpshift to test the class. Make sure I didn't break anything or am giving the test false positive results.
left a comment
There's some known breaking constraints coming from Reader cells, and Post list cells. It should be those?
@astralbodies everything else looks good!