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: "Dapp viewed Event @no-mmi is sent when refreshing da..." flaky test #27381

Merged
merged 4 commits into from
Oct 4, 2024

Conversation

hjetpoluru
Copy link
Contributor

@hjetpoluru hjetpoluru commented Sep 25, 2024

Description

In this test, there are two different requests for the "Dapp Viewed" event: one with the property is_first_visit: true and the other with is_first_visit: false. However, the current mock setup does not differentiate between these two requests.
To ensure that both "Dapp Viewed" event requests are properly handled, we need to create two separate mocks has been created.

Special thanks to @seaona for her thorough analysis and understanding of this tricky flaky test. Her insights and proposed solution were instrumental in resolving this issue. All credit for identifying and addressing this problem goes to her.

Open in GitHub Codespaces

Related issues

Fixes:
#24655
#24651
#26899

Manual testing steps

Run the dapp viewed spec locally or in codespace using below commands against chrome browser:
yarn
yarn build:test:webpack
ENABLE_MV3=false yarn test:e2e:single test/e2e/tests/metrics/dapp-viewed.spec.js --browser=chrome

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.

@hjetpoluru hjetpoluru self-assigned this Sep 25, 2024
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.

@DDDDDanica DDDDDanica force-pushed the fix-flaky-test-dapp-viewed-26899 branch 2 times, most recently from 8b9e72c to 631fb41 Compare September 26, 2024 00:36
@hjetpoluru hjetpoluru force-pushed the fix-flaky-test-dapp-viewed-26899 branch from d8d3152 to 54a2429 Compare October 2, 2024 20:58
Copy link

sonarcloud bot commented Oct 3, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [4c8a9a0]
Page Load Metrics (1863 ± 67 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint31220951792367176
domContentLoaded16152056183713264
load16472122186314067
domInteractive19235564622
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@hjetpoluru hjetpoluru added the area-qa Relating to QA work (Quality Assurance) label Oct 4, 2024
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Oct 4, 2024
@hjetpoluru hjetpoluru marked this pull request as ready for review October 4, 2024 12:58
@hjetpoluru hjetpoluru requested a review from a team as a code owner October 4, 2024 12:58
Copy link
Contributor

@seaona seaona left a comment

Choose a reason for hiding this comment

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

nice!!

@DDDDDanica
Copy link
Contributor

LGTM !

@hjetpoluru hjetpoluru added this pull request to the merge queue Oct 4, 2024
Merged via the queue into develop with commit 9f68d10 Oct 4, 2024
84 checks passed
@hjetpoluru hjetpoluru deleted the fix-flaky-test-dapp-viewed-26899 branch October 4, 2024 13:40
@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 2024
@metamaskbot metamaskbot added the release-12.7.0 Issue or pull request that will be included in release 12.7.0 label Oct 4, 2024
@gauthierpetetin gauthierpetetin added release-12.6.0 Issue or pull request that will be included in release 12.6.0 and removed release-12.7.0 Issue or pull request that will be included in release 12.7.0 labels Oct 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-qa Relating to QA work (Quality Assurance) INVALID-PR-TEMPLATE PR's body doesn't match template release-12.6.0 Issue or pull request that will be included in release 12.6.0 team-extension-platform
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants