1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-05 18:31:12 +01:00

workloads/googlephotos: Update to handle new popup

Bump the minor known working version APK and handle a new "missing out"
popup.
This commit is contained in:
Marc Bonnici 2020-11-23 15:04:29 +00:00 committed by setrofim
parent 8e56a4c831
commit cb51ef4d47
3 changed files with 12 additions and 3 deletions

View File

@ -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.28.0.276318361 Known working APK version: 4.53.0.316914374
''' '''
default_test_images = [ default_test_images = [

View File

@ -102,6 +102,7 @@ public class UiAutomation extends BaseUiAutomation implements ApplaunchInterface
// Clear the initial run dialogues of the application launch. // Clear the initial run dialogues of the application launch.
dismissWelcomeView(); dismissWelcomeView();
closePromotionPopUp(); closePromotionPopUp();
closeMissingOutPopUp();
} }
// Returns the launch command for the application. // Returns the launch command for the application.
@ -176,6 +177,14 @@ public class UiAutomation extends BaseUiAutomation implements ApplaunchInterface
} }
} }
public void closeMissingOutPopUp() throws Exception {
UiObject missingPopup =
mDevice.findObject(new UiSelector().textContains("Not now"));
if (missingPopup.waitForExists(3000)) {
missingPopup.click();
}
}
// Helper to click on the first image // Helper to click on the first image
public void selectFirstImage() throws Exception { public void selectFirstImage() throws Exception {
UiObject photo = UiObject photo =
@ -304,9 +313,9 @@ public class UiAutomation extends BaseUiAutomation implements ApplaunchInterface
Iterator<Entry<String, PositionPair>> it = testParams.entrySet().iterator(); Iterator<Entry<String, PositionPair>> it = testParams.entrySet().iterator();
clickUiObject(BY_ID, packageID + "edit", "android.widget.ImageView"); clickUiObject(BY_ID, packageID + "edit", "android.widget.ImageView");
UiObject enhance = UiObject enhance =
mDevice.findObject(new UiSelector().description("Enhance photo")); mDevice.findObject(new UiSelector().description("Enhance photo"));
if (enhance.exists()){ if (enhance.waitForExists(timeout)){
enhance.click(); enhance.click();
} }