Skip to content

Commit

Permalink
Improved unit test for shouldPopScope.
Browse files Browse the repository at this point in the history
  • Loading branch information
larryaasen committed Dec 29, 2023
1 parent 0635af7 commit e15deb6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/upgrader_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -495,12 +495,11 @@ void main() {
// Pump the UI so the upgrader can display its dialog
await tester.pumpAndSettle();

// Note: his test does not pop scope because there is no way to do that.
// await tester.pageBack();
// await tester.pumpAndSettle();
// expect(find.text(upgrader.messages.buttonTitleLater), findsNothing);
expect(called, false);
}, skip: false);
final dynamic widgetsAppState = tester.state(find.byType(WidgetsApp));
await widgetsAppState.didPopRoute();
await tester.pump();
expect(called, true);
});

testWidgets('test UpgradeAlert no update', (WidgetTester tester) async {
expect(Upgrader.sharedInstance.isTooSoon(), false);
Expand Down

0 comments on commit e15deb6

Please sign in to comment.