Created
September 9, 2025 08:32
-
-
Save YonatanKra/6042e6fecfbb54df7b21e8a655ebe170 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| testWidgets('should display a WordPair and update on button press', (WidgetTester tester) async { | |
| await tester.pumpWidget( | |
| ChangeNotifierProvider( | |
| create: (context) => MyAppState(), | |
| child: MaterialApp(home: MyHomePage()), | |
| ), | |
| ); | |
| // Verify initial WordPair is displayed | |
| expect(find.textContaining('_'), findsOneWidget); | |
| // Tap the 'Next' button | |
| await tester.tap(find.text('Next')); | |
| await tester.pump(); | |
| // Verify the WordPair has changed | |
| expect(find.textContaining('_'), findsOneWidget); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment