Complete the code to pump the widget in the test environment.
await tester.[1]Widget(MyApp());The pumpWidget method loads the widget into the test environment so you can interact with it.
Complete the code to find a widget by its text content.
final titleFinder = find.[1]('Welcome');
The find.text method locates widgets that display the given text.
Fix the error in the test assertion to check if a widget is found exactly once.
expect(find.byType(MyButton), finds[1]Widget);The correct matcher is findsOneWidget, but since the code uses finds{{BLANK_1}}Widget, the blank should be filled with 'One' to complete it.
Fill both blanks to simulate a tap on a widget found by key and then wait for animations to settle.
await tester.tap(find.[1](Key('submit'))); await tester.[2]();
Use find.byKey to locate the widget by its key. Then pumpAndSettle waits for all animations to finish after the tap.
Fill all three blanks to write a test that pumps a widget, taps a button by key, and verifies a text appears.
await tester.[1]Widget(MyApp()); await tester.tap(find.[2](Key('increment'))); expect(find.[3]('Count: 1'), findsOneWidget);
First, pumpWidget loads the app. Then tap is called on the widget found by find.byKey. Finally, find.text checks the displayed text.