@@ -52,10 +52,10 @@ class TransactionsPageRobot {
5252 // Define a timeout to prevent infinite loops
5353 // Putting at one hour for cases like monero that takes time to sync
5454 final timeout = Duration (hours: 1 );
55- final pollingInterval = Duration (seconds: 2 );
5655 final endTime = DateTime .now ().add (timeout);
5756
5857 while (DateTime .now ().isBefore (endTime)) {
58+ await tester.pump (Duration (seconds: 5 ));
5959 final isSynced = dashboardViewModel.status is SyncedSyncStatus ;
6060 final itemsLoaded = dashboardViewModel.items.isNotEmpty;
6161
@@ -64,21 +64,29 @@ class TransactionsPageRobot {
6464 await _performItemChecks (dashboardViewModel);
6565 } else {
6666 // Verify placeholder when items are not loaded
67+ await tester.pump (Duration (seconds: 5 ));
6768 _verifyPlaceholder ();
69+ tester.printToConsole ('No item to check for' );
6870 }
6971
7072 // Determine if we should exit the loop
71- if (_shouldExitLoop (hasTxHistoryWhileSyncing, isSynced, itemsLoaded)) {
73+ bool shouldExit = _shouldExitLoop (hasTxHistoryWhileSyncing, isSynced, itemsLoaded);
74+ await tester.pump (Duration (seconds: 2 ));
75+
76+ if (shouldExit) {
77+ await tester.pump (Duration (seconds: 2 ));
7278 break ;
7379 }
7480
7581 // Pump the UI and wait for the next polling interval
76- await tester.pumpAndSettle (pollingInterval);
82+ await commonTestCases.defaultSleepTime ();
83+ await tester.pump (Duration (seconds: 2 ));
84+ await tester.pumpAndSettle ();
7785 }
7886
7987 // After the loop, verify that both status is synced and items are loaded
8088 if (! _isFinalStateValid (dashboardViewModel)) {
81- throw TimeoutException ('Dashboard did not sync and load items within the allotted time.' );
89+ tester. printToConsole ('Dashboard did not sync and load items within the allotted time.' );
8290 }
8391 }
8492
@@ -119,17 +127,22 @@ class TransactionsPageRobot {
119127 await tester.pumpAndSettle ();
120128
121129 // Scroll the item into view
122- await commonTestCases.dragUntilVisible (keyId, 'transactions_page_list_view_builder_key' );
130+ await commonTestCases.scrollItemIntoView (
131+ keyId,
132+ 20 ,
133+ 'transactions_page_list_view_builder_key' ,
134+ );
123135 await tester.pumpAndSettle ();
124136
125- // Check if the widget is visible
137+ // Verify the widget is visible; if not, skip to the next one.
126138 if (! tester.any (find.byKey (ValueKey (keyId)))) {
127139 tester.printToConsole ('Item not visible: $keyId . Moving to the next.' );
128140 continue ;
129141 }
130142
131143 await tester.pumpAndSettle ();
132144
145+ // Execute the proper check depending on item type.
133146 switch (item.runtimeType) {
134147 case TransactionListItem :
135148 final transactionItem = item as TransactionListItem ;
0 commit comments