File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -278,17 +278,21 @@ We use [shot](https://github.com/Karumi/Shot) for taking screenshots and compare
278
278
- this will fire up docker & emulator to ensure that screenshots look the same
279
279
- creating own UI comparision tests:
280
280
- add IntentsTestRule for launching activity directly:
281
+
281
282
``` java
282
- @Rule public IntentsTestRule<SettingsActivity > activityRule = new IntentsTestRule<> (SettingsActivity . class,
283
+ @Rule public IntentsTestRule<SettingsActivity > activityRule = new IntentsTestRule<> (SettingsActivity . class,
283
284
true ,
284
285
false );
285
- ```
286
+ ```
287
+
286
288
- in test method:
289
+
287
290
```java
288
- Activity activity = activityRule. launchActivity(null );
289
- …do something, e. g. navigate, create folder, etc. …
290
- Screenshot . snapActivity(activity). record();
291
- ```
291
+ Activity activity = activityRule. launchActivity(null );
292
+ …do something, e. g. navigate, create folder, etc. …
293
+ Screenshot . snapActivity(activity). record();
294
+ ```
295
+
292
296
- best practise is to first create test with emulator too see behaviour and then create screenshots
293
297
294
298
## File naming
You can’t perform that action at this time.
0 commit comments