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
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@color/processed_image_background"> | |
<ImageView | |
android:id="@+id/processed_image" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" |
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
#import "ProcessImageTest.h" | |
#import "SHAStrings.h" | |
@interface ProcessImageTest () | |
// Dismiss the gallery once it has been opened. | |
- (void)cancelGallery; | |
// Sequence that results in two pictures in the results view. | |
- (void)choosePictureAndProcessSequence; | |
// Sequence that results in a picture in the edit view. |
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]; |
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)testChangeImageFromEditPage { | |
[[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 *navBar = [app_ navigationBars][[SHAStrings imageEditingViewControllerTitle]]; | |
[[navBar buttons][[SHAStrings galleryButtonA11yLabel]] tap]; | |
[[[app_ tables] buttons][@"Camera Roll"] tap]; | |
[[[app_ collectionViews] cells][@"Photo, Landscape, March 12, 2011, 4:17 PM"] tap]; |
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)testChangeAccuracySlider { | |
[[app_ buttons][[SHAStrings galleryButtonTitleString]] tap]; | |
[[[app_ tables] buttons][@"Moments"] tap]; | |
[[[app_ collectionViews] cells][@"Photo, Landscape, August 08, 2012, 7:52 PM"] tap]; | |
XCUIElement *slider = [app_ sliders][[SHAStrings accuracySliderA11yLabel]]; | |
[slider tap]; | |
// Go back to Home Page. | |
[[[[[app_ navigationBars][@"Edit"] childrenMatchingType:XCUIElementTypeButton] |
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)testChooseImageAndRotate { | |
XCUIDevice *device = [XCUIDevice sharedDevice]; | |
[[app_ buttons][[SHAStrings galleryButtonTitleString]] tap]; | |
[[[app_ tables] buttons][@"Moments"] tap]; | |
[[[app_ collectionViews] cells][@"Photo, Landscape, August 08, 2012, 7:52 PM"] tap]; | |
[self verifyEditPageButtonsVisible]; | |
[device setOrientation:UIDeviceOrientationLandscapeRight]; |
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)testChooseImageAndGoBack { | |
[[app_ buttons][[SHAStrings galleryButtonTitleString]] tap]; | |
[[[app_ tables] buttons][@"Moments"] tap]; | |
[[[app_ collectionViews] cells][@"Photo, Landscape, August 08, 2012, 7:52 PM"] tap]; | |
[self verifyEditPageButtonsVisible]; | |
// Go back to Home Page. | |
[[[[[app_ navigationBars][@"Edit"] childrenMatchingType:XCUIElementTypeButton] | |
matchingIdentifier:@"Back"] elementBoundByIndex:0] tap]; | |
[self verifyHomePageButtons]; |
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)testOpenGalleryAndCancel { | |
[[app_ buttons][[SHAStrings galleryButtonTitleString]] tap]; | |
[[[[[app_ navigationBars][@"Photos"] childrenMatchingType:XCUIElementTypeButton] | |
matchingIdentifier:@"Cancel"] elementBoundByIndex:0] tap]; | |
// Should be at Home Page. | |
[self verifyHomePageButtons]; | |
} |
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)testOpenInspireView { | |
[[app_ buttons][[SHAStrings inspireButtonTitleString]] tap]; | |
// Verify page load by checking the title. | |
XCUIElement *title = [app_ otherElements][@"Show and Hide"]; | |
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"exists == 1"]; | |
[self expectationForPredicate:predicate evaluatedWithObject:title handler:nil]; | |
[self waitForExpectationsWithTimeout:2.0 handler:nil]; | |
// Go back. |