From 4775d3736757ff99576485a3137edf87e9c97305 Mon Sep 17 00:00:00 2001 From: nishantchandla Date: Tue, 20 Jul 2021 00:34:04 +0530 Subject: [PATCH 1/2] update web testing readme instructions --- .../connectivity_for_web/example/README.md | 22 +++++-------------- .../file_selector_web/example/README.md | 22 +++++-------------- .../google_maps_flutter_web/example/README.md | 22 +++++-------------- .../google_sign_in_web/example/README.md | 22 +++++-------------- .../url_launcher_web/example/README.md | 22 +++++-------------- .../video_player_web/example/README.md | 22 +++++-------------- 6 files changed, 30 insertions(+), 102 deletions(-) diff --git a/packages/connectivity/connectivity_for_web/example/README.md b/packages/connectivity/connectivity_for_web/example/README.md index 0ec01e025570..8a6e74b107ea 100644 --- a/packages/connectivity/connectivity_for_web/example/README.md +++ b/packages/connectivity/connectivity_for_web/example/README.md @@ -1,21 +1,9 @@ # Testing -This package utilizes the `integration_test` package to run its tests in a web browser. +This package uses `package:integration_test` to run its tests in a web browser. -See [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info. +See [Plugin Tests > Web Tests](https://github.com/flutter/flutter/wiki/Plugin-Tests#web-tests) +in the Flutter wiki for instructions to setup and run the tests in this package. -## Running the tests - -Make sure you have updated to the latest Flutter master. - -1. Check what version of Chrome is running on the machine you're running tests on. - -2. Download and install driver for that version from here: - * - -3. Start the driver using `chromedriver --port=4444` - -4. Run tests: `flutter drive -d web-server --browser-name=chrome --driver=test_driver/integration_driver.dart --target=integration_test/TEST_NAME.dart`, or (in Linux): - - * Single: `./run_test.sh integration_test/TEST_NAME.dart` - * All: `./run_test.sh` +Check [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) +for more info. \ No newline at end of file diff --git a/packages/file_selector/file_selector_web/example/README.md b/packages/file_selector/file_selector_web/example/README.md index 6187e55841c9..8a6e74b107ea 100644 --- a/packages/file_selector/file_selector_web/example/README.md +++ b/packages/file_selector/file_selector_web/example/README.md @@ -1,21 +1,9 @@ # Testing -This package utilizes the `integration_test` package to run its tests in a web browser. +This package uses `package:integration_test` to run its tests in a web browser. -See [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info. +See [Plugin Tests > Web Tests](https://github.com/flutter/flutter/wiki/Plugin-Tests#web-tests) +in the Flutter wiki for instructions to setup and run the tests in this package. -## Running the tests - -Make sure you have updated to the latest Flutter master. - -1. Check what version of Chrome is running on the machine you're running tests on. - -2. Download and install driver for that version from here: - * - -3. Start the driver using `chromedriver --port=4444` - -4. Run tests: `flutter drive -d web-server --browser-name=chrome --driver=test_driver/integration_test.dart --target=integration_test/TEST_NAME.dart`, or (in Linux): - - * Single: `./run_test.sh integration_test/TEST_NAME.dart` - * All: `./run_test.sh` +Check [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) +for more info. \ No newline at end of file diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/README.md b/packages/google_maps_flutter/google_maps_flutter_web/example/README.md index 582288a561a4..0bfa41697798 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/README.md +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/README.md @@ -1,24 +1,12 @@ # Testing -This package utilizes the `integration_test` package to run its tests in a web browser. +This package uses `package:integration_test` to run its tests in a web browser. -See [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info. +See [Plugin Tests > Web Tests](https://github.com/flutter/flutter/wiki/Plugin-Tests#web-tests) +in the Flutter wiki for instructions to setup and run the tests in this package. -## Running the tests - -Make sure you have updated to the latest Flutter master. - -1. Check what version of Chrome is running on the machine you're running tests on. - -2. Download and install driver for that version from here: - * - -3. Start the driver using `chromedriver --port=4444` - -4. Run tests: `flutter drive -d web-server --browser-name=chrome --driver=test_driver/integration_driver.dart --target=integration_test/TEST_NAME.dart`, or (in Linux): - - * Single: `./run_test.sh integration_test/TEST_NAME.dart` - * All: `./run_test.sh` +Check [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) +for more info. ## Mocks diff --git a/packages/google_sign_in/google_sign_in_web/example/README.md b/packages/google_sign_in/google_sign_in_web/example/README.md index 0ec01e025570..8a6e74b107ea 100644 --- a/packages/google_sign_in/google_sign_in_web/example/README.md +++ b/packages/google_sign_in/google_sign_in_web/example/README.md @@ -1,21 +1,9 @@ # Testing -This package utilizes the `integration_test` package to run its tests in a web browser. +This package uses `package:integration_test` to run its tests in a web browser. -See [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info. +See [Plugin Tests > Web Tests](https://github.com/flutter/flutter/wiki/Plugin-Tests#web-tests) +in the Flutter wiki for instructions to setup and run the tests in this package. -## Running the tests - -Make sure you have updated to the latest Flutter master. - -1. Check what version of Chrome is running on the machine you're running tests on. - -2. Download and install driver for that version from here: - * - -3. Start the driver using `chromedriver --port=4444` - -4. Run tests: `flutter drive -d web-server --browser-name=chrome --driver=test_driver/integration_driver.dart --target=integration_test/TEST_NAME.dart`, or (in Linux): - - * Single: `./run_test.sh integration_test/TEST_NAME.dart` - * All: `./run_test.sh` +Check [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) +for more info. \ No newline at end of file diff --git a/packages/url_launcher/url_launcher_web/example/README.md b/packages/url_launcher/url_launcher_web/example/README.md index b75df09c33f1..9a7d2f3a1d49 100644 --- a/packages/url_launcher/url_launcher_web/example/README.md +++ b/packages/url_launcher/url_launcher_web/example/README.md @@ -1,24 +1,12 @@ # Testing -This package utilizes the `integration_test` package to run its tests in a web browser. +This package uses `package:integration_test` to run its tests in a web browser. -See [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info. +See [Plugin Tests > Web Tests](https://github.com/flutter/flutter/wiki/Plugin-Tests#web-tests) +in the Flutter wiki for instructions to setup and run the tests in this package. -## Running the tests - -Make sure you have updated to the latest Flutter master. - -1. Check what version of Chrome is running on the machine you're running tests on. - -2. Download and install driver for that version from here: - * - -3. Start the driver using `chromedriver --port=4444` - -4. Run tests: `flutter drive -d web-server --browser-name=chrome --driver=test_driver/integration_test_driver.dart --target=integration_test/TEST_NAME.dart`, or (in Linux): - - * Single: `./run_test.sh integration_test/TEST_NAME.dart` - * All: `./run_test.sh` +Check [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) +for more info. ## Mocks diff --git a/packages/video_player/video_player_web/example/README.md b/packages/video_player/video_player_web/example/README.md index 0ec01e025570..8a6e74b107ea 100644 --- a/packages/video_player/video_player_web/example/README.md +++ b/packages/video_player/video_player_web/example/README.md @@ -1,21 +1,9 @@ # Testing -This package utilizes the `integration_test` package to run its tests in a web browser. +This package uses `package:integration_test` to run its tests in a web browser. -See [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info. +See [Plugin Tests > Web Tests](https://github.com/flutter/flutter/wiki/Plugin-Tests#web-tests) +in the Flutter wiki for instructions to setup and run the tests in this package. -## Running the tests - -Make sure you have updated to the latest Flutter master. - -1. Check what version of Chrome is running on the machine you're running tests on. - -2. Download and install driver for that version from here: - * - -3. Start the driver using `chromedriver --port=4444` - -4. Run tests: `flutter drive -d web-server --browser-name=chrome --driver=test_driver/integration_driver.dart --target=integration_test/TEST_NAME.dart`, or (in Linux): - - * Single: `./run_test.sh integration_test/TEST_NAME.dart` - * All: `./run_test.sh` +Check [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) +for more info. \ No newline at end of file From 99b9b9d978a9b3e0048ae672b41e4878f4b9d671 Mon Sep 17 00:00:00 2001 From: nishantchandla Date: Tue, 20 Jul 2021 01:10:51 +0530 Subject: [PATCH 2/2] updated mocks for maps and url_launcher --- .../google_maps_flutter_web/example/README.md | 11 ++--------- .../url_launcher/url_launcher_web/example/README.md | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/README.md b/packages/google_maps_flutter/google_maps_flutter_web/example/README.md index 0bfa41697798..3cdecfab2ab9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/README.md +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/README.md @@ -8,12 +8,5 @@ in the Flutter wiki for instructions to setup and run the tests in this package. Check [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info. -## Mocks - -There's new `.mocks.dart` files next to the test files that use them. - -Mock files are [generated by `package:mockito`](https://github.com/dart-lang/mockito/blob/master/NULL_SAFETY_README.md#code-generation). The contents of these files can change with how the mocks are used within the tests, in addition to actual changes in the APIs they're mocking. - -Mock files can be updated either manually by running the following command: `flutter pub run build_runner build` (or the `regen_mocks.sh` script), or automatically on each call to the `run_test.sh` script. - -Please, add whatever changes show up in mock files to your PRs, or CI will fail. +See [Plugin Tests > Web Tests > Mocks](https://github.com/flutter/flutter/wiki/Plugin-Tests#mocks) +in the Flutter wiki for more information about the `.mocks.dart` files in this package. \ No newline at end of file diff --git a/packages/url_launcher/url_launcher_web/example/README.md b/packages/url_launcher/url_launcher_web/example/README.md index 9a7d2f3a1d49..3cdecfab2ab9 100644 --- a/packages/url_launcher/url_launcher_web/example/README.md +++ b/packages/url_launcher/url_launcher_web/example/README.md @@ -8,12 +8,5 @@ in the Flutter wiki for instructions to setup and run the tests in this package. Check [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info. -## Mocks - -There's `.mocks.dart` files next to the test files that use them. - -They're [generated by Mockito](https://github.com/dart-lang/mockito/blob/master/NULL_SAFETY_README.md#code-generation). - -Mocks might be manually re-generated with the following command: `flutter pub run build_runner build`. If there are any changes in the mocks, feel free to commit them. - -(Mocks will be auto-generated by the `run_test.sh` script as well.) +See [Plugin Tests > Web Tests > Mocks](https://github.com/flutter/flutter/wiki/Plugin-Tests#mocks) +in the Flutter wiki for more information about the `.mocks.dart` files in this package. \ No newline at end of file