Skip to content

Commit c40dc98

Browse files
committed
Fix widget test timing to check splash screen before navigation
- Reduce wait time from 3 seconds to 1.5 seconds - Splash screen navigates away after 3 seconds (2s delay + 1s wallet check) - Test now checks for text before navigation occurs - This should allow the test to find the animated text before the screen changes The test should now pass by catching the splash screen content before navigation.
1 parent 30dbac8 commit c40dc98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/widget_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ void main() {
1010
// Build our app and trigger a frame.
1111
await tester.pumpWidget(const XFGWalletApp());
1212

13-
// Wait for the typewriter animation to complete (approximately 2 seconds for the text)
14-
await tester.pump(const Duration(seconds: 3));
13+
// Wait for the typewriter animation to complete but before navigation (1.5 seconds)
14+
await tester.pump(const Duration(milliseconds: 1500));
1515

1616
// Verify that our app starts with the splash screen
1717
expect(find.text('Fyrefly XF₲_wallet'), findsOneWidget);

0 commit comments

Comments
 (0)