Merge "Adding events check to TAPL method for flinging to clear all." into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
b00227ca3f
@@ -157,7 +157,7 @@ public class BaseOverview extends LauncherInstrumentation.VisibleContainer {
|
||||
LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
|
||||
"dismissing all tasks")) {
|
||||
final BySelector clearAllSelector = mLauncher.getOverviewObjectSelector("clear_all");
|
||||
flingForwardUntilClearAllVisible();
|
||||
flingForwardUntilClearAllVisibleImpl();
|
||||
|
||||
final Runnable clickClearAll = () -> mLauncher.clickLauncherObject(
|
||||
mLauncher.waitForObjectInContainer(verifyActiveContainer(),
|
||||
@@ -181,10 +181,19 @@ public class BaseOverview extends LauncherInstrumentation.VisibleContainer {
|
||||
* Scrolls until Clear-all button is visible.
|
||||
*/
|
||||
public void flingForwardUntilClearAllVisible() {
|
||||
final BySelector clearAllSelector = mLauncher.getOverviewObjectSelector("clear_all");
|
||||
for (int i = 0; i < FLINGS_FOR_DISMISS_LIMIT
|
||||
&& !verifyActiveContainer().hasObject(clearAllSelector); ++i) {
|
||||
flingForwardImpl();
|
||||
try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck()) {
|
||||
flingForwardUntilClearAllVisibleImpl();
|
||||
}
|
||||
}
|
||||
|
||||
private void flingForwardUntilClearAllVisibleImpl() {
|
||||
try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
|
||||
"flinging forward to clear all")) {
|
||||
final BySelector clearAllSelector = mLauncher.getOverviewObjectSelector("clear_all");
|
||||
for (int i = 0; i < FLINGS_FOR_DISMISS_LIMIT && !verifyActiveContainer().hasObject(
|
||||
clearAllSelector); ++i) {
|
||||
flingForwardImpl();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user