mirror of
https://github.com/flutter/flutter.git
synced 2026-02-04 19:00:09 +08:00
Update all versions, specifically file which fixes some bugs that caused tests to fail if run in different orders: - systemTemp directories created by MemoryFileSystem will allot names based on the file system instance instead of globally. - MemoryFile.readAsLines()/readAsLinesSync() no longer treat a final newline in the file as the start of a new, empty line. - RecordingFile.readAsLine()/readAsLinesSync() now always record a final newline.
Summary
This tests contains an app with a main page and sub pages. The main page contains a list of buttons; each button leads to a designated sub page when tapped on. Each sub page should displays some simple UIs to screenshot tested.
The flutter driver test runs the app and opens each page to take a screenshot.
Use 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.
Add a new page to test
- Create a new class which extends
Pageand implement the UI to be tested in thebuildmethod. - The new class should set a static
titleandkey - Add an instance of the new class to the
_allPageslist in themain.dart - Create a new test case similar to
"'A page with an image screenshot"intest_driver/main_test.dartto run the screenshot test.
An example of a Page subclass can be found in lib/image_page.dart
Environments
- Device Lab which runs the app on iPhone 6s.
- LUCI which runs the app on a Fuchsia NUC device.