Skip to content

Instantly share code, notes, and snippets.

@adam-stasiak
Created July 29, 2019 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adam-stasiak/507d0005836820a5199c2862d7c91f9b to your computer and use it in GitHub Desktop.
Save adam-stasiak/507d0005836820a5199c2862d7c91f9b to your computer and use it in GitHub Desktop.
import 'package:veggieseasons/main.dart' as app;
void main(){
testWidgets('it is possible to find matching fruit from main app',
(WidgetTester tester) async {
await tester.pumpWidget(app.MainWidget());
await tester.tap(find.text("Search"));
await tester.pump();
await tester.enterText(find.byType(SearchBar), "Grapes");
await tester.pump();
expect(find.byKey(new Key("SearchItemName")),findsOneWidget);
expect(find.text("Couldn\'t have wine without them."),findsOneWidget);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment