From 121b709d22da6bfd70ded06ca2f26ef6b0d9a912 Mon Sep 17 00:00:00 2001 From: Guillaume BIENKOWSKI Date: Wed, 4 Mar 2015 22:27:54 +0100 Subject: [PATCH] Add a tester for contact edition --- KifTests/ContactsTester.m | 59 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/KifTests/ContactsTester.m b/KifTests/ContactsTester.m index a0a9a7838..8446da96b 100644 --- a/KifTests/ContactsTester.m +++ b/KifTests/ContactsTester.m @@ -46,11 +46,13 @@ if( lastName ) [self setText:lastName forContactHeaderIndex:1]; - if ( phone ) - [self setText:phone forContactNumbersIndex:0 inSection:ContactSections_Number]; + if ( phone ){ + [self setText:phone forContactNumbersIndex:0 inSection:ContactSections_Number]; + } - if (sip) + if ( sip ){ [self setText:sip forContactNumbersIndex:0 inSection:ContactSections_Sip]; + } [tester tapViewWithAccessibilityLabel:@"Edit"]; [tester tapViewWithAccessibilityLabel:@"Back"]; @@ -65,7 +67,7 @@ NSString* fullName = [contactName stringByAppendingString:@" dummy"]; - [tester tapViewWithAccessibilityLabel:@"Firstname, Lastname" value:fullName traits:UIAccessibilityTraitStaticText]; + [tester tapViewWithAccessibilityLabel:fullName traits:UIAccessibilityTraitStaticText]; [tester tapViewWithAccessibilityLabel:@"Edit"]; [tester scrollViewWithAccessibilityIdentifier:@"Contact numbers table" byFractionOfSizeHorizontal:0 vertical:-0.9]; @@ -75,4 +77,53 @@ [tester waitForAbsenceOfViewWithAccessibilityLabel:@"Firstname, Lastname" value:fullName traits:UIAccessibilityTraitStaticText]; } +- (void)addNumbersToSection:(NSInteger)section numbers:(NSArray*)numbers { + + [tester tapViewWithAccessibilityLabel:@"Edit"]; + for(NSInteger i = 0; i