Espresso ViewActions.swipeRight doesn't work for ViewPager2 on device with API 32+
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- java
- 领域
- mobile-dev, testing
调研方向
从链接的示例项目中的 MainActivity 和 MainActivityTest 开始,然后在 API 31 和 API 32+ 设备上复现 ViewPager2 的 ViewActions.swipeRight。将手势行为与 swipeLeft 进行比较,并跟踪相关的 Espresso 入口点。完成标准是:在 API 32 及更高版本上,swipeRight 会让 ViewPager2 翻页,而不是触发返回操作。
由索引模型根据 Issue 内容生成。
描述
Description
As the title says, ViewActions.swipeRight doesn't work on devices with API >= 32 when called on ViewPager2.
Calling a swipeRight on a ViewPager2 triggers a back instead of a swiping on the ViewPager2 itself.
Steps to Reproduce
In the sample project linked below you can find a simple activity MainActivity with a ViewPager2, and a MainActivityTest.
The test just swipes on the view pager using Espresso ViewActions: swipeLeft/swipeRight.
Launching the test on a device with API <= 31 passes, but fails on devices with API 32 and above.
swipeLeft instead, works in any case.
Expected Results
Performing swiping actions on the view pager.
Demo on emulator device with API 31
https://github.com/android/android-test/assets/43886303/c1ffedd4-4b8d-42d7-9093-532f9a9f5655
Actual Results
Back press.
Demo on emulator device with API 32
https://github.com/android/android-test/assets/43886303/690e5456-5622-4ba3-82be-8170cdbb5e2a
AndroidX Test and Android OS Versions
- agp = "8.3.2"
- kotlin = "1.9.0"
- activity = "1.8.2"
- appcompat = "1.6.1"
- viewpager2 = "1.0.0"
- espressoCore = "3.5.1"
- testCore = "1.5.0"
- testJunit = "1.1.5"
Link to a public git repo demonstrating the problem:
https://github.com/alecarnevale/EspressoSwipeRightIssue/tree/master
- 主要语言
- Java
- 星标
- 1.2k
- 派生
- 342
- 平均合并
- 1 天 14 小时
- 30 天内合并 PR
- 5
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
android/android-test 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 62/100
android/android-test#681 · 2 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 72/100
android/android-test#2507 · 1 条评论 ·
-
ξεκσνδξδ 未关闭
难度 5/5 一周以上 新手友好度 1/100
android/android-test#2499 ·
-
ησξξσ 未关闭
难度 5/5 一周以上 新手友好度 1/100
android/android-test#2498 ·
-
难度 4/5 3-5 天 新手友好度 38/100
android/android-test#2473 ·
查看 android/android-test 的全部 Issue
相似的 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 65/100
inu-appcenter/memorIN-backend#288 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
-
frontend maui-pilot pilot-ask question
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
area/plugin
难度 2/5 1-3 小时 新手友好度 75/100
kestra-io/plugin-kestra#190 ·