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

test: [Snaps E2E] Create E2E test for UI links #22739

Merged
merged 8 commits into from
Apr 15, 2024

Conversation

bowensanders
Copy link
Contributor

@bowensanders bowensanders commented Jan 30, 2024

Description

Create E2E test for UI links

Related issues

Fixes: #22425

Manual testing steps

  1. This is an automated E2E test

Screenshots/Recordings

Before

After

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.

@bowensanders bowensanders self-assigned this Jan 30, 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.

@bowensanders bowensanders added area-snaps team-snaps DEPRECATED: Use "team-snaps-platform" or "team-snaps-ecosystem" instead labels Jan 30, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [97744ec]
Page Load Metrics (1878 ± 67 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint884011887435
domContentLoaded106827168
load16672216187814067
domInteractive106827168
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@bowensanders bowensanders marked this pull request as ready for review February 22, 2024 20:22
@bowensanders bowensanders requested a review from a team as a code owner February 22, 2024 20:22
@bowensanders bowensanders changed the title [Snaps] Create E2E test for UI links test: [Snaps E2E] Create E2E test for UI links Feb 26, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [6b085be]
Page Load Metrics (1856 ± 83 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint12467120111756
domContentLoaded117332178
load14712223185617483
domInteractive117332178
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

});

// wait for and click back button
await driver.waitForSelector({
Copy link
Member

Choose a reason for hiding this comment

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

Should we not test that it opens the window?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you're questioning testing that the dialog with the URL from the link, that is done from 92-95 as it is detecting that the correct address comes up before backing out of the modal to the approve button.

Are you suggesting that we click through to make sure that opening a new tab with the intended link also works?

Copy link
Member

Choose a reason for hiding this comment

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

Yep!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added in the latest commit. It required adding hosts to the privacy snapshot but it works.

@ziedbrini ziedbrini added team-snaps-platform Snaps Platform team and removed team-snaps DEPRECATED: Use "team-snaps-platform" or "team-snaps-ecosystem" instead labels Mar 6, 2024
@bowensanders bowensanders requested a review from a team as a code owner March 6, 2024 20:47
@metamaskbot
Copy link
Collaborator

Builds ready [1c3becf]
Page Load Metrics (1079 ± 424 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint712831424622
domContentLoaded989372311
load5821091079884424
domInteractive989372311
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.72%. Comparing base (ca90dde) to head (1c3becf).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #22739   +/-   ##
========================================
  Coverage    68.72%   68.72%           
========================================
  Files         1105     1105           
  Lines        43248    43248           
  Branches     11561    11561           
========================================
  Hits         29718    29718           
  Misses       13530    13530           

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

@FrederikBolding FrederikBolding merged commit 2cde24c into develop Apr 15, 2024
67 checks passed
@FrederikBolding FrederikBolding deleted the bowen/uilinktest branch April 15, 2024 11:50
@github-actions github-actions bot locked and limited conversation to collaborators Apr 15, 2024
@metamaskbot metamaskbot added the release-11.16.0 Issue or pull request that will be included in release 11.16.0 label Apr 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-snaps release-11.16.0 Issue or pull request that will be included in release 11.16.0 team-snaps-platform Snaps Platform team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Snaps E2E] Create test for links in custom UI
6 participants