mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 02:01:16 +00:00
Update googlephotos workload to work against most recent version
* Updated googlephotos workload to work against version 4.28.0
This commit is contained in:
parent
f3e7b14b28
commit
796dfb1de6
@ -42,7 +42,7 @@ class Googlephotos(ApkUiautoWorkload):
|
||||
6. A rotate test is performed on a selected image, rotating anticlockwise 90 degrees, 180
|
||||
degrees and 270 degrees.
|
||||
|
||||
Known working APK version: 4.0.0.212659618
|
||||
Known working APK version: 4.28.0.276318361
|
||||
'''
|
||||
|
||||
default_test_images = [
|
||||
|
Binary file not shown.
@ -363,8 +363,7 @@ public class UiAutomation extends BaseUiAutomation implements ApplaunchInterface
|
||||
|
||||
Iterator<Entry<String, Position>> it = testParams.entrySet().iterator();
|
||||
|
||||
clickUiObject(BY_ID, packageID + "edit", "android.widget.ImageView");
|
||||
clickUiObject(BY_ID, packageID + "cpe_crop_tool", "android.widget.ImageView");
|
||||
clickCropRotateButton();
|
||||
|
||||
UiObject straightenSlider =
|
||||
getUiObjectByResourceId(packageID + "cpe_straighten_slider");
|
||||
@ -387,8 +386,7 @@ public class UiAutomation extends BaseUiAutomation implements ApplaunchInterface
|
||||
|
||||
String[] subTests = {"90", "180", "270"};
|
||||
|
||||
clickUiObject(BY_ID, packageID + "edit", "android.widget.ImageView");
|
||||
clickUiObject(BY_ID, packageID + "cpe_crop_tool", "android.widget.ImageView");
|
||||
clickCropRotateButton();
|
||||
|
||||
UiObject rotate =
|
||||
getUiObjectByResourceId(packageID + "cpe_rotate_90");
|
||||
@ -403,6 +401,19 @@ public class UiAutomation extends BaseUiAutomation implements ApplaunchInterface
|
||||
}
|
||||
}
|
||||
|
||||
private void clickCropRotateButton() throws Exception {
|
||||
clickUiObject(BY_ID, packageID + "edit", "android.widget.ImageView");
|
||||
//For newer version of app
|
||||
UiObject cropRotatebutton =
|
||||
mDevice.findObject(new UiSelector().resourceId(packageID + "editor_tool_item_icon")
|
||||
.descriptionContains("Crop and rotate photo"));
|
||||
if (cropRotatebutton.exists()) {
|
||||
cropRotatebutton.click();
|
||||
} else {
|
||||
clickUiObject(BY_ID, packageID + "cpe_crop_tool", "android.widget.ImageView");
|
||||
}
|
||||
}
|
||||
|
||||
// Helper to slide the seekbar during photo edit.
|
||||
private void seekBarTest(final UiObject view, final Position start, final Position end, final int steps) throws Exception {
|
||||
final int SWIPE_MARGIN_LIMIT = 5;
|
||||
|
Loading…
x
Reference in New Issue
Block a user