appium-espresso-driver 2.25.0 → 2.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +2 -1
- package/espresso-server/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk +0 -0
- package/espresso-server/app/src/androidTest/java/io/appium/espressoserver/lib/helpers/CustomFailureHandler.kt +15 -4
- package/npm-shrinkwrap.json +39 -38
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [2.25.1](https://github.com/appium/appium-espresso-driver/compare/v2.25.0...v2.25.1) (2023-08-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Miscellaneous Chores
|
|
5
|
+
|
|
6
|
+
* **deps-dev:** bump lint-staged from 13.3.0 to 14.0.0 ([#899](https://github.com/appium/appium-espresso-driver/issues/899)) ([ca0048f](https://github.com/appium/appium-espresso-driver/commit/ca0048f841f8e8469ceaa69b4cfe01cc890348e8))
|
|
7
|
+
|
|
1
8
|
## [2.25.0](https://github.com/appium/appium-espresso-driver/compare/v2.24.0...v2.25.0) (2023-08-07)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -23,7 +23,6 @@ The Espresso package consists of two main parts:
|
|
|
23
23
|
|
|
24
24
|
The key difference between [UiAutomator2 Driver](https://github.com/appium/appium-uiautomator2-driver) and Espresso Driver is that UiAutomator2 is a black-box testing framework, and Espresso is a "grey-box" testing framework. The Espresso Driver itself is black-box (no internals of the code are exposed to the tester), but the Espresso framework itself has access to the internals of Android applications. This distinction has a few notable benefits. It can find elements that aren't rendered on the screen, it can identify elements by the Android View Tag, and it makes use of [IdlingResource](https://developer.android.com/reference/android/support/test/espresso/IdlingResource) which blocks the framework from running commands until the UI thread is free. There is a limited support of out-of-app areas automation via the [mobile: uiautomator](#mobile-uiautomator) command.
|
|
25
25
|
|
|
26
|
-
|
|
27
26
|
## Requirements
|
|
28
27
|
|
|
29
28
|
On top of standard Appium requirements Espresso driver also expects the following prerequisites:
|
|
@@ -1617,6 +1616,8 @@ more details.
|
|
|
1617
1616
|
-keep class android.support.v7.** { *; }
|
|
1618
1617
|
```
|
|
1619
1618
|
Please read [#449](https://github.com/appium/appium-espresso-driver/issues/449#issuecomment-537833139) for more details on this topic.
|
|
1619
|
+
* When you want to build without compose dependencies
|
|
1620
|
+
* Espresso driver has Jetpack Compose dependencies to [support Jetpack Compose](#jetpack-compose-support). It could break the application under test's dependencies. The typical case is when the application under test does not have the Jetpack Compose dependencies. Then, you can try out [no compose dependencies branch](https://github.com/appium/appium-espresso-driver/pull/879)). In Appium 2.0, the branch is available as `appium driver install --source=local /path/to/the/appium-espress-driver` with the `no-compose-deps` branch instead of npm installation.
|
|
1620
1621
|
|
|
1621
1622
|
|
|
1622
1623
|
## Contributing
|
|
Binary file
|
|
@@ -26,15 +26,26 @@ import java.util.concurrent.atomic.AtomicInteger
|
|
|
26
26
|
class CustomFailureHandler(appContext: Context) : FailureHandler {
|
|
27
27
|
private val originalHandler = DefaultFailureHandler(appContext)
|
|
28
28
|
|
|
29
|
+
private val handlersField = DefaultFailureHandler::class.java.getDeclaredField("handlers").apply {
|
|
30
|
+
isAccessible = true
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@Suppress("UNCHECKED_CAST")
|
|
34
|
+
private val originalHandlers: ArrayList<FailureHandler>
|
|
35
|
+
get() = handlersField.get(originalHandler) as ArrayList<FailureHandler>
|
|
36
|
+
|
|
37
|
+
init {
|
|
38
|
+
// This is to remove handlers that would dump whole view hierarchy on exception
|
|
39
|
+
// It will cause exceptions because it will access the views from another thread (Appium server one)
|
|
40
|
+
originalHandlers.removeAll { it.javaClass.name == "androidx.test.espresso.base.ViewHierarchyExceptionHandler" }
|
|
41
|
+
}
|
|
42
|
+
|
|
29
43
|
override fun handle(error: Throwable?, viewMatcher: Matcher<View>?) {
|
|
30
44
|
val failureCountField = DefaultFailureHandler::class.java.getDeclaredField("failureCount")
|
|
31
45
|
failureCountField.isAccessible = true
|
|
32
46
|
(failureCountField.get(originalHandler) as AtomicInteger).incrementAndGet()
|
|
33
47
|
|
|
34
|
-
|
|
35
|
-
handlersField.isAccessible = true
|
|
36
|
-
@Suppress("UNCHECKED_CAST")
|
|
37
|
-
for (handler in (handlersField.get(originalHandler) as java.util.ArrayList<FailureHandler>)) {
|
|
48
|
+
for (handler in originalHandlers) {
|
|
38
49
|
handler.handle(error, viewMatcher)
|
|
39
50
|
}
|
|
40
51
|
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-espresso-driver",
|
|
3
|
-
"version": "2.25.
|
|
3
|
+
"version": "2.25.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "appium-espresso-driver",
|
|
9
|
-
"version": "2.25.
|
|
9
|
+
"version": "2.25.1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@babel/runtime": "^7.4.3",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"eslint-plugin-import": "^2.25.3",
|
|
44
44
|
"eslint-plugin-mocha": "^9.0.0",
|
|
45
45
|
"eslint-plugin-promise": "^6.0.0",
|
|
46
|
-
"lint-staged": "^
|
|
46
|
+
"lint-staged": "^14.0.0",
|
|
47
47
|
"mocha": "^10.0.0",
|
|
48
48
|
"pre-commit": "^1.2.2",
|
|
49
49
|
"rimraf": "^5.0.0",
|
|
@@ -433,10 +433,11 @@
|
|
|
433
433
|
}
|
|
434
434
|
},
|
|
435
435
|
"node_modules/@babel/code-frame": {
|
|
436
|
-
"version": "7.22.
|
|
436
|
+
"version": "7.22.10",
|
|
437
437
|
"license": "MIT",
|
|
438
438
|
"dependencies": {
|
|
439
|
-
"@babel/highlight": "^7.22.
|
|
439
|
+
"@babel/highlight": "^7.22.10",
|
|
440
|
+
"chalk": "^2.4.2"
|
|
440
441
|
},
|
|
441
442
|
"engines": {
|
|
442
443
|
"node": ">=6.9.0"
|
|
@@ -450,11 +451,11 @@
|
|
|
450
451
|
}
|
|
451
452
|
},
|
|
452
453
|
"node_modules/@babel/highlight": {
|
|
453
|
-
"version": "7.22.
|
|
454
|
+
"version": "7.22.10",
|
|
454
455
|
"license": "MIT",
|
|
455
456
|
"dependencies": {
|
|
456
457
|
"@babel/helper-validator-identifier": "^7.22.5",
|
|
457
|
-
"chalk": "^2.
|
|
458
|
+
"chalk": "^2.4.2",
|
|
458
459
|
"js-tokens": "^4.0.0"
|
|
459
460
|
},
|
|
460
461
|
"engines": {
|
|
@@ -462,10 +463,10 @@
|
|
|
462
463
|
}
|
|
463
464
|
},
|
|
464
465
|
"node_modules/@babel/runtime": {
|
|
465
|
-
"version": "7.22.
|
|
466
|
+
"version": "7.22.10",
|
|
466
467
|
"license": "MIT",
|
|
467
468
|
"dependencies": {
|
|
468
|
-
"regenerator-runtime": "^0.
|
|
469
|
+
"regenerator-runtime": "^0.14.0"
|
|
469
470
|
},
|
|
470
471
|
"engines": {
|
|
471
472
|
"node": ">=6.9.0"
|
|
@@ -716,7 +717,7 @@
|
|
|
716
717
|
}
|
|
717
718
|
},
|
|
718
719
|
"node_modules/@types/node": {
|
|
719
|
-
"version": "20.
|
|
720
|
+
"version": "20.5.0",
|
|
720
721
|
"license": "MIT"
|
|
721
722
|
},
|
|
722
723
|
"node_modules/@types/normalize-package-data": {
|
|
@@ -915,7 +916,7 @@
|
|
|
915
916
|
}
|
|
916
917
|
},
|
|
917
918
|
"node_modules/appium-adb": {
|
|
918
|
-
"version": "9.14.
|
|
919
|
+
"version": "9.14.5",
|
|
919
920
|
"license": "Apache-2.0",
|
|
920
921
|
"dependencies": {
|
|
921
922
|
"@appium/support": "^4.0.0",
|
|
@@ -937,7 +938,7 @@
|
|
|
937
938
|
}
|
|
938
939
|
},
|
|
939
940
|
"node_modules/appium-adb/node_modules/lru-cache": {
|
|
940
|
-
"version": "10.0.
|
|
941
|
+
"version": "10.0.1",
|
|
941
942
|
"license": "ISC",
|
|
942
943
|
"engines": {
|
|
943
944
|
"node": "14 || >=16.14"
|
|
@@ -971,7 +972,7 @@
|
|
|
971
972
|
"license": "ISC"
|
|
972
973
|
},
|
|
973
974
|
"node_modules/appium-android-driver": {
|
|
974
|
-
"version": "5.14.
|
|
975
|
+
"version": "5.14.2",
|
|
975
976
|
"license": "Apache-2.0",
|
|
976
977
|
"dependencies": {
|
|
977
978
|
"appium-adb": "^9.11.2",
|
|
@@ -1453,17 +1454,6 @@
|
|
|
1453
1454
|
"license": "ISC",
|
|
1454
1455
|
"optional": true
|
|
1455
1456
|
},
|
|
1456
|
-
"node_modules/cli-cursor": {
|
|
1457
|
-
"version": "3.1.0",
|
|
1458
|
-
"extraneous": true,
|
|
1459
|
-
"license": "MIT",
|
|
1460
|
-
"dependencies": {
|
|
1461
|
-
"restore-cursor": "^3.1.0"
|
|
1462
|
-
},
|
|
1463
|
-
"engines": {
|
|
1464
|
-
"node": ">=8"
|
|
1465
|
-
}
|
|
1466
|
-
},
|
|
1467
1457
|
"node_modules/cli-spinners": {
|
|
1468
1458
|
"version": "2.9.0",
|
|
1469
1459
|
"extraneous": true,
|
|
@@ -1606,7 +1596,7 @@
|
|
|
1606
1596
|
}
|
|
1607
1597
|
},
|
|
1608
1598
|
"node_modules/compare-versions": {
|
|
1609
|
-
"version": "6.
|
|
1599
|
+
"version": "6.1.0",
|
|
1610
1600
|
"license": "MIT"
|
|
1611
1601
|
},
|
|
1612
1602
|
"node_modules/compress-commons": {
|
|
@@ -3147,6 +3137,17 @@
|
|
|
3147
3137
|
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
3148
3138
|
}
|
|
3149
3139
|
},
|
|
3140
|
+
"node_modules/ora/node_modules/cli-cursor": {
|
|
3141
|
+
"version": "3.1.0",
|
|
3142
|
+
"extraneous": true,
|
|
3143
|
+
"license": "MIT",
|
|
3144
|
+
"dependencies": {
|
|
3145
|
+
"restore-cursor": "^3.1.0"
|
|
3146
|
+
},
|
|
3147
|
+
"engines": {
|
|
3148
|
+
"node": ">=8"
|
|
3149
|
+
}
|
|
3150
|
+
},
|
|
3150
3151
|
"node_modules/ora/node_modules/color-convert": {
|
|
3151
3152
|
"version": "2.0.1",
|
|
3152
3153
|
"extraneous": true,
|
|
@@ -3163,6 +3164,18 @@
|
|
|
3163
3164
|
"extraneous": true,
|
|
3164
3165
|
"license": "MIT"
|
|
3165
3166
|
},
|
|
3167
|
+
"node_modules/ora/node_modules/restore-cursor": {
|
|
3168
|
+
"version": "3.1.0",
|
|
3169
|
+
"extraneous": true,
|
|
3170
|
+
"license": "MIT",
|
|
3171
|
+
"dependencies": {
|
|
3172
|
+
"onetime": "^5.1.0",
|
|
3173
|
+
"signal-exit": "^3.0.2"
|
|
3174
|
+
},
|
|
3175
|
+
"engines": {
|
|
3176
|
+
"node": ">=8"
|
|
3177
|
+
}
|
|
3178
|
+
},
|
|
3166
3179
|
"node_modules/ora/node_modules/supports-color": {
|
|
3167
3180
|
"version": "7.2.0",
|
|
3168
3181
|
"extraneous": true,
|
|
@@ -3540,7 +3553,7 @@
|
|
|
3540
3553
|
}
|
|
3541
3554
|
},
|
|
3542
3555
|
"node_modules/regenerator-runtime": {
|
|
3543
|
-
"version": "0.
|
|
3556
|
+
"version": "0.14.0",
|
|
3544
3557
|
"license": "MIT"
|
|
3545
3558
|
},
|
|
3546
3559
|
"node_modules/require-directory": {
|
|
@@ -3581,18 +3594,6 @@
|
|
|
3581
3594
|
"node": ">=8"
|
|
3582
3595
|
}
|
|
3583
3596
|
},
|
|
3584
|
-
"node_modules/restore-cursor": {
|
|
3585
|
-
"version": "3.1.0",
|
|
3586
|
-
"extraneous": true,
|
|
3587
|
-
"license": "MIT",
|
|
3588
|
-
"dependencies": {
|
|
3589
|
-
"onetime": "^5.1.0",
|
|
3590
|
-
"signal-exit": "^3.0.2"
|
|
3591
|
-
},
|
|
3592
|
-
"engines": {
|
|
3593
|
-
"node": ">=8"
|
|
3594
|
-
}
|
|
3595
|
-
},
|
|
3596
3597
|
"node_modules/safe-buffer": {
|
|
3597
3598
|
"version": "5.2.1",
|
|
3598
3599
|
"funding": [
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"automated testing",
|
|
8
8
|
"android"
|
|
9
9
|
],
|
|
10
|
-
"version": "2.25.
|
|
10
|
+
"version": "2.25.1",
|
|
11
11
|
"author": "Appium Contributors",
|
|
12
12
|
"license": "Apache-2.0",
|
|
13
13
|
"repository": {
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"eslint-plugin-import": "^2.25.3",
|
|
124
124
|
"eslint-plugin-mocha": "^9.0.0",
|
|
125
125
|
"eslint-plugin-promise": "^6.0.0",
|
|
126
|
-
"lint-staged": "^
|
|
126
|
+
"lint-staged": "^14.0.0",
|
|
127
127
|
"mocha": "^10.0.0",
|
|
128
128
|
"pre-commit": "^1.2.2",
|
|
129
129
|
"rimraf": "^5.0.0",
|