1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 19:01:15 +01:00

GoogleSlides workload did not do slide_count number of swipes in edit mode. This fixes that.

This commit is contained in:
Michael McGeagh 2016-09-19 13:26:21 +01:00
parent 2202326c02
commit b5dc5b8648
2 changed files with 7 additions and 5 deletions

View File

@ -192,7 +192,6 @@ public class UiAutomation extends UxPerfUiAutomation {
clickUiObject(BY_DESC, "New presentation"); clickUiObject(BY_DESC, "New presentation");
clickUiObject(BY_TEXT, "New PowerPoint", true); clickUiObject(BY_TEXT, "New PowerPoint", true);
stopLogger("document_new"); stopLogger("document_new");
waitForProgress(WAIT_TIMEOUT_1SEC * 30);
} }
public void saveDocument(String docName) throws Exception { public void saveDocument(String docName) throws Exception {
@ -275,6 +274,7 @@ public class UiAutomation extends UxPerfUiAutomation {
protected void testEditNewSlidesDocument(String docName) throws Exception { protected void testEditNewSlidesDocument(String docName) throws Exception {
// Init // Init
newDocument(); newDocument();
waitForProgress(WAIT_TIMEOUT_1SEC * 30);
// Slide 1 - Text // Slide 1 - Text
if (doTextEntry) { if (doTextEntry) {
@ -331,7 +331,7 @@ public class UiAutomation extends UxPerfUiAutomation {
// scroll forward in edit mode // scroll forward in edit mode
startLogger("slideshow_editforward"); startLogger("slideshow_editforward");
while (++slideIndex < slideCount) { while (slideIndex++ < slideCount) {
uiDeviceSwipeHorizontal(rightEdge, leftEdge, yCoordinate, DEFAULT_SWIPE_STEPS); uiDeviceSwipeHorizontal(rightEdge, leftEdge, yCoordinate, DEFAULT_SWIPE_STEPS);
waitForProgress(WAIT_TIMEOUT_1SEC*5); waitForProgress(WAIT_TIMEOUT_1SEC*5);
} }
@ -340,7 +340,7 @@ public class UiAutomation extends UxPerfUiAutomation {
// scroll backward in edit mode // scroll backward in edit mode
startLogger("slideshow_editbackward"); startLogger("slideshow_editbackward");
while (--slideIndex > 0) { while (slideIndex-- > 0) {
uiDeviceSwipeHorizontal(leftEdge, rightEdge, yCoordinate, DEFAULT_SWIPE_STEPS); uiDeviceSwipeHorizontal(leftEdge, rightEdge, yCoordinate, DEFAULT_SWIPE_STEPS);
waitForProgress(WAIT_TIMEOUT_1SEC*5); waitForProgress(WAIT_TIMEOUT_1SEC*5);
} }
@ -360,9 +360,11 @@ public class UiAutomation extends UxPerfUiAutomation {
stopLogger("slideshow_run"); stopLogger("slideshow_run");
sleep(1); sleep(1);
slideIndex = 0;
// scroll forward in slideshow mode // scroll forward in slideshow mode
startLogger("slideshow_playforward"); startLogger("slideshow_playforward");
while (++slideIndex < slideCount) { while (slideIndex++ < slideCount) {
uiDeviceSwipeHorizontal(rightEdge, leftEdge, yCoordinate, DEFAULT_SWIPE_STEPS); uiDeviceSwipeHorizontal(rightEdge, leftEdge, yCoordinate, DEFAULT_SWIPE_STEPS);
waitForProgress(WAIT_TIMEOUT_1SEC*5); waitForProgress(WAIT_TIMEOUT_1SEC*5);
} }
@ -371,7 +373,7 @@ public class UiAutomation extends UxPerfUiAutomation {
// scroll backward in slideshow mode // scroll backward in slideshow mode
startLogger("slideshow_playbackward"); startLogger("slideshow_playbackward");
while (--slideIndex > 0) { while (slideIndex-- > 0) {
uiDeviceSwipeHorizontal(leftEdge, rightEdge, yCoordinate, DEFAULT_SWIPE_STEPS); uiDeviceSwipeHorizontal(leftEdge, rightEdge, yCoordinate, DEFAULT_SWIPE_STEPS);
waitForProgress(WAIT_TIMEOUT_1SEC*5); waitForProgress(WAIT_TIMEOUT_1SEC*5);
} }