Skip to content

Commit 424ed5f

Browse files
author
Justin Martin
committed
Up the default animation waiting timeout from .5s to 2s
It doesn't really make sense that the default animation wait time is the same as the stabilization time. This effectively means the behavior of scanning the UI hierarchy for animations in progress is never utilized for most tests out of the box. For what its worth, we've used a 2s animation wait time and .1s stabilization time as our defaults for a very long time. This should generally not slow down any tests if there weren't any animations in progress. If there were animations in progress, this is probably a worthwhile tradeoff to make things more reliable. This can still be configured globally to be overidden. As part of this change, use `waitForAnimationsToFinish` in place of a static .5s sleep for the `longPress` action. There will be a followup PR #1301 that should speed up some scenarios where we're waiting longer than desired for animations to complete.
1 parent 1550322 commit 424ed5f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/KIF/Classes/KIFTestActor.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ - (void)runBlock:(KIFTestExecutionBlock)executionBlock
131131

132132
#pragma mark Class Methods
133133

134-
static NSTimeInterval KIFTestStepDefaultAnimationWaitingTimeout = 0.5;
134+
static NSTimeInterval KIFTestStepDefaultAnimationWaitingTimeout = 2.0;
135135
static NSTimeInterval KIFTestStepDefaultAnimationStabilizationTimeout = 0.5;
136136
static NSTimeInterval KIFTestStepDefaultMainThreadDispatchStabilizationTimeout = 0.5;
137137
static NSTimeInterval KIFTestStepDefaultTimeout = 10.0;

Sources/KIF/Classes/KIFUITestActor.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ - (void)longPressAccessibilityElement:(UIAccessibilityElement *)element inView:(
467467
}];
468468

469469
// Wait for view to settle.
470-
[self waitForTimeInterval:0.5 relativeToAnimationSpeed:YES];
470+
[self waitForAnimationsToFinish];
471471
}
472472

473473
- (void)waitForKeyboard

0 commit comments

Comments
 (0)