Skip to content

fix(e2e): anchor sidebar keyboard navigation on focus - #7774

Merged
diegolmello merged 1 commit into
developfrom
diegolmello/fix-e2e-shard14-keyboard-nav
Oct 6, 2026
Merged

diegolmello merged 1 commit into
developfrom
diegolmello/fix-e2e-shard14-keyboard-nav

Conversation

@diegolmello

@diegolmello diegolmello commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Proposed changes

The Android Maestro flow "Keyboard Navigation Components" (shard 14) fails on every PR with Assertion is false: "Theme" is visible.

The flow reached Accessibility & Appearance in the drawer by pressing Left, Down, Down. Left only moved focus because every room row kept its swipe action buttons mounted, hidden behind the row; Down from one of those buttons landed on the drawer's Profile item. Since #7719 the actions mount only while a row is swiped, so Left goes nowhere and the two Downs stop on Edit status.

Keyboard focus reaching invisible buttons was a defect, so the app is right and the flow is changed: it presses Down until the Accessibility & Appearance item holds focus (at most 10 presses), asserts that focus, then presses Enter, the same pattern as #7703.

The focused view is the keyboard-focus wrapper around the list item, which has no testID, so the selector matches it through its sidebar-accessibility descendant.

Issue(s)

https://rocketchat.atlassian.net/browse/NATIVE-1721

How to test or reproduce

  1. Boot an API 34 AVD with hw.keyboard=yes, as shard 14 does on CI.
  2. Install an e2e release build.
  3. Run .maestro/tests/keyboardNavigation/keyboard-navigation-components.yaml.
  4. Before this change: Edit status opens and "Theme" is visible fails. After: the flow passes.

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Summary by CodeRabbit

  • Tests
    • Updated the keyboard navigation test to locate and verify the accessibility sidebar item before opening it.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b36dd294-f331-496d-85a4-810d7aea8c18
📥 Commits

Reviewing files that changed from the base of the PR and between 9f1c65b and 9d051da.

📒 Files selected for processing (1)
  • .maestro/tests/keyboardNavigation/keyboard-navigation-components.yaml

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: ESLint and Test / run-eslint-and-test
  • GitHub Check: E2E Shard Preflight
🔇 Additional comments (1)
.maestro/tests/keyboardNavigation/keyboard-navigation-components.yaml (1)

30-44: LGTM!


Walkthrough

The keyboard navigation test now searches for the sidebar accessibility element by pressing Down up to 10 times. It waits after each press and verifies focus before opening the element.

Changes

Keyboard navigation test

Layer / File(s) Summary
Locate and verify sidebar focus
.maestro/tests/keyboardNavigation/keyboard-navigation-components.yaml
The test presses Down up to 10 times, waiting up to 1 second after each press until the focused element contains sidebar-accessibility. It then asserts focus before pressing Enter.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Suggested labels: type: chore

Merge Risk: ⚪ Minimal · up to 9d051

No actionable merge-blocking issue is established. The test checks for the intended focus before opening the sidebar item.

Architecture Summary

Architecture risk: 🔵 Low · up to 9d051

The changed surface does not map to a changed system, dependency edge, entrypoint, or external dependency.

Changed systems: None identified.

Architecture concerns
No architecture-level concerns identified.

Review details

Before / after behavior

  • observed — Modified behavior in .maestro/tests/keyboardNavigation/keyboard-navigation-components.yaml: The test replaces a Left press and two fixed Down presses with up to 10 Down presses, each followed by a 1-second animation wait, stopping when the focused element contains sidebar-accessibility. It then asserts that the element is focused.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: anchoring sidebar keyboard navigation on the focused element.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Errors were encountered while retrieving linked issues.

Errors (1)
  • JIRA integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

iOS Build Available

Rocket.Chat 4.78.0.109901

@OtavioStasiak OtavioStasiak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

…ount

The flow opened the drawer and pressed Left, Down, Down to reach
Accessibility & Appearance. Left only moved focus because every room row
kept its swipe action buttons mounted behind the row, and Down from one
of those hidden buttons landed on the drawer's Profile item.

Swipe actions now mount only while a row is swiped, so Left has nowhere
to go and the two Downs stop on Edit status. Press Down until the
Accessibility item holds focus, bounded and asserted like the login
steps in the onboarding flow.

The focused view is the keyboard-focus wrapper, which carries no testID,
so the selector matches it by its sidebar-accessibility descendant.
@diegolmello
diegolmello force-pushed the diegolmello/fix-e2e-shard14-keyboard-nav branch from 9d051da to febddef Compare October 6, 2026 16:25
@diegolmello
diegolmello merged commit 54ba3b4 into develop Oct 6, 2026
4 of 5 checks passed
@diegolmello
diegolmello deleted the diegolmello/fix-e2e-shard14-keyboard-nav branch October 6, 2026 16:25

This branch is waiting to be deployed

3 waiting deployments
android_build — febddef3 Waiting Oct 6, 2026 by diegolmello via Build Android / Hold #7015
ios_build — febddef3 Waiting Oct 6, 2026 by diegolmello via Build iOS / Hold #7015
approve_e2e_testing — febddef3 Waiting Oct 6, 2026 by diegolmello via E2E Hold #7015
upload_android — 9d051da3 Deployed Oct 5, 2026 by diegolmello via Build Android / Upload Hold #6996
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants