Skip to content

test(e2e): comment out perf-kit assertions blocked by bot detection#3657

Merged
kdaviduik merged 1 commit intomainfrom
kd-disable-perfkit-assertions
Apr 1, 2026
Merged

test(e2e): comment out perf-kit assertions blocked by bot detection#3657
kdaviduik merged 1 commit intomainfrom
kd-disable-perfkit-assertions

Conversation

@kdaviduik
Copy link
Copy Markdown
Contributor

@kdaviduik kdaviduik commented Apr 1, 2026

WHY are these changes introduced?

4 cookie e2e tests (consent-tracking-accept and privacy-banner-accept in both new-cookies and old-cookies) are failing in CI and locally. The failures are at verifyPerfKitRequests — perf-kit produce requests are blocked by Shopify's bot detection system. The perf-kit script itself loads fine, but its outgoing /v1/produce analytics requests never fire.

The bot detection fix is server-side (outside Hydrogen) and in progress separately.

WHAT is this pull request doing?

Comments out verifyPerfKitRequests() and its immediate setup (finalizePerfKitMetrics(), waitForTimeout(500)) in the 4 failing specs with TODO markers for re-enablement once the server-side fix ships.

Other perf-kit calls (waitForPerfKit, expectPerfKitLoaded, expectPerfKitNotLoaded) are left intact — they test script loading behavior and are currently passing.

HOW to test your changes?

npx playwright test --project=new-cookies --project=old-cookies

The 4 previously-failing tests should now pass. grep -r "storefront.verifyPerfKitRequests" e2e/specs/ should return zero uncommented matches.

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

Co-Authored-By: Claude noreply@anthropic.com

Perf-kit produce requests are blocked by Shopify's bot detection system,
causing verifyPerfKitRequests() to fail in 4 cookie e2e tests. The perf-kit
script itself loads fine, but its outgoing /v1/produce analytics requests
never fire.

The fix is server-side (outside Hydrogen) and in progress. Comment out
the verifyPerfKitRequests assertions and their immediate setup
(finalizePerfKitMetrics, waitForTimeout) with TODO markers so they can
be re-enabled once the bot detection fix ships.

Other perf-kit calls (waitForPerfKit, expectPerfKitLoaded) are left
intact since they test script loading behavior and are currently passing.

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor Author

kdaviduik commented Apr 1, 2026

@kdaviduik kdaviduik marked this pull request as ready for review April 1, 2026 18:37
@kdaviduik kdaviduik requested a review from a team as a code owner April 1, 2026 18:37
@kdaviduik kdaviduik marked this pull request as draft April 1, 2026 18:38
@shopify
Copy link
Copy Markdown
Contributor

shopify bot commented Apr 1, 2026

Oxygen deployed a preview of your kd-disable-perfkit-assertions branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment April 1, 2026 7:16 PM

Learn more about Hydrogen's GitHub integration.

@kdaviduik kdaviduik marked this pull request as ready for review April 1, 2026 18:39
Copy link
Copy Markdown
Contributor

@lucyxiang lucyxiang left a comment

Choose a reason for hiding this comment

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

Ah this was failing on my PR, thanks

@kdaviduik kdaviduik force-pushed the kd-disable-perfkit-assertions branch from d54847c to 5606796 Compare April 1, 2026 19:14
@kdaviduik kdaviduik merged commit 0f64591 into main Apr 1, 2026
63 of 66 checks passed
@kdaviduik kdaviduik deleted the kd-disable-perfkit-assertions branch April 1, 2026 21:28
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