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(core): fix playwright tests #1622

Merged
merged 1 commit into from
Nov 11, 2024
Merged

test(core): fix playwright tests #1622

merged 1 commit into from
Nov 11, 2024

Conversation

chanceaclark
Copy link
Contributor

@chanceaclark chanceaclark commented Nov 11, 2024

What/Why?

Fixes a few issues with the playwright test suite:

--disable-web-security

We were running into a CORS issue when redirecting to checkout from a HeadlessChrome sec-ch-ua user agent. When the browser sent preflight requests to BigCommerce assets, we were denied access to the loader.js asset which cause checkout to not load.

I attempted to set a new User Agent for playwright requests, but the sec-ch-ua header disallows tampering to it, thus rejecting the request. I tried something like this but failed: microsoft/playwright#27903 (comment)

Other fixes

Cleaned up some unused exports and tweaked the session syncing test to actually work and updated a snapshot with new functionality.

Testing

See CI.

Copy link

vercel bot commented Nov 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
catalyst ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 5:09pm
catalyst-latest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 5:09pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Nov 11, 2024 5:09pm
catalyst-soul ⬜️ Ignored (Inspect) Visit Preview Nov 11, 2024 5:09pm
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Nov 11, 2024 5:09pm
catalyst-unstable ⬜️ Ignored (Inspect) Visit Preview Nov 11, 2024 5:09pm

Copy link

changeset-bot bot commented Nov 11, 2024

⚠️ No Changeset found

Latest commit: 928d390

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chanceaclark chanceaclark added this pull request to the merge queue Nov 11, 2024
Merged via the queue into main with commit aa78e9b Nov 11, 2024
12 checks passed
@chanceaclark chanceaclark deleted the chore/fix-tests branch November 11, 2024 17:32
Copy link
Contributor

⚡️🏠 Lighthouse report

Lighthouse ran against https://catalyst-latest-als9lgx9u-bigcommerce-platform.vercel.app

🖥️ Desktop

We ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:

Category Score
🟠 Performance 83
🟢 Accessibility 96
🟢 Best practices 100
🟠 SEO 82

📱 Mobile

We ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:

Category Score
🟠 Performance 87
🟢 Accessibility 96
🟢 Best practices 100
🟠 SEO 85

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