You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I currently have a set of KIF tests that run against a viewcontroller I acquired from the TDSemiModal github project. However, these tests fail because the viewcontroller I am consuming has an animation that runs for 0.7 seconds:
+ (id)stepToTapViewWithAccessibilityLabel:(NSString *)label value:(NSString *)value traits:(UIAccessibilityTraits)traits;
{
NSString *description = nil;
if (value.length) {
description = [NSString stringWithFormat:@"Tap view with accessibility label \"%@\" and accessibility value \"%@\"", label, value];
} else {
description = [NSString stringWithFormat:@"Tap view with accessibility label \"%@\"", label];
}
// After tapping the view we want to wait a short period to allow things to settle (animations and such). We can't do this using CFRunLoopRunInMode() because certain things, such as the built-in media picker, do things with the run loop that are not compatible with this kind of wait. Instead we leverage the way KIF hooks into the existing run loop by returning "wait" results for the desired period.
const NSTimeInterval quiesceWaitInterval = 0.5;
__block NSTimeInterval quiesceStartTime = 0.0;
// ...
}
Since the problematic code is coming from an external library, I "should not" be modifying that code. Is there an alternative way to set the wait time for animations in KIF, or should this functionality be added?
The text was updated successfully, but these errors were encountered:
I'm not sure I see the value in increasing the complexity of the API for this. The quiesce time is the typical minimum time it takes for something animations to take place. You could follow this with a [KIFTestStep stepToWaitForTimeInterval:0.3 description:@"Waiting for animations to complete"] or wait for the view to disappear with stepToWaitForAbscenceOfViewWithAccessibilityLabel:
I currently have a set of KIF tests that run against a viewcontroller I acquired from the TDSemiModal github project. However, these tests fail because the viewcontroller I am consuming has an animation that runs for 0.7 seconds:
From looking at the KIF code, I see that that the default wait time for animations to run is set to 0.5:
Since the problematic code is coming from an external library, I "should not" be modifying that code. Is there an alternative way to set the wait time for animations in KIF, or should this functionality be added?
The text was updated successfully, but these errors were encountered: