From d07be216802e3278fa18a0f8d523ae08fad7d86c Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Thu, 18 Feb 2016 16:31:22 +0100 Subject: [PATCH] TestsUI: close popup if any after each test --- TestsUI/LinphoneTestCase.m | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/TestsUI/LinphoneTestCase.m b/TestsUI/LinphoneTestCase.m index db5b8ced7..97d8c387e 100644 --- a/TestsUI/LinphoneTestCase.m +++ b/TestsUI/LinphoneTestCase.m @@ -39,13 +39,22 @@ [LinphoneManager.instance removeAllAccounts]; // go to dialer - for (NSString *button in @[ @"Cancel", @"Back", @"Hangup", @"Dialer" ]) { + for (NSString *button in @[ @"Cancel", @"Back", @"Hangup", @"Continue", @"Dialer" ]) { if ([tester tryFindingTappableViewWithAccessibilityLabel:button error:nil]) { [tester tapViewWithAccessibilityLabel:button traits:UIAccessibilityTraitButton]; } } } +- (void)afterEach { + for (NSString *button in @[ @"Cancel", @"Back", @"Hangup", @"Continue", @"Dialer" ]) { + if ([tester tryFindingTappableViewWithAccessibilityLabel:button error:nil]) { + [tester tapViewWithAccessibilityLabel:button traits:UIAccessibilityTraitButton]; + } + } + [super afterEach]; +} + - (void)beforeEach { [[LinphoneManager instance] lpConfigSetInt:ORTP_WARNING forKey:@"debugenable_preference"]; [[LinphoneManager instance] lpConfigSetInt:NO forKey:@"animations_preference"];