Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/e2e/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.2.2+1

* Fix pedantic lints. Adds a missing await in the example test and some missing
documentation.

## 0.2.2

* Added a stub macos implementation
Expand Down
8 changes: 4 additions & 4 deletions packages/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import 'package:flutter_driver/flutter_driver.dart';
Future<void> main() async {
final FlutterDriver driver = await FlutterDriver.connect();
await driver.requestData(null, timeout: const Duration(minutes: 1));
driver.close();
await driver.close();
exit(result == 'pass' ? 0 : 1);
}
```
Expand Down Expand Up @@ -118,9 +118,9 @@ To e2e test on a local Android device (emulated or physical):

## Firebase Test Lab

If this is you first time testing with Firebase Test Lab,
you'll need to follow the guides in the
[Firebase test lab documentation](https://firebase.google.com/docs/test-lab/?gclid=EAIaIQobChMIs5qVwqW25QIV8iCtBh3DrwyUEAAYASAAEgLFU_D_BwE)
If this is your first time testing with Firebase Test Lab, you'll need to follow
the guides in the [Firebase test lab
documentation](https://firebase.google.com/docs/test-lab/?gclid=EAIaIQobChMIs5qVwqW25QIV8iCtBh3DrwyUEAAYASAAEgLFU_D_BwE)
to set up a project.

To run an e2e test on Android devices using Firebase Test Lab, use gradle commands to build an
Expand Down
11 changes: 0 additions & 11 deletions packages/e2e/analysis_options.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions packages/e2e/example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'dart:io' show Platform;
import 'package:flutter/material.dart';

// ignore_for_file: public_member_api_docs

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/example/test_driver/example_e2e_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Future<void> main() async {
final FlutterDriver driver = await FlutterDriver.connect();
final String result =
await driver.requestData(null, timeout: const Duration(minutes: 1));
driver.close();
await driver.close();
exit(result == 'pass' ? 0 : 1);
}
6 changes: 6 additions & 0 deletions packages/e2e/lib/e2e.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import 'package:flutter/widgets.dart';
/// A subclass of [LiveTestWidgetsFlutterBinding] that reports tests results
/// on a channel to adapt them to native instrumentation test format.
class E2EWidgetsFlutterBinding extends LiveTestWidgetsFlutterBinding {
/// Sets up a listener to report that the tests are finished when everything is
/// torn down.
E2EWidgetsFlutterBinding() {
// TODO(jackson): Report test results as they arrive
tearDownAll(() async {
Expand All @@ -26,6 +28,10 @@ class E2EWidgetsFlutterBinding extends LiveTestWidgetsFlutterBinding {

final Completer<bool> _allTestsPassed = Completer<bool>();

/// Similar to [WidgetsFlutterBinding.ensureInitialized].
///
/// Returns an instance of the [E2EWidgetsFlutterBinding], creating and
/// initializing it if necessary.
static WidgetsBinding ensureInitialized() {
if (WidgetsBinding.instance == null) {
E2EWidgetsFlutterBinding();
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: e2e
description: Runs tests that use the flutter_test API as integration tests.
version: 0.2.2
version: 0.2.2+1
author: Flutter Team <[email protected]>
homepage: https://github.com/flutter/plugins/tree/master/packages/e2e

Expand Down