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

feat: Artifact screenshots per open tab #25453

Merged
merged 3 commits into from
Jun 21, 2024

Conversation

vthomas13
Copy link
Contributor

@vthomas13 vthomas13 commented Jun 20, 2024

Description

Currently artifacts only capture a screenshot of one tab (even if it's not relevant or helpful).This PR attempts to catch this case and iterate over every open tab to take a screenshot if there's more than one tab open at the time of test failure.

Open in GitHub Codespaces

Related issues

Fixes: N/A

Manual testing steps

  1. Add throw new Error('e') statement to any test to force it to fail
  2. Run that test locally
  3. Verify that there's a screenshot in your artifacts folder for each tab at the time of failure

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.

@vthomas13 vthomas13 requested a review from a team as a code owner June 20, 2024 20: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.

@vthomas13 vthomas13 changed the title feat:testing artifact screenshots per open tab feat: testing artifact screenshots per open tab Jun 20, 2024
@vthomas13 vthomas13 changed the title feat: testing artifact screenshots per open tab feat: Artifact screenshots per open tab Jun 20, 2024
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.91%. Comparing base (5c8e1a9) to head (ab59709).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #25453   +/-   ##
========================================
  Coverage    64.91%   64.91%           
========================================
  Files         1390     1390           
  Lines        55155    55155           
  Branches     14493    14493           
========================================
  Hits         35803    35803           
  Misses       19352    19352           

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

Copy link
Contributor

@hjetpoluru hjetpoluru left a comment

Choose a reason for hiding this comment

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

LGTM

@seaona
Copy link
Contributor

seaona commented Jun 21, 2024

awesome work 🔥

@vthomas13 vthomas13 force-pushed the multiple-screenshots-failing-e2e branch from 35b9d95 to ab59709 Compare June 21, 2024 13:04
@metamaskbot
Copy link
Collaborator

Builds ready [ab59709]
Page Load Metrics (42 ± 2 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint63837363
domContentLoaded912910
load38564242
domInteractive912910
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@vthomas13 vthomas13 merged commit abbd7ed into develop Jun 21, 2024
84 checks passed
@vthomas13 vthomas13 deleted the multiple-screenshots-failing-e2e branch June 21, 2024 14:18
@github-actions github-actions bot locked and limited conversation to collaborators Jun 21, 2024
@metamaskbot metamaskbot added the release-12.1.0 Issue or pull request that will be included in release 12.1.0 label Jun 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.1.0 Issue or pull request that will be included in release 12.1.0 team-extension-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants