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

Expand error details before taking screenshot when a test fails with a Page Error #15779

Merged
merged 1 commit into from
Sep 9, 2022

Conversation

seaona
Copy link
Contributor

@seaona seaona commented Sep 9, 2022

Explanation

When the e2e tests fail, a screenshot is taken and uploaded as Artifacts in circle ci. The problem is that when we reach an error page, the Error details are hiden and the screenshot does not captures valuable info.

For improving this behaviour, we now check if we reach a Page error and we expand the error details before taking the screenshot.

Screenshots/Screencaps

Before

Artifacts screenshot with Page Errors looked like:

image

After

Now, Error is expanded and screenshot looks like:

image

Manual Testing Steps

For testing this manually, you can trigger the Page error during a test (this will make it fail) and check that the screenshot is taken after page details are expanded.

  1. Pick any e2e test and add a delay, so you have a bit of time to perform step 2: await driver.delay(3000)
  2. Change the URL to home.html#settings/contact-list/view-contact/
  3. Wait until test fails

See test effectively expands the error details and screenshot is taken after this step.

Pre-Merge Checklist

  • PR template is filled out
  • IF this PR fixes a bug, a test that would have caught the bug has been added
  • PR is linked to the appropriate GitHub issue
  • PR has been added to the appropriate release Milestone

+ If there are functional changes:

  • Manual testing complete & passed
  • "Extension QA Board" label has been applied

@seaona seaona requested a review from a team as a code owner September 9, 2022 10:58
@seaona seaona requested a review from digiwand September 9, 2022 10:58
@seaona seaona self-assigned this Sep 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2022

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.

@metamaskbot
Copy link
Collaborator

Builds ready [74933a4]
Page Load Metrics (1953 ± 81 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1011685211339163
domContentLoaded16842402193516278
load16842403195316881
domInteractive16842402193516278

@seaona seaona merged commit 9cf401b into develop Sep 9, 2022
@seaona seaona deleted the e2e-expand-error branch September 9, 2022 12:40
@github-actions github-actions bot locked and limited conversation to collaborators Sep 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add step for expanding Error when failed test
4 participants