Skip to content

Commit 6c81510

Browse files
migrate e2e test to integration test (#744)
1 parent 3b2a712 commit 6c81510

File tree

5 files changed

+47
-60
lines changed

5 files changed

+47
-60
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# federated_plugin_web
22

33
A flutter plugin to provide location support for web. The web implementation
4-
of `federated_plugin` is tested using [e2e](https://pub.dev/packages/e2e) package.
4+
of `federated_plugin` is tested using [integration_test](https://pub.dev/packages/integration_test) package.
55

6-
### Steps to run e2e test on browser
6+
### Steps to run integration test on browser
77

88
- Download and install the ChromeDriver from [here](https://chromedriver.chromium.org/downloads)
99
for the version of Chrome you are using.
1010
- Start the driver using `chromedrive --port=4444`
11-
- Run the test using `flutter drive -d web-server --release --browser-name=chrome --target=test_driver/federated_plugin_web_e2e.dart`
11+
- Run the test using `flutter drive -d web-server --browser-name=chrome --release --target=test_driver/federated_plugin_web_integration.dart`

experimental/federated_plugin/federated_plugin_web/pubspec.lock

Lines changed: 38 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@ packages:
77
name: _fe_analyzer_shared
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "12.0.0"
10+
version: "14.0.0"
1111
analyzer:
1212
dependency: transitive
1313
description:
1414
name: analyzer
1515
url: "https://pub.dartlang.org"
1616
source: hosted
17-
version: "0.40.6"
17+
version: "0.41.2"
1818
archive:
1919
dependency: transitive
2020
description:
2121
name: archive
2222
url: "https://pub.dartlang.org"
2323
source: hosted
24-
version: "2.0.13"
24+
version: "3.0.0"
2525
args:
2626
dependency: transitive
2727
description:
@@ -35,21 +35,21 @@ packages:
3535
name: async
3636
url: "https://pub.dartlang.org"
3737
source: hosted
38-
version: "2.5.0-nullsafety.3"
38+
version: "2.5.0"
3939
boolean_selector:
4040
dependency: transitive
4141
description:
4242
name: boolean_selector
4343
url: "https://pub.dartlang.org"
4444
source: hosted
45-
version: "2.1.0-nullsafety.3"
45+
version: "2.1.0"
4646
build:
4747
dependency: transitive
4848
description:
4949
name: build
5050
url: "https://pub.dartlang.org"
5151
source: hosted
52-
version: "1.6.0"
52+
version: "1.6.2"
5353
built_collection:
5454
dependency: transitive
5555
description:
@@ -70,14 +70,14 @@ packages:
7070
name: characters
7171
url: "https://pub.dartlang.org"
7272
source: hosted
73-
version: "1.1.0-nullsafety.5"
73+
version: "1.1.0"
7474
charcode:
7575
dependency: transitive
7676
description:
7777
name: charcode
7878
url: "https://pub.dartlang.org"
7979
source: hosted
80-
version: "1.2.0-nullsafety.3"
80+
version: "1.2.0"
8181
cli_util:
8282
dependency: transitive
8383
description:
@@ -91,7 +91,7 @@ packages:
9191
name: clock
9292
url: "https://pub.dartlang.org"
9393
source: hosted
94-
version: "1.1.0-nullsafety.3"
94+
version: "1.1.0"
9595
code_builder:
9696
dependency: transitive
9797
description:
@@ -105,7 +105,7 @@ packages:
105105
name: collection
106106
url: "https://pub.dartlang.org"
107107
source: hosted
108-
version: "1.15.0-nullsafety.5"
108+
version: "1.15.0"
109109
convert:
110110
dependency: transitive
111111
description:
@@ -119,28 +119,21 @@ packages:
119119
name: crypto
120120
url: "https://pub.dartlang.org"
121121
source: hosted
122-
version: "2.1.5"
122+
version: "3.0.0"
123123
dart_style:
124124
dependency: transitive
125125
description:
126126
name: dart_style
127127
url: "https://pub.dartlang.org"
128128
source: hosted
129129
version: "1.3.10"
130-
e2e:
131-
dependency: "direct dev"
132-
description:
133-
name: e2e
134-
url: "https://pub.dartlang.org"
135-
source: hosted
136-
version: "0.7.0+1"
137130
fake_async:
138131
dependency: transitive
139132
description:
140133
name: fake_async
141134
url: "https://pub.dartlang.org"
142135
source: hosted
143-
version: "1.2.0-nullsafety.3"
136+
version: "1.2.0"
144137
federated_plugin_platform_interface:
145138
dependency: "direct main"
146139
description:
@@ -154,7 +147,7 @@ packages:
154147
name: file
155148
url: "https://pub.dartlang.org"
156149
source: hosted
157-
version: "6.0.0-nullsafety.4"
150+
version: "6.1.0"
158151
fixnum:
159152
dependency: transitive
160153
description:
@@ -194,20 +187,20 @@ packages:
194187
url: "https://pub.dartlang.org"
195188
source: hosted
196189
version: "1.2.0"
197-
js:
198-
dependency: transitive
190+
integration_test:
191+
dependency: "direct dev"
199192
description:
200-
name: js
193+
name: integration_test
201194
url: "https://pub.dartlang.org"
202195
source: hosted
203-
version: "0.6.3-nullsafety.3"
204-
json_rpc_2:
196+
version: "1.0.2+2"
197+
js:
205198
dependency: transitive
206199
description:
207-
name: json_rpc_2
200+
name: js
208201
url: "https://pub.dartlang.org"
209202
source: hosted
210-
version: "2.2.2"
203+
version: "0.6.3"
211204
logging:
212205
dependency: transitive
213206
description:
@@ -221,21 +214,21 @@ packages:
221214
name: matcher
222215
url: "https://pub.dartlang.org"
223216
source: hosted
224-
version: "0.12.10-nullsafety.3"
217+
version: "0.12.10"
225218
meta:
226219
dependency: transitive
227220
description:
228221
name: meta
229222
url: "https://pub.dartlang.org"
230223
source: hosted
231-
version: "1.3.0-nullsafety.6"
224+
version: "1.3.0"
232225
mockito:
233226
dependency: "direct dev"
234227
description:
235228
name: mockito
236229
url: "https://pub.dartlang.org"
237230
source: hosted
238-
version: "4.1.3"
231+
version: "4.1.4"
239232
node_interop:
240233
dependency: transitive
241234
description:
@@ -263,7 +256,7 @@ packages:
263256
name: path
264257
url: "https://pub.dartlang.org"
265258
source: hosted
266-
version: "1.8.0-nullsafety.3"
259+
version: "1.8.0"
267260
pedantic:
268261
dependency: "direct dev"
269262
description:
@@ -277,7 +270,7 @@ packages:
277270
name: platform
278271
url: "https://pub.dartlang.org"
279272
source: hosted
280-
version: "3.0.0-nullsafety.4"
273+
version: "3.0.0"
281274
plugin_platform_interface:
282275
dependency: transitive
283276
description:
@@ -291,7 +284,7 @@ packages:
291284
name: process
292285
url: "https://pub.dartlang.org"
293286
source: hosted
294-
version: "4.0.0-nullsafety.4"
287+
version: "4.1.0"
295288
pub_semver:
296289
dependency: transitive
297290
description:
@@ -324,91 +317,84 @@ packages:
324317
name: source_span
325318
url: "https://pub.dartlang.org"
326319
source: hosted
327-
version: "1.8.0-nullsafety.4"
320+
version: "1.8.1"
328321
stack_trace:
329322
dependency: transitive
330323
description:
331324
name: stack_trace
332325
url: "https://pub.dartlang.org"
333326
source: hosted
334-
version: "1.10.0-nullsafety.6"
327+
version: "1.10.0"
335328
stream_channel:
336329
dependency: transitive
337330
description:
338331
name: stream_channel
339332
url: "https://pub.dartlang.org"
340333
source: hosted
341-
version: "2.1.0-nullsafety.3"
334+
version: "2.1.0"
342335
string_scanner:
343336
dependency: transitive
344337
description:
345338
name: string_scanner
346339
url: "https://pub.dartlang.org"
347340
source: hosted
348-
version: "1.1.0-nullsafety.3"
341+
version: "1.1.0"
349342
sync_http:
350343
dependency: transitive
351344
description:
352345
name: sync_http
353346
url: "https://pub.dartlang.org"
354347
source: hosted
355-
version: "0.2.0"
348+
version: "0.3.0"
356349
term_glyph:
357350
dependency: transitive
358351
description:
359352
name: term_glyph
360353
url: "https://pub.dartlang.org"
361354
source: hosted
362-
version: "1.2.0-nullsafety.3"
355+
version: "1.2.0"
363356
test_api:
364357
dependency: transitive
365358
description:
366359
name: test_api
367360
url: "https://pub.dartlang.org"
368361
source: hosted
369-
version: "0.2.19-nullsafety.6"
362+
version: "0.2.19"
370363
typed_data:
371364
dependency: transitive
372365
description:
373366
name: typed_data
374367
url: "https://pub.dartlang.org"
375368
source: hosted
376-
version: "1.3.0-nullsafety.5"
369+
version: "1.3.0"
377370
vector_math:
378371
dependency: transitive
379372
description:
380373
name: vector_math
381374
url: "https://pub.dartlang.org"
382375
source: hosted
383-
version: "2.1.0-nullsafety.5"
376+
version: "2.1.0"
384377
vm_service:
385378
dependency: transitive
386379
description:
387380
name: vm_service
388381
url: "https://pub.dartlang.org"
389382
source: hosted
390-
version: "5.5.0"
383+
version: "6.0.1-nullsafety.1"
391384
watcher:
392385
dependency: transitive
393386
description:
394387
name: watcher
395388
url: "https://pub.dartlang.org"
396389
source: hosted
397390
version: "0.9.7+15"
398-
web_socket_channel:
399-
dependency: transitive
400-
description:
401-
name: web_socket_channel
402-
url: "https://pub.dartlang.org"
403-
source: hosted
404-
version: "1.1.0"
405391
webdriver:
406392
dependency: transitive
407393
description:
408394
name: webdriver
409395
url: "https://pub.dartlang.org"
410396
source: hosted
411-
version: "2.1.2"
397+
version: "3.0.0"
412398
yaml:
413399
dependency: transitive
414400
description:
@@ -418,4 +404,4 @@ packages:
418404
version: "2.2.1"
419405
sdks:
420406
dart: ">=2.12.0-0.0 <3.0.0"
421-
flutter: ">=1.17.0 <2.0.0"
407+
flutter: ">=1.17.0"

experimental/federated_plugin/federated_plugin_web/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ dependencies:
1919
dev_dependencies:
2020
flutter_test:
2121
sdk: flutter
22+
integration_test: ^1.0.1
2223
pedantic: ^1.9.0
23-
e2e: ^0.7.0
2424
mockito: ^4.1.1
2525

2626
flutter:

experimental/federated_plugin/federated_plugin_web/test_driver/federated_plugin_web_e2e.dart renamed to experimental/federated_plugin/federated_plugin_web/test_driver/federated_plugin_web_integration.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
import 'dart:html';
66

7-
import 'package:e2e/e2e.dart';
87
import 'package:federated_plugin_web/federated_plugin_web.dart';
98
import 'package:flutter_test/flutter_test.dart';
9+
import 'package:integration_test/integration_test.dart';
1010
import 'package:mockito/mockito.dart';
1111

1212
const kBatteryLevel = 0.49;
@@ -19,7 +19,7 @@ class BatteryManagerMock extends Mock implements BatteryManager {
1919
}
2020

2121
void main() {
22-
E2EWidgetsFlutterBinding.ensureInitialized();
22+
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
2323

2424
group('FederatedPlugin test', () {
2525
final navigatorMock = NavigatorMock();
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import 'dart:async';
66

7-
import 'package:e2e/e2e_driver.dart' as e2e;
7+
import 'package:integration_test/integration_test_driver.dart';
88

9-
Future<void> main() async => e2e.main();
9+
10+
Future<void> main() async => integrationDriver();

0 commit comments

Comments
 (0)