Skip to content

Commit

Permalink
Apply dismissPopover fix from master.
Browse files Browse the repository at this point in the history
Resolves issue #237.
  • Loading branch information
bnickel committed Sep 9, 2013
1 parent 94933b2 commit 5adf71d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Classes/KIFUITestActor.m
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,11 @@ - (void)setValue:(float)value forSliderWithAccessibilityLabel:(NSString *)label
- (void)dismissPopover
{
const NSTimeInterval tapDelay = 0.05;
NSArray *windows = [[UIApplication sharedApplication] windowsWithKeyWindow];
if (!windows.count) {
[self failWithError:[NSError KIFErrorWithFormat:@"Failed to find any windows in the application"] stopTest:YES];
UIWindow *window = [[UIApplication sharedApplication] dimmingViewWindow];
if (!window) {
[self failWithError:[NSError KIFErrorWithFormat:@"Failed to find any dimming views in the application"] stopTest:YES];
}
UIView *dimmingView = [[windows[0] subviewsWithClassNamePrefix:@"UIDimmingView"] lastObject];
UIView *dimmingView = [[window subviewsWithClassNamePrefix:@"UIDimmingView"] lastObject];
[dimmingView tapAtPoint:CGPointMake(50.0f, 50.0f)];
CFRunLoopRunInMode(kCFRunLoopDefaultMode, tapDelay, false);
}
Expand Down

0 comments on commit 5adf71d

Please sign in to comment.