Skip to content

fix: Confirm Page test failing in CI/CD#27423

Merged
jpuri merged 1 commit intodevelopfrom
fix-confirm-test-failing-in-ci-cd
Sep 26, 2024
Merged

fix: Confirm Page test failing in CI/CD#27423
jpuri merged 1 commit intodevelopfrom
fix-confirm-test-failing-in-ci-cd

Conversation

@digiwand
Copy link
Copy Markdown
Contributor

@digiwand digiwand commented Sep 26, 2024

Description

Running ui/pages/confirmations/confirm/confirm.test.tsx locally passes, but running it in our CI/CD fails. This PR updates the test to pass CI/CD

I'm currently unsure where the discrepancy lies between local vs. ci/cd here. Why is the text found once locally and twice in CI/CD? Fixing this as so to unblock other PRs

Error:

 FAIL  ui/pages/confirmations/confirm/confirm.test.tsx (10.409 s)
  ● Confirm › should match snapshot for signature - typed sign - V4 - PermitSingle

    expect(received).toHaveLength(expected)

    Expected length: 2
    Received length: 1
    Received array:  [<p class="mm-box mm-text mm-text--body-md mm-box--color-inherit" style="white-space: pre-wrap;">14,615,016,373,...</p>]

      151 |         await renderWithConfirmContextProvider(<Confirm />, mockStore);
      152 |
    > 153 |       expect(await findAllByText('14,615,016,373,...')).toHaveLength(2);
          |                                                         ^
      154 |       expect(container).toMatchSnapshot();
      155 |     });
      156 |   });

      at toHaveLength (ui/pages/confirmations/confirm/confirm.test.tsx:153:57)

  ● Confirm › should match snapshot for signature - typed sign - V4 - PermitBatch

    expect(received).toHaveLength(expected)

    Expected length: 2
    Received length: 1
    Received array:  [<p class="mm-box mm-text mm-text--body-md mm-box--color-inherit" style="white-space: pre-wrap;">14,615,016,373,...</p>]

      174 |         await renderWithConfirmContextProvider(<Confirm />, mockStore);
      175 |
    > 176 |       expect(await findAllByText('14,615,016,373,...')).toHaveLength(2);
          |                                                         ^
      177 |       expect(container).toMatchSnapshot();
      178 |     });
      179 |   });

      at toHaveLength (ui/pages/confirmations/confirm/confirm.test.tsx:176:57)


Test Suites: 1 failed, 896 passed, 897 total
Tests:       2 failed, 2 todo, 6765 passed, 6769 total

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

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.

@digiwand digiwand requested a review from a team as a code owner September 26, 2024 13:39
@github-actions
Copy link
Copy Markdown
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.

@github-actions github-actions bot added the team-confirmations Push issues to confirmations team label Sep 26, 2024
@sonarqubecloud
Copy link
Copy Markdown

@jpuri jpuri merged commit c71c560 into develop Sep 26, 2024
@jpuri jpuri deleted the fix-confirm-test-failing-in-ci-cd branch September 26, 2024 14:06
@github-actions github-actions bot locked and limited conversation to collaborators Sep 26, 2024
@metamaskbot metamaskbot added the release-12.6.0 Issue or pull request that will be included in release 12.6.0 label Sep 26, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [7623df0]
Page Load Metrics (1687 ± 58 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15471998168511655
domContentLoaded15391952165710450
load15472012168712058
domInteractive16159433014
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-12.6.0 Issue or pull request that will be included in release 12.6.0 team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants