Support for vetoing an attempt to pop the current route (#7488)

This commit is contained in:
Hans Muller
2017-01-18 11:04:18 -08:00
committed by GitHub
parent 17bc188803
commit 0ce9917fb2
11 changed files with 479 additions and 9 deletions

View File

@@ -44,6 +44,7 @@ Future<Null> smokeDemo(WidgetTester tester, String routeName) async {
expect(backButton, findsOneWidget);
await tester.tap(backButton);
await tester.pump(); // Start the pop "back" operation.
await tester.pump(); // Complete the willPop() Future.
await tester.pump(const Duration(seconds: 1)); // Wait until it has finished.
return null;
}

View File

@@ -33,7 +33,9 @@ void main() {
expect(backButton, findsOneWidget);
await tester.tap(backButton);
await tester.pump(); // Start the pop "back" operation.
await tester.pump(); // Complete the willPop() Future.
await tester.pump(const Duration(seconds: 1)); // transition is complete
//await tester.pumpUntilNoTransientCallbacks(const Duration(seconds: 1));
expect(find.text('UPDATE'), findsNothing);
});