Skip to content

Instantly share code, notes, and snippets.

@catehstn
Created November 9, 2015 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save catehstn/8a751790021e2156da53 to your computer and use it in GitHub Desktop.
Save catehstn/8a751790021e2156da53 to your computer and use it in GitHub Desktop.
- (void)testRotateHomeScreen {
XCUIDevice *device = [XCUIDevice sharedDevice];
[self verifyHomePageButtons];
[device setOrientation:UIDeviceOrientationLandscapeRight];
[self verifyHomePageButtons];
[device setOrientation:UIDeviceOrientationPortraitUpsideDown];
[self verifyHomePageButtons];
[device setOrientation:UIDeviceOrientationLandscapeLeft];
[self verifyHomePageButtons];
[device setOrientation:UIDeviceOrientationPortrait];
[self verifyHomePageButtons];
}
- (void)verifyHomePageButtons {
XCUIElement *cameraButton = [app_ buttons][[SHAStrings cameraButtonTitleString]];
XCTAssertTrue([cameraButton exists]);
XCTAssertTrue([cameraButton isHittable]);
XCUIElement *galleryButton = [app_ buttons][[SHAStrings galleryButtonTitleString]];
XCTAssertTrue([galleryButton exists]);
XCTAssertTrue([galleryButton isHittable]);
XCUIElement *inspireButton = [app_ buttons][[SHAStrings inspireButtonTitleString]];
XCTAssertTrue([inspireButton exists]);
XCTAssertTrue([inspireButton isHittable]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment