Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
- (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
You can’t perform that action at this time.