Repository navigation
test(ui): stabilize preview theme prompt back dismissal - #543
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
描述 / Description
The startup preview theme prompt test can select the unfocused Activity root immediately after its dialog appears, causing a ten-second Espresso timeout. Bind the Back action to the dialog root so Espresso waits for that window to become ready. Real Back input and all decline, persistence, and remount assertions are preserved.
类型 / Type
修复或解决的问题 / Issues Fixed or Closed by This PR
Fixes the same-commit intermittent failure in Android CI run 39099744595, first attempt:
StartupPreviewThemePromptTest.declineAndBackStayAnsweredAfterThePromptIsMountedAgainfailed withRootViewWithoutFocusExceptionagainst aBASE_APPLICATIONwindow. The second attempt passed without a source change.清单 / Checklist
其他信息 / Additional Information
Validation with JDK 17:
./gradlew :app:assembleDebug :app:assembleDebugAndroidTest :app:lintDebug --no-daemon -Pkotlin.compiler.execution.strategy=in-process --warning-mode all --stacktracepassedStartupPreviewThemePromptTestgit diff --checkpassedOnly the test changes. Production behavior, CI retries, and test assertions are unchanged. Documentation and screenshots are not applicable. GitHub Actions uses API 35 x86_64 and must validate the new commit separately.
将预览主题提示框的 Back 操作绑定到对话框根视图,避免测试从未获得焦点的 Activity 根视图触发返回键。拒绝按钮测试路径未变;未报告测试结果。