From 7af232b04ea749c75060a5c9f6aa9e4fda4d9f74 Mon Sep 17 00:00:00 2001 From: Justin McCandless Date: Tue, 19 Aug 2025 22:54:37 -0700 Subject: [PATCH] Fix test when automatic-pop-scope PR is merged. Needs one frame for PopScope to rerender after the navigation state changes. --- packages/go_router/test/go_router_test.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/go_router/test/go_router_test.dart b/packages/go_router/test/go_router_test.dart index b3e6b984ed0f..a05a3902822c 100644 --- a/packages/go_router/test/go_router_test.dart +++ b/packages/go_router/test/go_router_test.dart @@ -1258,6 +1258,10 @@ void main() { await verify(() => simulateAndroidBackButton(tester), []); }); + // Pump one frame between back buttons to allow any PopScope widgets to + // rebuild. + await tester.pump(); + // The second pop should exit the app. await tester.runAsync(() async { await verify(() => simulateAndroidBackButton(tester), [