Skip to content

Instantly share code, notes, and snippets.

@pi-chan
Created December 12, 2013 15:01
Show Gist options
  • Save pi-chan/7929375 to your computer and use it in GitHub Desktop.
Save pi-chan/7929375 to your computer and use it in GitHub Desktop.
#import <KIF/KIF.h>
@interface NavigationTests : KIFTestCase
@end
@implementation NavigationTests
- (void)testTab1
{
[tester tapViewWithAccessibilityLabel:@"Tab1"];
[tester tapViewWithAccessibilityLabel:@"Tab1"];
[tester waitForViewWithAccessibilityLabel:@"FirstPageLabel"];
[tester waitForViewWithAccessibilityLabel:@"firstpage"];
[tester waitForViewWithAccessibilityLabel:@"NextPageButton"];
[tester tapViewWithAccessibilityLabel:@"NextPageButton"];
[tester waitForViewWithAccessibilityLabel:@"SecondPageLabel"];
[tester waitForViewWithAccessibilityLabel:@"secondpage"];
// Back
[tester tapViewWithAccessibilityLabel:@"firstpage"];
[tester waitForViewWithAccessibilityLabel:@"NextPageButton"];
[tester tapViewWithAccessibilityLabel:@"NextPageButton"];
[tester waitForViewWithAccessibilityLabel:@"SecondPageLabel"];
[tester waitForViewWithAccessibilityLabel:@"secondpage"];
// Back, another way
[tester tapViewWithAccessibilityLabel:@"Back"];
}
- (void)testTab2
{
[tester tapViewWithAccessibilityLabel:@"タブ2"];
[tester tapViewWithAccessibilityLabel:@"タブ2"];
[tester waitForViewWithAccessibilityLabel:@"AlertButton"];
[tester tapViewWithAccessibilityLabel:@"AlertButton"];
[tester waitForViewWithAccessibilityLabel:@"OK"];
[tester waitForViewWithAccessibilityLabel:@"キャンセル"];
[tester tapViewWithAccessibilityLabel:@"キャンセル"];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment