Setup

To start using the integration_test package,
add the integration_test to
your pubspec.yaml file if you haven’t yet:

dev_dependencies

integration_test

sdk

flutter

Next, in your project, create a new directory
integration_test/, create your tests files there 
with the format: <name>_test.dart.

Test migration

This section contains different examples on how to migrate existing
flutter_driver tests to integration_test tests.

Example: Verifying a widget is displayed

When the app starts the screen on the left displays 
a text asking the user to select one of the plants on the list.

This test verifies that the text is displayed.

flutter_driver

In flutter_driver, the test uses waitFor,
which waits until the finder can locate the widget.
The test fail if the widget can’t be found.