Skip to content

Commit a43e669

Browse files
committedMar 31, 2017
Videos
1 parent 92c277b commit a43e669

File tree

6 files changed

+10
-3
lines changed

6 files changed

+10
-3
lines changed
 

‎README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ Merge click and checks in one
157157
````
158158
<br/>
159159
<br/>
160+
<embed src="./screenshots/login_error_checks.mp4" autostart="false" height="500" width="500" />
160161

161162
Tutorial 4
162163
-------------------------------
@@ -202,6 +203,9 @@ Tutorial 5
202203
-------------------------------
203204
Responding to external intents like gallery picks
204205
It's hard to control external apps as with device applications can have different views so it's not steady like your UI. in this condition what you can do is develop dependency injected code where you can mock the intents results or you can give result of intents in testing.
206+
We are trying to archive this:
207+
<embed src="./screenshots/normal_gallery_pick.mp4" autostart="false" height="500" width="500" />
208+
205209

206210
Let's check without DI(Dependency Injection)
207211
-----------------
@@ -235,7 +239,8 @@ It is used to check if the event intended to open some activity or package? we c
235239

236240
In above example we have action pick event matcher which gives espresso hint that i'm finding this intent and by initlizing the intent we are starting intent checks for every intents.
237241
while intending tells that when I intend to do respond with the intent i'm giving.
238-
242+
Output:
243+
<embed src="./screenshots/gallery_pick.mp4" autostart="false" height="500" width="500" />
239244

240245
Tutorial 6
241246
-----------------------------------------------
@@ -286,4 +291,6 @@ basically info window is drawn above marker icon and so i already got marker obj
286291
}
287292
````
288293

289-
If you do like the Tutorials please rate this repo and do share your own testing class or methodology.
294+
If you do like the Tutorials please rate this repo and do share your own testing class or methodology.
295+
output:
296+
<embed src="./screenshots/google_marker_click.mp4" autostart="false" height="500" width="500" />

‎app/src/androidTest/java/com/testingandroid/Tutorial5/GalleryPickerTesting.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void checkTextOnScreen() {
4949
//to check view on screen
5050

5151
Intent resultData = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
52-
resultData.setData(Uri.parse(("content://media/external/images/media/162")));
52+
resultData.setData(Uri.parse(("content://media/external/images/media/337663")));
5353
Matcher<Intent> MediaPickIntent = allOf(hasAction(Intent.ACTION_PICK), hasData(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI));
5454
Intents.init();
5555
intending(MediaPickIntent).respondWith(new Instrumentation.ActivityResult(Activity.RESULT_OK, resultData));

‎screenshots/gallery_pick.mp4

1.11 MB
Binary file not shown.

‎screenshots/google_marker_click.mp4

965 KB
Binary file not shown.

‎screenshots/login_error_checks.mp4

1.78 MB
Binary file not shown.

‎screenshots/normal_gallery_pick.mp4

4.23 MB
Binary file not shown.

0 commit comments

Comments
 (0)