Skip to content

test: use setPermissions before launching the app#6975

Merged
Rohit3523 merged 3 commits intodevelopfrom
maestro-set-permissions
Feb 13, 2026
Merged

test: use setPermissions before launching the app#6975
Rohit3523 merged 3 commits intodevelopfrom
maestro-set-permissions

Conversation

@Rohit3523
Copy link
Copy Markdown
Contributor

@Rohit3523 Rohit3523 commented Feb 11, 2026

Proposed changes

This PR add support for setPermission which can be used to set app permissions at any time.
Currently, we allow permissions manually after opening the app using a deeplink. With the new setPermission, we can grant all permissions before starting the app. This removes the permission dialogs and reduces test execution time.

Action Link: https://github.com/RocketChat/Rocket.Chat.ReactNative/actions/runs/21894217357

Issue(s)

https://rocketchat.atlassian.net/browse/CORE-1831

How to test or reproduce

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

  • Chores
    • Streamlined the login-with-deeplink flow by simplifying permission handling and removing unnecessary platform-specific dialog interactions for a cleaner authentication process.

@Rohit3523 Rohit3523 temporarily deployed to approve_e2e_testing February 11, 2026 05:46 — with GitHub Actions Inactive
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 11, 2026

Walkthrough

The Maestro test helper now uses the setPermissions block to grant all permissions upfront before the app launch, replacing reactive permission dialog interactions across Android and iOS platforms. This simplification reduces test execution time by eliminating platform-specific UI prompts and launcher-specific flows.

Changes

Cohort / File(s) Summary
Test Automation Helper
.maestro/helpers/login-with-deeplink.yaml
Added proactive setPermissions block; removed reactive permission dialog handling (Android "Allow" taps, iOS notification flows) and platform-specific launcher interactions. Retained final wait for rooms-list-view with 60-second timeout.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐇 Permissions granted with a single line of grace,
No more button-tapping through the testing race!
Maestro's magic simplifies the flow,
Tests now speed through faster, stealing the show! ✨

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding setPermissions before launching the app in the test flow.
Linked Issues check ✅ Passed The PR successfully implements the objective from CORE-1831 by using setPermissions to grant permissions before app launch instead of handling dialogs after deeplink launch.
Out of Scope Changes check ✅ Passed All changes are directly related to the objective: removing permission dialog handling and adding setPermissions to the login-with-deeplink flow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into develop

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


No actionable comments were generated in the recent review. 🎉

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 757ea73 and ddead38.

📒 Files selected for processing (1)
  • .maestro/helpers/login-with-deeplink.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: ESLint and Test / run-eslint-and-test
  • GitHub Check: format
🔇 Additional comments (3)
.maestro/helpers/login-with-deeplink.yaml (3)

21-29: AI summary inconsistency: Pixel Launcher block is still present.

The AI summary states the Android-specific Pixel Launcher runFlow was removed, but it is still present in the code. This block handles the edge case where the Pixel Launcher intercepts the deeplink — confirming this is intentionally retained would be helpful.


7-33: Overall flow looks clean and well-structured.

The sequence of stop → clear state → set permissions → login → open deeplink → wait is logical. Granting permissions upfront before the app launch is a solid improvement that eliminates flaky permission dialog interactions and should reduce test runtime as intended.


13-15: setPermissions syntax is correct.

The setPermissions block with all: allow matches the Maestro API specification exactly. The YAML structure and placement after stopApp/clearState are appropriate for granting permissions before app launch.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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 and usage tips.

@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build February 11, 2026 05:50 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build February 11, 2026 05:50 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to official_android_build February 11, 2026 05:50 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build February 11, 2026 21:37 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to official_android_build February 11, 2026 21:37 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build February 11, 2026 21:37 — with GitHub Actions Error
@Rohit3523 Rohit3523 changed the title test: added setPermissions before launching the app test: use setPermissions before launching the app Feb 13, 2026
@Rohit3523 Rohit3523 temporarily deployed to approve_e2e_testing February 13, 2026 13:36 — with GitHub Actions Inactive
@Rohit3523 Rohit3523 marked this pull request as ready for review February 13, 2026 13:37
@Rohit3523 Rohit3523 had a problem deploying to official_android_build February 13, 2026 13:39 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build February 13, 2026 13:39 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build February 13, 2026 13:39 — with GitHub Actions Error
Copy link
Copy Markdown
Contributor

@OtavioStasiak OtavioStasiak left a comment

Choose a reason for hiding this comment

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

LGTM!
just improve the PR title before merge.
in this case we can use chore preffix.

@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build February 13, 2026 18:11 — with GitHub Actions Failure
@Rohit3523 Rohit3523 had a problem deploying to official_android_build February 13, 2026 18:11 — with GitHub Actions Failure
@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build February 13, 2026 18:11 — with GitHub Actions Failure
@Rohit3523 Rohit3523 merged commit 0b93f25 into develop Feb 13, 2026
5 of 10 checks passed
@Rohit3523 Rohit3523 deleted the maestro-set-permissions branch February 13, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants