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 Percy Screenshot CI Failure #2255

Merged
merged 3 commits into from
Oct 12, 2023
Merged

Conversation

jshawl
Copy link
Contributor

@jshawl jshawl commented Oct 3, 2023

Description

This PR fixes two issues with npm run percy-screenshot:

  1. Error: browserType.launch: Executable doesn't exist at /home/runner/.cache/ms-playwright/chromium-1080/chrome-linux/chrome link
  2. [percy] Heads up! The current version of @percy/cli is more than 10 releases behind! 1.18.0 -> 1.27.2 link

Why are we making these changes?

While working on an unrelated PR, I noticed the percy screenshot was failing. I pushed up an empty commit to this branch to verify the failure was on the main branch and not related to my changes. The error message told me to run npx playwright install <- I tried that, and it worked! I also tried finding a related change in either Percy or Playwright that would explain why this test started failing but was unable to locate mention of this error after 2022 🤔

Screenshots

Screenshot 2023-10-03 at 15 20 43

❤️ Thank you!

@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (c27574e) 51.22% compared to head (69cc534) 51.22%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2255   +/-   ##
=======================================
  Coverage   51.22%   51.22%           
=======================================
  Files         104      104           
  Lines        2007     2007           
  Branches      587      587           
=======================================
  Hits         1028     1028           
  Misses        879      879           
  Partials      100      100           
Flag Coverage Δ
jest 32.09% <ø> (ø)
karma 49.81% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@jshawl jshawl marked this pull request as ready for review October 3, 2023 20:23
@jshawl jshawl requested a review from a team as a code owner October 3, 2023 20:23
@jshawl jshawl requested a review from nbierdeman October 3, 2023 20:24
@@ -30,7 +30,7 @@
"start": "npm run webpack -- --progress --watch",
"test": "npm run format:check && npm run test:unit && npm run jest-ssr && npm run karma && npm run jest-screenshot",
"test:unit": "vitest run",
"percy-screenshot": "babel-node ./test/percy/server/createButtonConfigs.js && percy exec -- playwright test --config=./test/percy/playwright.config.js --reporter=dot --pass-with-no-tests",
"percy-screenshot": "npx playwright install && babel-node ./test/percy/server/createButtonConfigs.js && percy exec -- playwright test --config=./test/percy/playwright.config.js --reporter=dot --pass-with-no-tests",
Copy link
Member

Choose a reason for hiding this comment

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

do we still need this if we updated percy and playwright in the package.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes! I only know this because the second commit in this PR upgraded the dependencies and still failed: https://github.com/paypal/paypal-checkout-components/actions/runs/6397759802/job/17366408426 but the third commit added this line and passed 🥳

Another option would be to back out the dependency upgrades and only keep npx playwright install.

@wsbrunson wsbrunson merged commit e628f02 into paypal:main Oct 12, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants