Skip to content

Commit

Permalink
Merge pull request #3169 from klartraum/fix-back-until
Browse files Browse the repository at this point in the history
[navigation] fix bug in Get.until/GetDelegate.backUntil
  • Loading branch information
jonataslaw authored Aug 16, 2024
2 parents f0aed66 + 36a68e9 commit 86e1891
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/navigation/get_main_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,28 @@ void main() {
expect(find.byType(FirstScreen), findsOneWidget);
});

testWidgets("Get.until", (tester) async {
await tester.pumpWidget(WrapperNamed(
initialRoute: '/first',
namedRoutes: [
GetPage(page: () => const FirstScreen(), name: '/first'),
GetPage(page: () => const SecondScreen(), name: '/second'),
GetPage(page: () => const ThirdScreen(), name: '/third')
],
));

await tester.pump();

Get.toNamed('/second');
await tester.pumpAndSettle();
Get.toNamed('/third');
await tester.pumpAndSettle();
Get.until((route) => route.name == '/first');
await tester.pumpAndSettle();

expect(find.byType(FirstScreen), findsOneWidget);
});

group("Get.defaultTransition smoke test", () {
testWidgets("fadeIn", (tester) async {
await tester.pumpWidget(
Expand Down

0 comments on commit 86e1891

Please sign in to comment.