KIF not detecting changes in UINavigationController stack

56 Views Asked by At

I'm trying to get started writing UI tests using KIF because I want to make sure our navigation flow works.

It seems that KIF is not detecting changes in the UINavigationController. I have one view controller in a UINavigationController with a UIButton titled Button0. I have a second view controller with another UIButton titled Button1. On tap of Button0, it navigates to the second view controller. I wrote the following test to verify that the second view controller is being shown:

- (void)testTrySomeStuff
{
    [tester tapViewWithAccessibilityLabel:@"Button0"];
    [tester waitForViewWithAccessibilityLabel:@"Button1"];
}

When I present the second view controller modally on button tap, the following test passes. However, if I push it onto the UINavigationController stack, the test fails. Is there a workaround for the failure in the case of the UINavigationController, or am I missing something?

0

There are 0 best solutions below