Skip to content

Commit 5606796

Browse files
kdaviduikclaude
andcommitted
test(e2e): comment out perf-kit assertions blocked by bot detection
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>
1 parent 351d55d commit 5606796

File tree

4 files changed

+36
-28
lines changed

4 files changed

+36
-28
lines changed

e2e/specs/new-cookies/consent-tracking-accept.spec.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,23 @@ test.describe('Consent Tracking - Auto-Allowed (Consent Allowed by Default)', ()
8080
'after page load',
8181
);
8282

83+
// TODO: Uncomment once perf-kit bot detection fix ships — perf-kit produce
84+
// requests are blocked by bot detection, causing verifyPerfKitRequests to fail.
8385
// 6. Finalize perf-kit metrics before navigation
84-
await storefront.finalizePerfKitMetrics();
86+
// await storefront.finalizePerfKitMetrics();
8587

8688
// 7. Navigate to a product (triggers perf-kit to send metrics)
8789
await storefront.navigateToFirstProduct();
8890

8991
// Wait for perf-kit to send metrics after visibility change
90-
await storefront.page.waitForTimeout(500);
92+
// await storefront.page.waitForTimeout(500);
9193

9294
// Verify perf-kit payload contains correct tracking values
93-
storefront.verifyPerfKitRequests(
94-
navigationServerTiming._y!,
95-
navigationServerTiming._s!,
96-
'after navigation',
97-
);
95+
// storefront.verifyPerfKitRequests(
96+
// navigationServerTiming._y!,
97+
// navigationServerTiming._s!,
98+
// 'after navigation',
99+
// );
98100

99101
// 8. Add to cart
100102
await storefront.addToCart();

e2e/specs/new-cookies/privacy-banner-accept.spec.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,21 +111,23 @@ test.describe('Privacy Banner - Accept Flow', () => {
111111
'after consent',
112112
);
113113

114+
// TODO: Uncomment once perf-kit bot detection fix ships — perf-kit produce
115+
// requests are blocked by bot detection, causing verifyPerfKitRequests to fail.
114116
// 9. Finalize perf-kit metrics before navigation (triggers LCP finalization)
115-
await storefront.finalizePerfKitMetrics();
117+
// await storefront.finalizePerfKitMetrics();
116118

117119
// 10. Navigate to a product (this triggers perf-kit to send metrics via visibility change)
118120
await storefront.navigateToFirstProduct();
119121

120122
// 11. Verify perf-kit payload contains correct tracking values
121123
// Wait a moment for perf-kit to send its metrics after visibility change
122-
await storefront.page.waitForTimeout(500);
124+
// await storefront.page.waitForTimeout(500);
123125

124-
storefront.verifyPerfKitRequests(
125-
updatedServerTimingValues._y!,
126-
updatedServerTimingValues._s!,
127-
'after navigation',
128-
);
126+
// storefront.verifyPerfKitRequests(
127+
// updatedServerTimingValues._y!,
128+
// updatedServerTimingValues._s!,
129+
// 'after navigation',
130+
// );
129131

130132
// 12. Add to cart
131133
await storefront.addToCart();

e2e/specs/old-cookies/consent-tracking-accept.spec.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,23 @@ test.describe('Consent Tracking - Auto-Allowed (Consent Allowed by Default)', ()
6060
'after page load',
6161
);
6262

63+
// TODO: Uncomment once perf-kit bot detection fix ships — perf-kit produce
64+
// requests are blocked by bot detection, causing verifyPerfKitRequests to fail.
6365
// 6. Finalize perf-kit metrics before navigation
64-
await storefront.finalizePerfKitMetrics();
66+
// await storefront.finalizePerfKitMetrics();
6567

6668
// 7. Navigate to a product (triggers perf-kit to send metrics)
6769
await storefront.navigateToFirstProduct();
6870

6971
// Wait for perf-kit to send metrics after visibility change
70-
await storefront.page.waitForTimeout(500);
72+
// await storefront.page.waitForTimeout(500);
7173

7274
// Verify perf-kit payload contains correct tracking values
73-
storefront.verifyPerfKitRequests(
74-
navigationServerTiming._y!,
75-
navigationServerTiming._s!,
76-
'after navigation',
77-
);
75+
// storefront.verifyPerfKitRequests(
76+
// navigationServerTiming._y!,
77+
// navigationServerTiming._s!,
78+
// 'after navigation',
79+
// );
7880

7981
// 8. Add to cart
8082
await storefront.addToCart();

e2e/specs/old-cookies/privacy-banner-accept.spec.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,23 @@ test.describe('Privacy Banner - Accept Flow', () => {
9292
'after consent',
9393
);
9494

95+
// TODO: Uncomment once perf-kit bot detection fix ships — perf-kit produce
96+
// requests are blocked by bot detection, causing verifyPerfKitRequests to fail.
9597
// 9. Finalize perf-kit metrics before navigation (triggers LCP finalization)
96-
await storefront.finalizePerfKitMetrics();
98+
// await storefront.finalizePerfKitMetrics();
9799

98100
// 10. Navigate to a product (this triggers perf-kit to send metrics via visibility change)
99101
await storefront.navigateToFirstProduct();
100102

101103
// 11. Verify perf-kit payload contains correct tracking values
102104
// Wait a moment for perf-kit to send its metrics after visibility change
103-
await storefront.page.waitForTimeout(500);
105+
// await storefront.page.waitForTimeout(500);
104106

105-
storefront.verifyPerfKitRequests(
106-
updatedServerTimingValues._y!,
107-
updatedServerTimingValues._s!,
108-
'after navigation',
109-
);
107+
// storefront.verifyPerfKitRequests(
108+
// updatedServerTimingValues._y!,
109+
// updatedServerTimingValues._s!,
110+
// 'after navigation',
111+
// );
110112

111113
// 12. Add to cart
112114
await storefront.addToCart();

0 commit comments

Comments
 (0)