When running my KIF target regardless of how I write my KIFTestScenario or KIFTestStep they are returning the following error:
12:20:58.434 - Test that a user can successfully dismiss the welcome screens
12:24:53.208 - FAIL (209.11s): Tap screen at point "{10, 10}"
12:24:53.209 - FAILING ERROR: Error Domain=KIFTest Code=0 "Step threw exception:
*** -[__NSArrayM insertObject:atIndex:]:
object cannot be nil" UserInfo=0x842c1e0 {NSLocalizedDescription=Step threw exception: *** -[__NSArrayM insertObject:atIndex:]:
object cannot be nil}
12:24:53.210 - END OF SCENARIO (duration 223.62s)
As suggested, I've included the code I'm using:
TestController.m
#import "TestController.h"
#import "KIFTestScenario+Additions.h"
@implementation TestController
- (void)initializeScenarios;
{
[self addScenario:[KIFTestScenario scenarioToLogIn]];
}
@end
KIFTestScenario+Additions.m
#import "KIFTestScenario+Additions.h"
@implementation KIFTestScenario (Additions)
+ (id)scenarioToLogIn
{
KIFTestScenario *scenario = [KIFTestScenario scenarioWithDescription:@"Test that a user can successfully dismiss the welcome screens"];
KIFTestStep *step = [KIFTestStep stepToTapScreenAtPoint:CGPointMake(10.0f, 10.0f)];
[scenario addStep:step];
return scenario;
}
@end
I have walked through the debugger and the KIFTestStep I am adding to the scenario is non-nil and is a valid KIFTestStep.
Has anyone run into this problem before or have any thoughts on a fix?