mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-25 14:28:41 +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
wa/workloads/googlephotos
__init__.pycom.arm.wa.uiauto.googlephotos.apk
uiauto/app/src/main/java/com/arm/wa/uiauto/googlephotos
@ -42,7 +42,7 @@ class Googlephotos(ApkUiautoWorkload):
|
|||||||
6. A rotate test is performed on a selected image, rotating anticlockwise 90 degrees, 180
|
6. A rotate test is performed on a selected image, rotating anticlockwise 90 degrees, 180
|
||||||
degrees and 270 degrees.
|
degrees and 270 degrees.
|
||||||
|
|
||||||
Known working APK version: 4.0.0.212659618
|
Known working APK version: 4.28.0.276318361
|
||||||
'''
|
'''
|
||||||
|
|
||||||
default_test_images = [
|
default_test_images = [
|
||||||
|
Binary file not shown.
19
wa/workloads/googlephotos/uiauto/app/src/main/java/com/arm/wa/uiauto/googlephotos/UiAutomation.java
19
wa/workloads/googlephotos/uiauto/app/src/main/java/com/arm/wa/uiauto/googlephotos/UiAutomation.java
@ -363,8 +363,7 @@ public class UiAutomation extends BaseUiAutomation implements ApplaunchInterface
|
|||||||
|
|
||||||
Iterator<Entry<String, Position>> it = testParams.entrySet().iterator();
|
Iterator<Entry<String, Position>> it = testParams.entrySet().iterator();
|
||||||
|
|
||||||
clickUiObject(BY_ID, packageID + "edit", "android.widget.ImageView");
|
clickCropRotateButton();
|
||||||
clickUiObject(BY_ID, packageID + "cpe_crop_tool", "android.widget.ImageView");
|
|
||||||
|
|
||||||
UiObject straightenSlider =
|
UiObject straightenSlider =
|
||||||
getUiObjectByResourceId(packageID + "cpe_straighten_slider");
|
getUiObjectByResourceId(packageID + "cpe_straighten_slider");
|
||||||
@ -387,8 +386,7 @@ public class UiAutomation extends BaseUiAutomation implements ApplaunchInterface
|
|||||||
|
|
||||||
String[] subTests = {"90", "180", "270"};
|
String[] subTests = {"90", "180", "270"};
|
||||||
|
|
||||||
clickUiObject(BY_ID, packageID + "edit", "android.widget.ImageView");
|
clickCropRotateButton();
|
||||||
clickUiObject(BY_ID, packageID + "cpe_crop_tool", "android.widget.ImageView");
|
|
||||||
|
|
||||||
UiObject rotate =
|
UiObject rotate =
|
||||||
getUiObjectByResourceId(packageID + "cpe_rotate_90");
|
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.
|
// 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 {
|
private void seekBarTest(final UiObject view, final Position start, final Position end, final int steps) throws Exception {
|
||||||
final int SWIPE_MARGIN_LIMIT = 5;
|
final int SWIPE_MARGIN_LIMIT = 5;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user