Skip to content

Commit ee5f424

Browse files
Updates to espresso docs (flutter#2461)
* updates to espresso docs
1 parent 3ec92b4 commit ee5f424

File tree

3 files changed

+9
-28
lines changed

3 files changed

+9
-28
lines changed

Diff for: packages/espresso/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.0.1+1
2+
3+
* Updates to README to avoid unnecessary imports and warnings.
4+
15
## 0.0.1
26

37
* Initial open-source release of Espresso bindings for Flutter.

Diff for: packages/espresso/README.md

+4-27
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,15 @@ Add ```android:usesCleartextTraffic="true"``` in the ```<application>``` in the
1010
of the Android app used for testing. It's best to put this in a debug or androidTest
1111
AndroidManifest.xml so that you don't ship it to end users. (See the example app of this package.)
1212

13-
Add dependencies to your build.gradle:
13+
Add the following dependencies in android/app/build.gradle:
1414

1515
```groovy
1616
dependencies {
1717
testImplementation 'junit:junit:4.12'
1818
testImplementation "com.google.truth:truth:1.0"
1919
androidTestImplementation 'androidx.test:runner:1.1.1'
2020
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
21-
22-
// Core library
2321
api 'androidx.test:core:1.2.0'
24-
25-
// AndroidJUnitRunner and JUnit Rules
26-
androidTestImplementation 'androidx.test:runner:1.1.0'
27-
androidTestImplementation 'androidx.test:rules:1.1.0'
28-
29-
// Assertions
30-
androidTestImplementation 'androidx.test.ext:junit:1.0.0'
31-
androidTestImplementation 'androidx.test.ext:truth:1.0.0'
32-
androidTestImplementation 'com.google.truth:truth:0.42'
33-
34-
// Espresso dependencies
35-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
36-
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.0'
37-
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0'
38-
androidTestImplementation 'androidx.test.espresso:espresso-accessibility:3.1.0'
39-
androidTestImplementation 'androidx.test.espresso:espresso-web:3.1.0'
40-
androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.1.0'
41-
42-
// The following Espresso dependency can be either "implementation"
43-
// or "androidTestImplementation", depending on whether you want the
44-
// dependency to appear on your APK's compile classpath or the test APK
45-
// classpath.
46-
androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.1.0'
4722
}
4823
```
4924

@@ -91,10 +66,12 @@ public class MainActivityTest {
9166

9267
You'll need to create a test app that enables the Flutter driver extension.
9368
You can put this in your test_driver/ folder, e.g. test_driver/example.dart.
69+
Replace `<app_package_name>` with the package name of your app. If you're
70+
developing a plugin, this will be the package name of the example app.
9471

9572
```dart
9673
import 'package:flutter_driver/driver_extension.dart';
97-
import '../lib/main.dart' as app;
74+
import 'package:<app_package_name>/main.dart' as app;
9875

9976
void main() {
10077
enableFlutterDriverExtension();

Diff for: packages/espresso/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: espresso
22
description: Java classes for testing Flutter apps using Espresso.
3-
version: 0.0.1
3+
version: 0.0.1+1
44
homepage: https://github.com/flutter/plugins/espresso
55

66
environment:

0 commit comments

Comments
 (0)