From 760d05819a347d707959179e13ef1bae6733e87f Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 7 Aug 2015 14:58:46 +0200 Subject: [PATCH] LinphoneUITester: add call contact with invalid phone number --- TestsUI/ContactsTester.m | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/TestsUI/ContactsTester.m b/TestsUI/ContactsTester.m index 0a23e3e1b..d18767a12 100644 --- a/TestsUI/ContactsTester.m +++ b/TestsUI/ContactsTester.m @@ -63,14 +63,23 @@ } [tester tapViewWithAccessibilityLabel:@"Edit"]; - [tester tapViewWithAccessibilityLabel:@"Back"]; } #pragma mark - Tests +- (void)testCallContactWithInvalidPhoneNumber { + NSString *contactName = [self getUUID]; + NSString *phone = @"+5 15 #0664;447*46"; + [self createContact:contactName lastName:@"dummy" phoneNumber:phone SIPAddress:nil]; + [tester tapViewWithAccessibilityLabel:[@"Linphone, " stringByAppendingString:phone]]; + [tester waitForViewWithAccessibilityLabel:[phone stringByAppendingString:@" not registered"]]; + [tester tapViewWithAccessibilityLabel:@"Dismiss"]; +} + - (void)testDeleteContact { NSString *contactName = [self getUUID]; [self createContact:contactName lastName:@"dummy" phoneNumber:@"0102030405" SIPAddress:[self me]]; + [tester tapViewWithAccessibilityLabel:@"Back"]; NSString *fullName = [contactName stringByAppendingString:@" dummy"]; @@ -138,8 +147,6 @@ NSString *fullName = [contactName stringByAppendingString:@" dummy"]; [self createContact:contactName lastName:@"dummy" phoneNumber:nil SIPAddress:nil]; - [tester tapViewWithAccessibilityLabel:fullName traits:UIAccessibilityTraitStaticText]; - /* Phone number */ NSArray *phones = @[ @"01234", @"56789" ]; [self addEntries:phones inSection:ContactSections_Number];