This test contains an app with a main page and subpages. The main page contains a list of buttons; each button leads to a designated subpage when tapped on. Each subpage should display some simple UIs to the screenshot tested.
The flutter driver test runs the app and opens each page to take a screenshot.
main_test.dart to test against golden files stored on Flutter Gold.
Note that new binaries can't be checked in the Flutter repo, so use Flutter Gold instead.
Pageand implement the UI to be tested in the
_allPageslist in the
"'A page with an image screenshot"in
test_driver/main_test.dartto run the screenshot test.
An example of a
Page subclass can be found in