Sped up the time to find macrobenchmarks. (#131959)
This reduce the execution time of macrobenchmarks driver tests. I tried to find the exact size to scroll the screen but I couldn't find a way to do that with driver tests.
This commit is contained in:
parent
53082f65b5
commit
11025e4acd
@ -23,7 +23,11 @@ Future<void> runDriverTestForRoute(String routeName, DriverTestCallBack body) as
|
|||||||
expect(scrollable, isNotNull);
|
expect(scrollable, isNotNull);
|
||||||
final SerializableFinder button = find.byValueKey(routeName);
|
final SerializableFinder button = find.byValueKey(routeName);
|
||||||
expect(button, isNotNull);
|
expect(button, isNotNull);
|
||||||
await driver.scrollUntilVisible(scrollable, button, dyScroll: -100.0);
|
// -320 comes from the logical pixels for a full screen scroll for the
|
||||||
|
// smallest reference device, iPhone 4, whose physical screen dimensions are
|
||||||
|
// 960px × 640px.
|
||||||
|
const double dyScroll = -320.0;
|
||||||
|
await driver.scrollUntilVisible(scrollable, button, dyScroll: dyScroll);
|
||||||
await driver.tap(button);
|
await driver.tap(button);
|
||||||
|
|
||||||
await body(driver);
|
await body(driver);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user