Actually fix the memory_nav benchmark (#8041)
This commit is contained in:
@@ -18,16 +18,25 @@ void main() {
|
||||
});
|
||||
|
||||
test('navigation', () async {
|
||||
Completer<Null> completer = new Completer<Null>();
|
||||
bool scroll = true;
|
||||
SerializableFinder menuItem = find.text('Text fields');
|
||||
await driver.scrollIntoView(menuItem, alignment: 0.5);
|
||||
await new Future<Null>.delayed(kWaitBetweenActions);
|
||||
|
||||
for (int i = 0; i < 15; i++) {
|
||||
await driver.tap(menuItem);
|
||||
driver.waitFor(menuItem).then<Null>((Null value) async {
|
||||
scroll = false;
|
||||
await new Future<Null>.delayed(kWaitBetweenActions);
|
||||
await driver.tap(find.byTooltip('Back'));
|
||||
for (int i = 0; i < 15; i++) {
|
||||
await driver.tap(menuItem);
|
||||
await new Future<Null>.delayed(kWaitBetweenActions);
|
||||
await driver.tap(find.byTooltip('Back'));
|
||||
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)));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user