Skip to content

Commit cbf90e4

Browse files
author
Justin Martin
committed
Set .25s min for animation stabilization wait time, regardless of layer speed
When animations are set to 100x speed, the text field popover control is presented without animations. This causes issues in the call to waitForAnimations, because the presentation still happens after some delay. This is a crude hack to prevent significantly sped up animations from failing to tap on popovers.
1 parent e263dac commit cbf90e4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Sources/KIF/Classes/KIFUITestActor.m

+1-2
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,8 @@ - (void)waitForAnimationsToFinishWithTimeout:(NSTimeInterval)timeout stabilizati
230230
[self waitForTimeInterval:maximumWaitingTimeInterval relativeToAnimationSpeed:YES];
231231
}
232232
} else {
233-
234233
// Wait for the view to stabilize and give them a chance to start animations before we wait for them.
235-
[self waitForTimeInterval:stabilizationTime relativeToAnimationSpeed:YES];
234+
[self waitForTimeInterval:MAX(stabilizationTime / [UIApplication sharedApplication].animationSpeed, 0.25) relativeToAnimationSpeed:NO];
236235
maximumWaitingTimeInterval -= stabilizationTime;
237236

238237
NSTimeInterval startTime = [NSDate timeIntervalSinceReferenceDate];

0 commit comments

Comments
 (0)