migrate e2e test to integration test (#744)

pull/677/head
Ayush Bherwani 4 years ago committed by GitHub
parent 3b2a7121ca
commit 6c81510d6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,11 +1,11 @@
# federated_plugin_web # federated_plugin_web
A flutter plugin to provide location support for web. The web implementation A flutter plugin to provide location support for web. The web implementation
of `federated_plugin` is tested using [e2e](https://pub.dev/packages/e2e) package. of `federated_plugin` is tested using [integration_test](https://pub.dev/packages/integration_test) package.
### Steps to run e2e test on browser ### Steps to run integration test on browser
- Download and install the ChromeDriver from [here](https://chromedriver.chromium.org/downloads) - Download and install the ChromeDriver from [here](https://chromedriver.chromium.org/downloads)
for the version of Chrome you are using. for the version of Chrome you are using.
- Start the driver using `chromedrive --port=4444` - Start the driver using `chromedrive --port=4444`
- Run the test using `flutter drive -d web-server --release --browser-name=chrome --target=test_driver/federated_plugin_web_e2e.dart` - Run the test using `flutter drive -d web-server --browser-name=chrome --release --target=test_driver/federated_plugin_web_integration.dart`

@ -7,21 +7,21 @@ packages:
name: _fe_analyzer_shared name: _fe_analyzer_shared
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "12.0.0" version: "14.0.0"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
name: analyzer name: analyzer
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.40.6" version: "0.41.2"
archive: archive:
dependency: transitive dependency: transitive
description: description:
name: archive name: archive
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.13" version: "3.0.0"
args: args:
dependency: transitive dependency: transitive
description: description:
@ -35,21 +35,21 @@ packages:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.5.0-nullsafety.3" version: "2.5.0"
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
description: description:
name: boolean_selector name: boolean_selector
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0-nullsafety.3" version: "2.1.0"
build: build:
dependency: transitive dependency: transitive
description: description:
name: build name: build
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.6.0" version: "1.6.2"
built_collection: built_collection:
dependency: transitive dependency: transitive
description: description:
@ -70,14 +70,14 @@ packages:
name: characters name: characters
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0-nullsafety.5" version: "1.1.0"
charcode: charcode:
dependency: transitive dependency: transitive
description: description:
name: charcode name: charcode
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0-nullsafety.3" version: "1.2.0"
cli_util: cli_util:
dependency: transitive dependency: transitive
description: description:
@ -91,7 +91,7 @@ packages:
name: clock name: clock
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0-nullsafety.3" version: "1.1.0"
code_builder: code_builder:
dependency: transitive dependency: transitive
description: description:
@ -105,7 +105,7 @@ packages:
name: collection name: collection
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.15.0-nullsafety.5" version: "1.15.0"
convert: convert:
dependency: transitive dependency: transitive
description: description:
@ -119,7 +119,7 @@ packages:
name: crypto name: crypto
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.5" version: "3.0.0"
dart_style: dart_style:
dependency: transitive dependency: transitive
description: description:
@ -127,20 +127,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.10" version: "1.3.10"
e2e:
dependency: "direct dev"
description:
name: e2e
url: "https://pub.dartlang.org"
source: hosted
version: "0.7.0+1"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
name: fake_async name: fake_async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0-nullsafety.3" version: "1.2.0"
federated_plugin_platform_interface: federated_plugin_platform_interface:
dependency: "direct main" dependency: "direct main"
description: description:
@ -154,7 +147,7 @@ packages:
name: file name: file
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "6.0.0-nullsafety.4" version: "6.1.0"
fixnum: fixnum:
dependency: transitive dependency: transitive
description: description:
@ -194,20 +187,20 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.0"
js: integration_test:
dependency: transitive dependency: "direct dev"
description: description:
name: js name: integration_test
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.3-nullsafety.3" version: "1.0.2+2"
json_rpc_2: js:
dependency: transitive dependency: transitive
description: description:
name: json_rpc_2 name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.2.2" version: "0.6.3"
logging: logging:
dependency: transitive dependency: transitive
description: description:
@ -221,21 +214,21 @@ packages:
name: matcher name: matcher
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.12.10-nullsafety.3" version: "0.12.10"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.6" version: "1.3.0"
mockito: mockito:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: mockito name: mockito
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.1.3" version: "4.1.4"
node_interop: node_interop:
dependency: transitive dependency: transitive
description: description:
@ -263,7 +256,7 @@ packages:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.0-nullsafety.3" version: "1.8.0"
pedantic: pedantic:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -277,7 +270,7 @@ packages:
name: platform name: platform
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.0-nullsafety.4" version: "3.0.0"
plugin_platform_interface: plugin_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -291,7 +284,7 @@ packages:
name: process name: process
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.0.0-nullsafety.4" version: "4.1.0"
pub_semver: pub_semver:
dependency: transitive dependency: transitive
description: description:
@ -324,70 +317,70 @@ packages:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.0-nullsafety.4" version: "1.8.1"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.6" version: "1.10.0"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
name: stream_channel name: stream_channel
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0-nullsafety.3" version: "2.1.0"
string_scanner: string_scanner:
dependency: transitive dependency: transitive
description: description:
name: string_scanner name: string_scanner
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0-nullsafety.3" version: "1.1.0"
sync_http: sync_http:
dependency: transitive dependency: transitive
description: description:
name: sync_http name: sync_http
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.2.0" version: "0.3.0"
term_glyph: term_glyph:
dependency: transitive dependency: transitive
description: description:
name: term_glyph name: term_glyph
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0-nullsafety.3" version: "1.2.0"
test_api: test_api:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.2.19-nullsafety.6" version: "0.2.19"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
name: typed_data name: typed_data
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.5" version: "1.3.0"
vector_math: vector_math:
dependency: transitive dependency: transitive
description: description:
name: vector_math name: vector_math
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0-nullsafety.5" version: "2.1.0"
vm_service: vm_service:
dependency: transitive dependency: transitive
description: description:
name: vm_service name: vm_service
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.5.0" version: "6.0.1-nullsafety.1"
watcher: watcher:
dependency: transitive dependency: transitive
description: description:
@ -395,20 +388,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.9.7+15" version: "0.9.7+15"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
webdriver: webdriver:
dependency: transitive dependency: transitive
description: description:
name: webdriver name: webdriver
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.2" version: "3.0.0"
yaml: yaml:
dependency: transitive dependency: transitive
description: description:
@ -418,4 +404,4 @@ packages:
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.12.0-0.0 <3.0.0" dart: ">=2.12.0-0.0 <3.0.0"
flutter: ">=1.17.0 <2.0.0" flutter: ">=1.17.0"

@ -19,8 +19,8 @@ dependencies:
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
integration_test: ^1.0.1
pedantic: ^1.9.0 pedantic: ^1.9.0
e2e: ^0.7.0
mockito: ^4.1.1 mockito: ^4.1.1
flutter: flutter:

@ -4,9 +4,9 @@
import 'dart:html'; import 'dart:html';
import 'package:e2e/e2e.dart';
import 'package:federated_plugin_web/federated_plugin_web.dart'; import 'package:federated_plugin_web/federated_plugin_web.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:mockito/mockito.dart'; import 'package:mockito/mockito.dart';
const kBatteryLevel = 0.49; const kBatteryLevel = 0.49;
@ -19,7 +19,7 @@ class BatteryManagerMock extends Mock implements BatteryManager {
} }
void main() { void main() {
E2EWidgetsFlutterBinding.ensureInitialized(); IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('FederatedPlugin test', () { group('FederatedPlugin test', () {
final navigatorMock = NavigatorMock(); final navigatorMock = NavigatorMock();

@ -4,6 +4,7 @@
import 'dart:async'; import 'dart:async';
import 'package:e2e/e2e_driver.dart' as e2e; import 'package:integration_test/integration_test_driver.dart';
Future<void> main() async => e2e.main();
Future<void> main() async => integrationDriver();
Loading…
Cancel
Save