forked from flutter/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[google_sign_in_web] Migrate to null-safety (flutter#3628)
- Loading branch information
Showing
26 changed files
with
322 additions
and
653 deletions.
There are no files selected for viewing
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,3 +1,7 @@ | ||
## 0.10.0 | ||
|
||
* Migrate to null-safety. | ||
|
||
## 0.9.2+1 | ||
|
||
* Update Flutter SDK constraint. | ||
|
21 changes: 21 additions & 0 deletions
21
packages/google_sign_in/google_sign_in_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` |
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
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 |
---|---|---|
|
@@ -4,18 +4,19 @@ | |
|
||
import 'dart:html' as html; | ||
|
||
import 'package:integration_test/integration_test.dart'; | ||
|
||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:google_sign_in_platform_interface/google_sign_in_platform_interface.dart'; | ||
import 'package:google_sign_in_web/google_sign_in_web.dart'; | ||
import 'package:integration_test/integration_test.dart'; | ||
|
||
import 'gapi_mocks/gapi_mocks.dart' as gapi_mocks; | ||
import 'src/test_utils.dart'; | ||
|
||
void main() { | ||
IntegrationTestWidgetsFlutterBinding.ensureInitialized(); | ||
|
||
gapiUrl = toBase64Url(gapi_mocks.auth2InitSuccess(GoogleSignInUserData())); | ||
gapiUrl = toBase64Url(gapi_mocks.auth2InitSuccess( | ||
GoogleSignInUserData(email: '[email protected]', id: '1234'))); | ||
|
||
testWidgets('Plugin is initialized after GAPI fully loads and init is called', | ||
(WidgetTester tester) async { | ||
|
File renamed without changes.
File renamed without changes.
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.
12 changes: 6 additions & 6 deletions
12
...n_in/google_sign_in_web/test/pubspec.yaml → ...n/google_sign_in_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
7 changes: 5 additions & 2 deletions
7
..._sign_in/google_sign_in_web/test/run_test → ...in/google_sign_in_web/example/run_test.sh
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,20 @@ | ||
#!/usr/bin/bash | ||
|
||
if pgrep -lf chromedriver > /dev/null; then | ||
echo "chromedriver is running." | ||
|
||
if [ $# -eq 0 ]; then | ||
echo "No target specified, running all tests..." | ||
find test_driver/ -iname *_integration.dart | xargs -n1 -i -t flutter drive -d web-server --web-port=7357 --browser-name=chrome --target='{}' | ||
find integration_test/ -iname *_test.dart | xargs -n1 -i -t flutter drive -d web-server --web-port=7357 --browser-name=chrome --driver=test_driver/integration_driver.dart --target='{}' | ||
else | ||
echo "Running test target: $1..." | ||
set -x | ||
flutter drive -d web-server --web-port=7357 --browser-name=chrome --target=$1 | ||
flutter drive -d web-server --web-port=7357 --browser-name=chrome --driver=test_driver/integration_driver.dart --target=$1 | ||
fi | ||
|
||
else | ||
echo "chromedriver is not running." | ||
fi | ||
|
||
|
||
|
File renamed without changes.
File renamed without changes.
Oops, something went wrong.