Skip to content

Commit

Permalink
[web] changing the integration tests to show errors (flutter#17364)
Browse files Browse the repository at this point in the history
* changing the integration tests to show errors. The drive file is reduced to nothing now

* adding more to readme

* rebase to master and removing unused import

* changing readme
  • Loading branch information
Nurhan Turgut authored Mar 27, 2020
1 parent 91ccdbe commit 3ee9e3d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 32 deletions.
12 changes: 9 additions & 3 deletions e2etests/web/regular_integration_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ configuration (e.g. PWA vs non-PWA packaging), please create another
directory under e2etests/web. Otherwise tests such as text_editing, history,
scrolling, pointer events... should all go under this package.
# To run the application under test for traouble shooting purposes.
Tests can be run on both 'release' and 'profile' modes. However 'release' mode
will shorten the error. Use 'profile' mode for trouble-shooting purposes where
you can also see the full stack trace.
# To run the application under test for trouble shooting purposes.
flutter run -d web-server lib/text_editing_main.dart --local-engine=host_debug_unopt
# To run the Text Editing test and use the developer tools in the browser.
flutter run --target=test_driver/text_editing_e2e.dart -d web-server --web-port=8080 --release --local-engine=host_debug_unopt
flutter run --target=test_driver/text_editing_e2e.dart -d web-server --web-port=8080 --profile --local-engine=host_debug_unopt
# To test the Text Editing test with driver you either of the following:
flutter drive -v --target=test_driver/text_editing_e2e.dart -d web-server --profile --browser-name=chrome --local-engine=host_debug_unopt
# To test the Text Editing test with driver:
flutter drive -v --target=test_driver/text_editing_e2e.dart -d web-server --release --browser-name=chrome --local-engine=host_debug_unopt
```
4 changes: 2 additions & 2 deletions e2etests/web/regular_integration_tests/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ dev_dependencies:
sdk: flutter
flutter_test:
sdk: flutter
e2e: 0.2.4+4
e2e: 0.4.0
http: 0.12.0+2
test: any

flutter:
assets:
- assets/images/
- assets/images/
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// found in the LICENSE file.

import 'dart:html' as html;
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:regular_integration_tests/image_loading_main.dart' as app;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:io';
import 'package:e2e/e2e_driver.dart' as e2e;

import 'package:flutter_driver/flutter_driver.dart';

Future<void> main() async {
final FlutterDriver driver = await FlutterDriver.connect();

final String dataRequest =
await driver.requestData(null, timeout: const Duration(seconds: 1));
await driver.close();

exit(dataRequest == 'pass' ? 0 : 1);
}
Future<void> main() async => e2e.main();
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:io';
import 'package:e2e/e2e_driver.dart' as e2e;

import 'package:flutter_driver/flutter_driver.dart';

Future<void> main() async {
final FlutterDriver driver = await FlutterDriver.connect();

// TODO(nurhan): https://github.com/flutter/flutter/issues/51940
final String dataRequest =
await driver.requestData(null, timeout: const Duration(seconds: 1));
print('result $dataRequest');
await driver.close();

exit(dataRequest == 'pass' ? 0 : 1);
}
Future<void> main() async => e2e.main();

0 comments on commit 3ee9e3d

Please sign in to comment.