Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix swaps smoke flakiness #8355

Merged
merged 2 commits into from
Jan 20, 2024

Conversation

cortisiko
Copy link
Member

@cortisiko cortisiko commented Jan 20, 2024

Description

This PR is branched off #8342 to address the inconsistency in the smoke tests. The only change added here was to add the assertion in a try-catch block. The reason behind this change is that I observed, both on my local machine and during rapid transaction submissions, that the transaction confirmation toast does not always appear. However, the absence of the toast doesn't necessarily indicate that the transaction isn't confirmed. Checking the activity tab reveals the confirmation of the transaction. In our test scenario, this sporadic occurrence started causing flakiness, as we were relying on the transaction confirmation toast for every transaction. The addition of the try-catch block is appropriate because, in cases where the toast is not displayed, we also validate the confirmation status by tapping on the transaction confirmation modal.

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Passing Smoke builds:
https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/8887ecd9-62ca-45eb-b9ff-66c65f82d0e4
https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/3a04a984-856e-413c-a13a-b3881dba8e12

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@cortisiko cortisiko requested a review from davibroc January 20, 2024 01:18
@cortisiko cortisiko requested a review from a team as a code owner January 20, 2024 01:18
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7a3ccab) 40.30% compared to head (109e3a0) 40.30%.
Report is 2 commits behind head on fix/swap-test-flakyness.

Additional details and impacted files
@@                   Coverage Diff                    @@
##           fix/swap-test-flakyness    #8355   +/-   ##
========================================================
  Coverage                    40.30%   40.30%           
========================================================
  Files                         1235     1235           
  Lines                        29928    29928           
  Branches                      2872     2872           
========================================================
  Hits                         12062    12062           
  Misses                       17173    17173           
  Partials                       693      693           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@cortisiko cortisiko merged commit c6e57cb into fix/swap-test-flakyness Jan 20, 2024
29 checks passed
@cortisiko cortisiko deleted the attempt-to-fix-smoke-flakiness branch January 20, 2024 16:23
@github-actions github-actions bot locked and limited conversation to collaborators Jan 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants