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 am present UIAlertViewController as actionsheet and want to capture reference images for this. But action sheet not getting display on reference image. Please below code which I am using:
I am present UIAlertViewController as actionsheet and want to capture reference images for this. But action sheet not getting display on reference image. Please below code which I am using:
XCTestExpectation *expectation = [self expectationWithDescription:@"Alert Action"];
__block UIViewController *alertViewController = [[UIApplication sharedApplication] keyWindow].rootViewController;
[alertViewController.view setBackgroundColor:[UIColor blackColor]];
[self loadAlertViewOn:alertViewController Withhandler:^{
if ([[alertViewController presentedViewController] isKindOfClass:[UIAlertController class]]) {
[expectation fulfill];
}
}];
[self waitForExpectationsWithTimeout:10.0 handler:^(NSError *error) {
if (error) {
XCTFail(@"^^ Fail due to timeout Error");
}
}];
FBSnapshotVerifyView(alertViewController.view, nil);
}
-(void)loadAlertViewOn:(UIViewController *)baseViewCtrl Withhandler:(void(^)(void))completionHandler {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Demo" message:nil preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) {
//action when pressed button
}];
}
Please let me know what wrong I am doing here?
The text was updated successfully, but these errors were encountered: