Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Espresso is not waiting for drawer to close

未关闭
#289 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
android, java

调研方向

该 issue 未指定文件或测试;首先找到打开导航抽屉、点击菜单项并检查 DrawerMatchers.isClosed() 的测试。使用 AndroidX Navigation 2.1.0 重现该问题,并与 2.0.0 进行比较;当点击后运行检查时抽屉已关闭,即表示完成。

由索引模型根据 Issue 内容生成。

描述

I am currently using androidx test espresso version 3.2.0.
After updating androidx's navigation version to 2.1.0, Espresso has become flaky when performing ViewActions.click() on page that was navigated to through a navigation drawer due to Espresso not waiting for the drawer to be closed before performing the action.
The test would:

  1. Open the navigation drawer
  2. Click on a menu item in drawer (We call close on the navigation drawer when an item is clicked)
  3. Check DrawerMatchers.isClosed() on the drawer layout, which fails.

This was not an issue in navigation version 2.0.0, since I confirmed the tests did not fail if I reverted the version from 2.1.0 to 2.0.0.

主要语言
Java
星标
9.3k
派生
3.6k
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

android/testing-samples 的其他 Issue

查看 android/testing-samples 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。