forked from flutter/flutter
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[google_maps_flutter_web] Move integration tests to example. (flutter…
…#3675) This PR moves the integration tests of this package to conform with the latest best practices for web plugins.
- Loading branch information
Showing
22 changed files
with
53 additions
and
68 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/google_maps_flutter/google_maps_flutter_web/example/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Testing | ||
|
||
This package utilizes the `integration_test` package to run its tests in a web browser. | ||
|
||
See [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info. | ||
|
||
## 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: | ||
* <https://chromedriver.chromium.org/downloads> | ||
|
||
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` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions
16
...google_maps_flutter_web/test/pubspec.yaml → ...gle_maps_flutter_web/example/pubspec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
name: regular_integration_tests | ||
name: google_maps_flutter_web_integration_tests | ||
publish_to: none | ||
|
||
environment: | ||
sdk: ">=2.2.2 <3.0.0" | ||
sdk: ">=2.2.2 <3.0.0" # Bump this to 2.12 when migrating to nnbd. | ||
flutter: ">=1.27.0-0" # For integration_test from sdk | ||
|
||
dependencies: | ||
google_maps_flutter_web: | ||
path: ../ | ||
flutter: | ||
sdk: flutter | ||
|
||
dev_dependencies: | ||
google_maps: ^3.4.4 | ||
http: ^0.13.0 | ||
mockito: ^5.0.0 | ||
flutter_driver: | ||
sdk: flutter | ||
flutter_test: | ||
sdk: flutter | ||
http: ^0.12.2 | ||
mockito: ^4.1.1 | ||
google_maps_flutter_web: | ||
path: ../ | ||
integration_test: | ||
path: ../../../integration_test | ||
|
||
sdk: flutter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 3 additions & 15 deletions
18
packages/google_maps_flutter/google_maps_flutter_web/test/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,5 @@ | ||
# Running browser_tests | ||
## test | ||
|
||
Make sure you have updated to the latest Flutter master. | ||
This package uses integration tests for testing. | ||
|
||
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: | ||
* <https://chromedriver.chromium.org/downloads> | ||
|
||
3. Start the driver using `chromedriver --port=4444` | ||
|
||
4. Change into the `test` directory of your clone. | ||
|
||
5. Run tests: `flutter drive -d web-server --browser-name=chrome --target=test_driver/TEST_NAME_integration.dart`, or (in Linux): | ||
|
||
* Single: `./run_test test_driver/TEST_NAME_integration.dart` | ||
* All: `./run_test` | ||
See `example/README.md` for more info. |
7 changes: 0 additions & 7 deletions
7
...flutter/google_maps_flutter_web/test/test_driver/google_maps_plugin_integration_test.dart
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
...google_maps_flutter/google_maps_flutter_web/test/test_driver/marker_integration_test.dart
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
...oogle_maps_flutter/google_maps_flutter_web/test/test_driver/markers_integration_test.dart
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
.../google_maps_flutter/google_maps_flutter_web/test/test_driver/shape_integration_test.dart
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
...google_maps_flutter/google_maps_flutter_web/test/test_driver/shapes_integration_test.dart
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
packages/google_maps_flutter/google_maps_flutter_web/test/tests_exist_elsewhere_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import 'package:flutter_test/flutter_test.dart'; | ||
|
||
void main() { | ||
test('Tell the user where to find the real tests', () { | ||
print('---'); | ||
print('This package uses integration_test for its tests.'); | ||
print('See `example/README.md` for more info.'); | ||
print('---'); | ||
}); | ||
} |