Created
November 9, 2015 12:58
-
-
Save catehstn/f952306e09aa2d56f7d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)testSwipe { | |
[[app_ buttons][[SHAStrings galleryButtonTitleString]] tap]; | |
[[[app_ tables] buttons][@"Moments"] tap]; | |
[[[app_ collectionViews] cells][@"Photo, Landscape, August 08, 2012, 7:52 PM"] tap]; | |
[self verifyEditPageButtonsVisible]; | |
XCUIElement *element = [[[app_ scrollViews] childrenMatchingType:XCUIElementTypeOther] element]; | |
XCUIElement *imageButton = [[[element childrenMatchingType:XCUIElementTypeOther] | |
elementBoundByIndex:0] buttons][[SHAStrings processedImageA11yLabel]]; | |
[imageButton pressForDuration:1]; | |
XCUIElement *page1Of2PageIndicator = [app_ pageIndicators][@"page 1 of 2"]; | |
[page1Of2PageIndicator tap]; | |
XCUIElement *page2Of2PageIndicator = [app_ pageIndicators][@"page 2 of 2"]; | |
[page2Of2PageIndicator tap]; | |
[app_ swipeLeft]; | |
XCTAssertTrue([page2Of2PageIndicator isHittable]); | |
[app_ swipeRight]; | |
XCTAssertTrue([page1Of2PageIndicator isHittable]); | |
// Go back to Home Page. | |
[[[[[app_ navigationBars][@"Edit"] childrenMatchingType:XCUIElementTypeButton] | |
matchingIdentifier:@"Back"] elementBoundByIndex:0] tap]; | |
[self verifyHomePageButtons]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment