Skip to content

✅ e2e: test partial repay flow#724

Open
cruzdanilo wants to merge 3 commits intomainfrom
e2e
Open

✅ e2e: test partial repay flow#724
cruzdanilo wants to merge 3 commits intomainfrom
e2e

Conversation

@cruzdanilo
Copy link
Member

@cruzdanilo cruzdanilo commented Feb 5, 2026


Open with Devin

Summary by CodeRabbit

  • New Features

    • Improved accessibility for repay controls: slider announces values, repay button/input have descriptive labels, and status messages are exposed to screen readers.
    • Added Spanish translations for repay amount labels and controls.
  • Bug Fixes

    • Better handling of canceled Apple/passkey sign-in so cancellations are treated gracefully.
  • Tests

    • Updated automated UI flows for repay and rollover interactions.
  • Chores

    • Added changeset entries for patch releases.

@changeset-bot
Copy link

changeset-bot bot commented Feb 5, 2026

🦋 Changeset detected

Latest commit: 144aa49

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gemini-code-assist
Copy link

Summary of Changes

Hello @cruzdanilo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the robustness and accessibility of the application's repayment features. It introduces a new end-to-end test to validate the partial repayment flow, ensuring that users can successfully repay a portion of their debt. Concurrently, it significantly improves the accessibility of the repayment amount selection interface by integrating ARIA attributes, making it more usable for individuals relying on assistive technologies.

Highlights

  • New E2E Test for Partial Repay: A new Maestro end-to-end test flow has been introduced to specifically validate the partial repayment functionality within the application.
  • Accessibility Enhancements: ARIA attributes (role, aria-label, aria-valuetext, aria-live) have been added to the RepayAmountSelector component to significantly improve accessibility for users relying on assistive technologies.
  • Maestro Flow Refinements: The Maestro subflows for repay and rollover have been updated to improve element targeting (using 'Upcoming payments' instead of 'Repay') and to support dynamic input for partial repayments in the repay flow, including conditional logic for 'Max' or specific amount input.
Changelog
  • .changeset/wild-sloths-smile.md
    • Added a new changeset entry documenting the patch for @exactly/mobile related to ARIA accessibility for the repay slider.
  • .maestro/flows/local.yaml
    • Updated the amount environment variable for the borrow.yaml flow from '10' to '69'.
    • Added a new repay.yaml flow with a specific amount of '13' to enable testing of partial repayments.
  • .maestro/subflows/repay.yaml
    • Updated scrollUntilVisible target from 'Repay' to 'Upcoming payments' for improved reliability.
    • Modified evalScript for output.debt to explicitly convert maestro.copiedText to a Number.
    • Added waitForAnimationToEnd after tapping 'Repay' to ensure UI stability.
    • Implemented conditional logic to either tap 'Max' (if no amount is provided) or input a specific amount for partial repayment, including tapping an ARIA element, using backspace (as a hack), and inputting the desired amount.
    • Added conditional assertions to verify the state after repayment, specifically checking if the remaining debt is less than the original debt for partial repayments.
  • .maestro/subflows/rollover.yaml
    • Updated scrollUntilVisible target from 'Repay' to 'Upcoming payments'.
    • Added waitForAnimationToEnd after tapping 'Repay'.
  • src/components/pay-mode/RepayAmountSelector.tsx
    • Enhanced the 'Max' button with role="button" and aria-label for improved accessibility.
    • Added aria-label to the input field for the repay amount.
    • Integrated aria-label and aria-valuetext into the Slider component for better screen reader feedback.
    • Applied aria-live="polite" to informational Text components to announce dynamic content changes.
  • src/i18n/es.json
    • Added Spanish translations for 'Repay amount', 'Repay amount slider', and 'Set maximum repay amount' to support the new ARIA labels.
Activity
  • The pull request introduces new end-to-end tests and accessibility features. No specific human activity (comments, reviews) is provided in the context.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

Walkthrough

Adds ARIA accessibility attributes and Spanish labels for the repay amount UI; updates Maestro e2e flows to change amounts, insert a repay runFlow/subflow for ARIA-driven input, add animation waits, conditional branching based on entered amount, and adjust tap/scroll targets and debt extraction logic.

Changes

Cohort / File(s) Summary
Test Automation Flows
.maestro/flows/local.yaml, .maestro/subflows/repay.yaml, .maestro/subflows/rollover.yaml
Updated local flow amounts and step ordering; inserted a repay runFlow and final storeCoverage step; shifted scroll/tap targets from "Repay" to "Upcoming payments"; added waitForAnimationToEnd; introduced conditional branches for "amount set" vs "amount not set"; changed debt extraction to numeric conversion.
Component Accessibility
src/components/pay-mode/RepayAmountSelector.tsx
Added ARIA attributes: role="button" and aria-label for Max control, aria-label for USDC input, aria-label and aria-valuetext on slider thumb, and aria-live="polite" on dynamic status texts.
Internationalization
src/i18n/es.json
Added three Spanish translation keys: Repay amount, Repay amount slider, and Set maximum repay amount.
Auth / Error Handling
src/utils/server.ts, src/utils/useAuth.ts
Expanded Apple auth cancellation handling to include AuthorizationError 1004 as a suppressible/cancel case.
Account Initialization
src/utils/accountClient.ts
Switched to deriving and using accountAddress from factory/coords for login and account operations; updated address usage across signing and execute flows; added Apple auth 1004 handling in specific flows.
Intercom / Env Guards
src/utils/intercom.ts
Prevent intercom login in e2e env (EXPO_PUBLIC_ENV === "e2e") on web and native; added error reporting for native login failures.
Release Notes / Changesets
.changeset/wild-sloths-smile.md, .changeset/good-monkeys-hunt.md, .changeset/true-cameras-design.md
Added changeset files documenting patch releases and notes (accessibility, passkey cancel handling, skipping RPC derivation).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Maestro
  participant App
  participant Subflow as tapAria.yaml
  Maestro->>App: navigate to "Upcoming payments" / reveal repay UI
  App-->>Maestro: repay UI visible
  Maestro->>App: tap Repay (leftOf Rollover)
  Maestro->>App: waitForAnimationToEnd
  alt amount not set
    Maestro->>App: tap Max (role/button) and confirm repayment
    App-->>Maestro: transaction complete
    Maestro->>App: assert maturity NOT visible under "Upcoming payments"
  else amount set
    Maestro->>Subflow: run tapAria.yaml to erase/enter amount and subtotal
    Subflow->>App: input amount, update subtotal
    App-->>Maestro: copy debt value near maturity/"Upcoming payments"
    Maestro->>Maestro: compare copied debt == entered amount
    Maestro->>App: assert maturity VISIBLE under "Upcoming payments"
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • dieguezguille
  • franm91
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title '✅ e2e: test partial repay flow' accurately summarizes the main changeset, which adds accessibility features to the repay slider and updates e2e test flows to test the partial repay functionality.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch e2e

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.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces accessibility enhancements to the repay amount selector and adds a new end-to-end test for the partial repayment flow. The accessibility improvements are well-implemented, using appropriate ARIA attributes to enhance the experience for screen reader users. The new e2e test is a great addition for coverage. However, I've identified a couple of areas in the test script that could be improved for robustness and accuracy, particularly around clearing input fields and strengthening assertions.

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

@sentry
Copy link

sentry bot commented Feb 5, 2026

✅ All tests passed.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 Fix all issues with AI agents
In @.maestro/flows/local.yaml:
- Around line 21-22: The inline runFlow mapping for the partial repay (the entry
using repay.yaml with env amount "13") has inconsistent brace spacing; update
that runFlow entry so its curly-brace spacing matches the repository YAML style
(adjust spaces immediately after '{' and before '}' in the inline mapping and
the nested env mapping) so the mapping for the file and env: amount "13" is
consistently formatted with the other runFlow entries.
- Line 19: The YAML has extra spaces immediately inside the inline mapping
braces on the env entry; update the env mapping (env: { amount: "69",
installments: "4" }) to remove the spaces right after '{' and before '}' so it
becomes env: {amount: "69", installments: "4"} to satisfy YAMLlint.

In @.maestro/subflows/repay.yaml:
- Around line 33-46: Adjust the inline brace spacing to be consistent: add a
single space after '{' and before '}' for the inline when mappings and any other
inline objects used in this block; specifically fix the when mappings in the two
runFlow entries (when: { true: "${!amount}" } and when: { true: "${amount}" }),
the scrollUntilVisible mapping (scrollUntilVisible: { element: Upcoming payments
}) and the assertTrue expression wrapper (assertTrue:
${Number(maestro.copiedText) < output.debt}) so inline curly-brace objects use
the same "{ key: value }" spacing style while leaving the internal ${...}
template expressions unchanged.
- Around line 18-24: The inline mappings use spaces inside braces and comments
lack the required two-space separation; update the runFlow block so braces have
no inner spaces and inline comments have two leading spaces before them — e.g.,
change when: { true: "${amount}" } to when: {true: "${amount}"}, runFlow: {
file: ../subflows/tapAria.yaml, env: { aria: Repay amount } } to runFlow: {file:
../subflows/tapAria.yaml, env: {aria: Repay amount}}, repeat: { times: 13,
commands: [{ pressKey: backspace }] } to repeat: {times: 13, commands:
[{pressKey: backspace}]}, and ensure lines with comments use two spaces before
the # (e.g., tapOn: Subtotal  # HACK).
- Line 3: The inline mapping for scrollUntilVisible has extra spaces inside the
flow braces; update the mapping for scrollUntilVisible (the key
"scrollUntilVisible" with value "{ element: Upcoming payments }") to remove the
inner brace spacing so it becomes "{element: Upcoming payments}" (i.e., ensure
the flow mapping for element uses no spaces inside the braces) to satisfy
YAMLlint.

In @.maestro/subflows/rollover.yaml:
- Line 26: The YAML entry for the step using scrollUntilVisible has incorrect
brace spacing around the inline map; update the scrollUntilVisible line so the
inline mapping for element uses no extra spaces inside braces (fix the token
scrollUntilVisible and its value with element: Upcoming payments to use compact
braces), e.g., change the current "{ element: Upcoming payments }" formatting to
use "{element: Upcoming payments}" to match the style used elsewhere.

@cruzdanilo cruzdanilo force-pushed the main branch 2 times, most recently from c7829dc to 5e7861d Compare February 6, 2026 21:00
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.

1 participant