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: Fix unit and e2e tests that were expected the date based privacy policy components to not be shown #25390

Merged
merged 5 commits into from
Jun 18, 2024

Conversation

Prithpal-Sooriya
Copy link
Contributor

@Prithpal-Sooriya Prithpal-Sooriya commented Jun 18, 2024

Description

Fixture / mock data in unit and e2e tests have been modified to handle the privacy policy toast. These tests previously assumed that the privacy policy toast, and in one case the updated metametrics component during onboarding, would not be shown. However, their display was date dependent. With this PR, the updated test data takes these dates into account, and tests should now pass.

Open in GitHub Codespaces

Related issues

Fixes: failing tests on develop

Manual testing steps

e2e and unit tests should pass

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.

@Prithpal-Sooriya Prithpal-Sooriya requested a review from a team as a code owner June 18, 2024 16:02
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.

@@ -53,6 +54,7 @@ export default class AppStateController extends EventEmitter {
trezorModel: null,
currentPopupId: undefined,
onboardingDate: null,
newPrivacyPolicyToastDate: PRIVACY_POLICY_DATE,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A bunch of touched files. But this moves the privacy policy into app state - which allows us to use fixtures and mocks for our e2e and unit tests

@danjm danjm changed the base branch from fix-e2e-privacy-notice to develop June 18, 2024 16:57
@metamaskbot
Copy link
Collaborator

Builds ready [a6d7cd0]
Page Load Metrics (48 ± 3 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6410580105
domContentLoaded9121010
load39614873
domInteractive9121010
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 179 Bytes (0.01%)
  • ui: -133 Bytes (-0.00%)
  • common: -336 Bytes (-0.01%)

Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.41%. Comparing base (2aaf565) to head (01c922a).
Report is 12 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #25390      +/-   ##
===========================================
+ Coverage    65.37%   65.41%   +0.04%     
===========================================
  Files         1377     1381       +4     
  Lines        54623    54712      +89     
  Branches     14320    14346      +26     
===========================================
+ Hits         35709    35789      +80     
- Misses       18914    18923       +9     

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

@danjm danjm force-pushed the fix-unit-privacy-notice branch from a6d7cd0 to 0ebaf5c Compare June 18, 2024 17:50
@Prithpal-Sooriya Prithpal-Sooriya added the team-notifications Notifications team label Jun 18, 2024
@danjm danjm changed the title fix: move policy into app state fix: Fix unit and e2e tests that were expected the date based privacy policy components to not be shown Jun 18, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [01c922a]
Page Load Metrics (52 ± 5 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint7010785115
domContentLoaded8201221
load407752105
domInteractive8201221
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 82 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@danjm danjm merged commit 7b33133 into develop Jun 18, 2024
74 checks passed
@danjm danjm deleted the fix-unit-privacy-notice branch June 18, 2024 19:44
@github-actions github-actions bot locked and limited conversation to collaborators Jun 18, 2024
@metamaskbot metamaskbot added release-12.1.0 Issue or pull request that will be included in release 12.1.0 release-12.0.0 Issue or pull request that will be included in release 12.0.0 and removed release-12.1.0 Issue or pull request that will be included in release 12.1.0 labels Jun 18, 2024
@metamaskbot
Copy link
Collaborator

Missing release label release-12.0.0 on PR. Adding release label release-12.0.0 on PR and removing other release labels(release-12.1.0), as PR was cherry-picked in branch 12.0.0.

@metamaskbot metamaskbot added release-11.16.13 Issue or pull request that will be included in release 11.16.13 and removed release-12.0.0 Issue or pull request that will be included in release 12.0.0 labels Jun 20, 2024
@metamaskbot
Copy link
Collaborator

Missing release label release-11.16.13 on PR. Adding release label release-11.16.13 on PR and removing other release labels(release-12.0.0), as PR was cherry-picked in branch 11.16.13.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.16.13 Issue or pull request that will be included in release 11.16.13 team-notifications Notifications team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants