LinphoneUITester: try to robustify tests by going to dialer before starting tests

This commit is contained in:
Gautier Pelloux-Prayer 2015-07-09 11:12:55 +02:00
parent 8439dab45a
commit c86c615044
3 changed files with 16 additions and 10 deletions

View file

@ -2050,7 +2050,6 @@ static void audioRouteChangeListenerCallback (
if( linphone_core_payload_type_is_vbr(theLinphoneCore, pt) ) {
linphone_core_set_payload_type_bitrate(theLinphoneCore, pt, bitrate);
}
codec = codec->next;
}
}

View file

@ -229,6 +229,8 @@
- (void)testRemoveAllChats {
NSArray *uuids = [self getUUIDArrayOfSize:5];
[self removeAllRooms];
for (NSString *uuid in uuids) {
[self startChatWith:uuid];
[self sendMessage:@"Test"];

View file

@ -26,6 +26,20 @@
linphone_core_set_log_level(ORTP_WARNING);
}
- (void)beforeAll {
[super beforeAll];
#if TARGET_IPHONE_SIMULATOR
[tester acknowledgeSystemAlert]; // Contact access alert
[tester acknowledgeSystemAlert]; // Local notification / badge alert
#endif
// go to dialer
for (NSString *button in @[ @"Cancel", @"Back", @"Dialer" ]) {
if ([tester tryFindingTappableViewWithAccessibilityLabel:button error:nil]) {
[tester tapViewWithAccessibilityLabel:button traits:UIAccessibilityTraitButton];
}
}
}
- (NSString *)me {
return @"testios";
}
@ -46,15 +60,6 @@
return array;
}
- (void)beforeAll{
#if TARGET_IPHONE_SIMULATOR
[tester acknowledgeSystemAlert]; // Contact access alert
[tester acknowledgeSystemAlert]; // Local notification / badge alert
#endif
[super beforeAll];
}
static bool invalidAccount = true;
- (void)setInvalidAccountSet:(BOOL)invalidAccountSet {