Skip to content

fix: Fix unit test failure for trackDappViewedEvent#8928

Merged
Cal-L merged 5 commits into
fix/8885_add_identifyfrom
cal/8885-add-identify
Mar 14, 2024
Merged

fix: Fix unit test failure for trackDappViewedEvent#8928
Cal-L merged 5 commits into
fix/8885_add_identifyfrom
cal/8885-add-identify

Conversation

@Cal-L

@Cal-L Cal-L commented Mar 13, 2024

Copy link
Copy Markdown
Contributor

Description

This PR fixes the test failure for app/util/metrics/trackDappViewedEvent/index.test.ts. It does so by mocking the module ../../../util/metrics/UserSettingsAnalyticsMetaData/generateUserProfileAnalyticsMetaData, which was causing the failure.

Related issues

Fixes:

Manual testing steps

Run yarn jest app/util/metrics/trackDappViewedEvent/index.test.ts and notice that the test passes

Screenshots/Recordings

Before

After

image

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.

@Cal-L Cal-L requested a review from a team as a code owner March 13, 2024 23:36
@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.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@Cal-L Cal-L added the team-mobile-platform Mobile Platform team label Mar 14, 2024
@Cal-L Cal-L changed the title Cal/8885 add identify fix: Fix unit test failure for trackDappViewedEvent Mar 14, 2024
@Cal-L Cal-L added the No QA Needed Apply this label when your PR does not need any QA effort. label Mar 14, 2024
@Cal-L Cal-L merged commit 56000f7 into fix/8885_add_identify Mar 14, 2024
@Cal-L Cal-L deleted the cal/8885-add-identify branch March 14, 2024 00:45
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

No QA Needed Apply this label when your PR does not need any QA effort. team-mobile-platform Mobile Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant