mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Adds an integration test that would have caught the issue with https://github.com/flutter/flutter/pull/176063 The test is simple. It hides, shows, then hides at platform view. If the issue is present, the UI will be come frozen and the button text will not correctly update. So you'll see no platform view showing, but the button will read, "Hide Platform View" instead of "Show Platform View". Checking this through the FlutterDriver is not enough (because the widget tree is updated). The actual UI rendered to the Android device needs to be checked (thus the golden screenshot is necessary). Adding this integration test should ensure content sizing does not cause this issue again. Test failing with Content Sizing changes: [PlatformView Integration Test Failing.webm](https://github.com/user-attachments/assets/c6b5f5e9-1856-4baf-a425-b4d2a38b8d57) Test passing with Content Sizing changes w/fix: [PlatformView Integration Test Passing.webm](https://github.com/user-attachments/assets/104acd01-895e-4321-881b-fe5aa2d96d63) ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing.
Automated Flutter integration test suites
Each suite consists of either a complete Flutter app and a flutter_driver
specification that drives tests from the UI, or a native app that is meant to
integrate with Flutter for testing.
Intended for use with devicelab tests.
If you want to run a driver test locally, to debug a problem with a test, you can use this command from the appropriate subdirectory:
flutter drive -t <test> --driver <driver>
For example:
flutter drive -t lib/keyboard_resize.dart --driver test_driver/keyboard_resize_test.dart
New tests require new CI runner
Adding code to this directory will not automatically cause it to be run by any already existing ci tooling. This directory is intentinally a "choose your own adventure" piece of tooling.