fix to add both flutter_test and integration_test (#109650)

This commit is contained in:
kye shimizu 2022-10-26 08:29:54 +09:00 committed by GitHub
parent 3ed14a05c5
commit b816801abd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,8 +11,11 @@ Add a dependency on the `integration_test` and `flutter_test` package in the
`pubspec.yaml` of the example app: `pubspec.yaml` of the example app:
```yaml ```yaml
integration_test: dev_dependencies:
sdk: flutter integration_test:
sdk: flutter
flutter_test:
sdk: flutter
``` ```
Create a `integration_test/` directory for your package. In this directory, Create a `integration_test/` directory for your package. In this directory,
@ -126,7 +129,7 @@ void main() {
``` ```
You can use a driver script to pull in the screenshot from the device. You can use a driver script to pull in the screenshot from the device.
This way, you can store the images locally on your computer. On iOS, the This way, you can store the images locally on your computer. On iOS, the
screenshot will also be available in Xcode test results. screenshot will also be available in Xcode test results.
**test_driver/integration_test.dart** **test_driver/integration_test.dart**
@ -277,6 +280,7 @@ end
``` ```
To build `integration_test/foo_test.dart` from the command line, run: To build `integration_test/foo_test.dart` from the command line, run:
```sh ```sh
flutter build ios --config-only integration_test/foo_test.dart flutter build ios --config-only integration_test/foo_test.dart
``` ```