From 088a3d750f4f5fe4e18167e4c35c6acf4a529f35 Mon Sep 17 00:00:00 2001 From: SchabanBo <49782771+SchabanBo@users.noreply.github.com> Date: Tue, 30 Jul 2024 09:35:28 +0200 Subject: [PATCH] Fix tests --- lib/src/controllers/match_controller.dart | 2 +- lib/src/qr_navigation.dart | 1 + lib/src/routers/temporary_router.dart | 2 +- test/scenario-code/temporary_router_test.dart | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/controllers/match_controller.dart b/lib/src/controllers/match_controller.dart index 5c01d90..23b2f8e 100644 --- a/lib/src/controllers/match_controller.dart +++ b/lib/src/controllers/match_controller.dart @@ -13,7 +13,7 @@ class MatchController { } QR.log( // ignore: lines_longer_than_80_chars - '${'Finding Match for $sPath under '}${foundPath.isEmpty ? 'root' : 'path $foundPath'}'); + '${'Finding Match for $sPath under '}${foundPath.isEmpty ? 'root' : 'path $foundPath'} with params $params'); } factory MatchController.fromName( diff --git a/lib/src/qr_navigation.dart b/lib/src/qr_navigation.dart index 996a06c..669d438 100644 --- a/lib/src/qr_navigation.dart +++ b/lib/src/qr_navigation.dart @@ -49,6 +49,7 @@ extension QRNavigation on QRContext { /// try to pop the last active navigator or go to last path in the history Future back([dynamic result]) async { + log('Back to previous path'); if (history.isEmpty) return PopResult.NotPopped; // is processed by declarative diff --git a/lib/src/routers/temporary_router.dart b/lib/src/routers/temporary_router.dart index e39c267..0c8a29e 100644 --- a/lib/src/routers/temporary_router.dart +++ b/lib/src/routers/temporary_router.dart @@ -82,7 +82,7 @@ class _TemporaryQRouterState extends State { QR.activeNavigatorName = QRContext.rootRouterName; _treeAdjuster.reset(); WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - QR.updateUrlInfo(originalRoute, addHistory: false); + QR.updateUrlInfo(originalRoute); }); } diff --git a/test/scenario-code/temporary_router_test.dart b/test/scenario-code/temporary_router_test.dart index 990f8b5..14ab3e1 100644 --- a/test/scenario-code/temporary_router_test.dart +++ b/test/scenario-code/temporary_router_test.dart @@ -6,6 +6,7 @@ import '../helpers.dart'; void main() { testWidgets('Test Temporary router', (tester) async { + QR.reset(); tester.view.devicePixelRatio = 1.0; tester.view.physicalSize = const Size(400, 600); addTearDown(tester.view.resetPhysicalSize);