Skip to content

Commit

Permalink
[web] migrate from e2e to integration_test (flutter#20914)
Browse files Browse the repository at this point in the history
* migrate from e2e to integration_test

* address reviewer comments
  • Loading branch information
nturgut authored Sep 1, 2020
1 parent abe10d1 commit 101316b
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 35 deletions.
2 changes: 1 addition & 1 deletion e2etests/web/regular_integration_tests/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dev_dependencies:
sdk: flutter
flutter_test:
sdk: flutter
e2e: 0.4.0
integration_test: 0.9.0
http: 0.12.0+2
test: any

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import 'dart:html' as html;
import 'package:flutter_test/flutter_test.dart';
import 'package:regular_integration_tests/image_loading_main.dart' as app;

import 'package:e2e/e2e.dart';
import 'package:integration_test/integration_test.dart';

void main() {
E2EWidgetsFlutterBinding.ensureInitialized() as E2EWidgetsFlutterBinding;
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

testWidgets('Image loads asset variant based on device pixel ratio',
(WidgetTester tester) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:e2e/e2e_driver.dart' as e2e;
import 'package:integration_test/integration_test_driver.dart' as test;

Future<void> main() async => e2e.main();
Future<void> main() async => test.integrationDriver();
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:regular_integration_tests/platform_messages_main.dart' as app;

import 'package:e2e/e2e.dart';
import 'package:integration_test/integration_test.dart';

void main() async {
E2EWidgetsFlutterBinding.ensureInitialized() as E2EWidgetsFlutterBinding;
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

testWidgets('platform message for Clipboard.setData reply with future',
(WidgetTester tester) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:e2e/e2e_driver.dart' as e2e;
import 'package:integration_test/integration_test_driver.dart' as test;

Future<void> main() async => e2e.main();
Future<void> main() async => test.integrationDriver();
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:html' as html;
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:regular_integration_tests/profile_diagnostics_main.dart' as app;

import 'package:e2e/e2e.dart';
import 'package:integration_test/integration_test.dart';

void main() {
E2EWidgetsFlutterBinding.ensureInitialized() as E2EWidgetsFlutterBinding;
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

testWidgets('App build method exception should form valid FlutterErrorDetails',
(WidgetTester tester) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:e2e/e2e_driver.dart' as e2e;
import 'package:integration_test/integration_test_driver.dart' as test;

Future<void> main() async => e2e.main();
Future<void> main() async => test.integrationDriver();
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:regular_integration_tests/target_platform_main.dart' as app;
import 'package:flutter/material.dart';

import 'package:e2e/e2e.dart';
import 'package:integration_test/integration_test.dart';

void main() {
E2EWidgetsFlutterBinding.ensureInitialized() as E2EWidgetsFlutterBinding;
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

testWidgets('Should detect android platform when running on android device',
(WidgetTester tester) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:e2e/e2e_driver.dart' as e2e;
import 'package:integration_test/integration_test_driver.dart' as test;

Future<void> main() async => e2e.main();
Future<void> main() async => test.integrationDriver();
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:regular_integration_tests/target_platform_main.dart' as app;
import 'package:flutter/material.dart';

import 'package:e2e/e2e.dart';
import 'package:integration_test/integration_test.dart';

void main() {
E2EWidgetsFlutterBinding.ensureInitialized() as E2EWidgetsFlutterBinding;
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

testWidgets('Should detect iOS platform when running on iOS device',
(WidgetTester tester) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:e2e/e2e_driver.dart' as e2e;
import 'package:integration_test/integration_test_driver.dart' as test;

Future<void> main() async => e2e.main();
Future<void> main() async => test.integrationDriver();
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:regular_integration_tests/target_platform_main.dart' as app;
import 'package:flutter/material.dart';

import 'package:e2e/e2e.dart';
import 'package:integration_test/integration_test.dart';

void main() {
E2EWidgetsFlutterBinding.ensureInitialized() as E2EWidgetsFlutterBinding;
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

testWidgets('Should detect MacOS platform when running on MacOS',
(WidgetTester tester) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:e2e/e2e_driver.dart' as e2e;
import 'package:integration_test/integration_test_driver.dart' as test;

Future<void> main() async => e2e.main();
Future<void> main() async => test.integrationDriver();
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:regular_integration_tests/text_editing_main.dart' as app;
import 'package:flutter/material.dart';

import 'package:e2e/e2e.dart';
import 'package:integration_test/integration_test.dart';

void main() {
E2EWidgetsFlutterBinding.ensureInitialized() as E2EWidgetsFlutterBinding;
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

testWidgets('Focused text field creates a native input element',
(WidgetTester tester) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:e2e/e2e_driver.dart' as e2e;
import 'package:integration_test/integration_test_driver.dart' as test;

Future<void> main() async => e2e.main();
Future<void> main() async => test.integrationDriver();
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:regular_integration_tests/treeshaking_main.dart' as app;
import 'package:flutter/material.dart';

import 'package:e2e/e2e.dart';
import 'package:integration_test/integration_test.dart';

void main() {
E2EWidgetsFlutterBinding.ensureInitialized() as E2EWidgetsFlutterBinding;
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

testWidgets('debug+Fill+Properties for widgets is tree shaken',
(WidgetTester tester) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:e2e/e2e_driver.dart' as e2e;
import 'package:integration_test/integration_test_driver.dart' as test;

Future<void> main() async => e2e.main();
Future<void> main() async => test.integrationDriver();

0 comments on commit 101316b

Please sign in to comment.