From 460c888295860da47852a8cb5832255221cedd26 Mon Sep 17 00:00:00 2001 From: Michael Bui <25263378+MaikuB@users.noreply.github.com> Date: Sun, 23 Feb 2020 13:12:13 +1100 Subject: [PATCH 1/2] [e2e] fix flutter driver code snippet in readme and improve formatting --- packages/e2e/README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/e2e/README.md b/packages/e2e/README.md index b3c19ec40027..ed892ab6e7ff 100644 --- a/packages/e2e/README.md +++ b/packages/e2e/README.md @@ -41,12 +41,15 @@ Note that the tests don't use the `FlutterDriver` API, they use `testWidgets` in Put the a file named `_e2e_test.dart` in the app' `test_driver` directory: -``` +```dart +import 'dart:async'; +import 'dart:io'; import 'package:flutter_driver/flutter_driver.dart'; Future main() async { final FlutterDriver driver = await FlutterDriver.connect(); - await driver.requestData(null, timeout: const Duration(minutes: 1)); + final String result = + await driver.requestData(null, timeout: const Duration(minutes: 1)); await driver.close(); exit(result == 'pass' ? 0 : 1); } @@ -73,7 +76,7 @@ Create an instrumentation test file in your application's com, example, and myapp with values from your app's package name). You can name this test file MainActivityTest.java or another name of your choice. -``` +```java package com.example.myapp; import androidx.test.rule.ActivityTestRule; From 28a5cacc93103f0f582f53db9628607a02879080 Mon Sep 17 00:00:00 2001 From: Michael Bui <25263378+MaikuB@users.noreply.github.com> Date: Sun, 23 Feb 2020 13:16:53 +1100 Subject: [PATCH 2/2] [e2] bump version and add changelog entry --- packages/e2e/CHANGELOG.md | 4 ++++ packages/e2e/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/e2e/CHANGELOG.md b/packages/e2e/CHANGELOG.md index 442b1db121f9..35d3159e05b4 100644 --- a/packages/e2e/CHANGELOG.md +++ b/packages/e2e/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.4+3 + +* Fixed code snippet in the readme under the "Using Flutter driver to run tests" section. + ## 0.2.4+2 * Make the pedantic dev_dependency explicit. diff --git a/packages/e2e/pubspec.yaml b/packages/e2e/pubspec.yaml index 956f5bf0cbb7..68735867218c 100644 --- a/packages/e2e/pubspec.yaml +++ b/packages/e2e/pubspec.yaml @@ -1,6 +1,6 @@ name: e2e description: Runs tests that use the flutter_test API as integration tests. -version: 0.2.4+2 +version: 0.2.4+3 homepage: https://github.com/flutter/plugins/tree/master/packages/e2e environment: