Commit 581b929b authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Actually fix the memory_nav benchmark (#8041)

parent 473b67ef
...@@ -18,16 +18,25 @@ void main() { ...@@ -18,16 +18,25 @@ void main() {
}); });
test('navigation', () async { test('navigation', () async {
Completer<Null> completer = new Completer<Null>();
bool scroll = true;
SerializableFinder menuItem = find.text('Text fields'); SerializableFinder menuItem = find.text('Text fields');
await driver.scrollIntoView(menuItem, alignment: 0.5); driver.waitFor(menuItem).then<Null>((Null value) async {
scroll = false;
await new Future<Null>.delayed(kWaitBetweenActions); await new Future<Null>.delayed(kWaitBetweenActions);
for (int i = 0; i < 15; i++) { for (int i = 0; i < 15; i++) {
await driver.tap(menuItem); await driver.tap(menuItem);
await new Future<Null>.delayed(kWaitBetweenActions); await new Future<Null>.delayed(kWaitBetweenActions);
await driver.tap(find.byTooltip('Back')); await driver.tap(find.byTooltip('Back'));
await new Future<Null>.delayed(kWaitBetweenActions); await new Future<Null>.delayed(kWaitBetweenActions);
} }
completer.complete();
});
while (scroll) {
await driver.scroll(find.text('Flutter Gallery'), 0.0, -500.0, const Duration(milliseconds: 80));
await new Future<Null>.delayed(kWaitBetweenActions);
}
await completer.future;
}, timeout: new Timeout(new Duration(minutes: 1))); }, timeout: new Timeout(new Duration(minutes: 1)));
}); });
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment