@faststore/core 4.11.3-dev.0 → 4.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
 
2
- > @faststore/core@4.11.2 generate /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.11.3-dev.1 generate /home/runner/work/faststore/faststore/packages/core
3
3
  > pnpm run gen-types && pnpm run cache-graphql
4
4
 
5
5
 
6
- > @faststore/core@4.11.2 gen-types /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@4.11.3-dev.1 gen-types /home/runner/work/faststore/faststore/packages/core
7
7
  > node ../cli/bin/run generate-types .
8
8
 
9
9
  [STARTED] Parse Configuration
@@ -19,7 +19,7 @@
19
19
  [COMPLETED] Generate to @generated/
20
20
  [COMPLETED] Generate outputs
21
21
 
22
- > @faststore/core@4.11.2 cache-graphql /home/runner/work/faststore/faststore/packages/core
22
+ > @faststore/core@4.11.3-dev.1 cache-graphql /home/runner/work/faststore/faststore/packages/core
23
23
  > node ../cli/bin/run cache-graphql --config=./discovery.config.default.js --queries=./@generated/persisted-documents.json
24
24
 
25
25
  [Info] - Config file location: /home/runner/work/faststore/faststore/packages/core/discovery.config.default.js
@@ -1,5 +1,5 @@
1
1
 
2
- > @faststore/core@4.11.2 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.11.3-dev.1 test /home/runner/work/faststore/faststore/packages/core
3
3
  > vitest run
4
4
 
5
5
 
@@ -7,27 +7,31 @@
7
7
 
8
8
  Not implemented: navigation to another Document
9
9
  Not implemented: navigation to another Document
10
- ✓  browser  test/sdk/ui/useScrollRestoration.browser.test.ts (43 tests) 959ms
10
+ ✓  browser  test/sdk/ui/useScrollRestoration.browser.test.ts (43 tests) 906ms
11
11
  Browserslist: browsers data (caniuse-lite) is 9 months old. Please run:
12
12
  npx update-browserslist-db@latest
13
13
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
14
- ✓  browser  test/components/account/ContractSwitcher.browser.test.tsx (22 tests) 3338ms
15
- ✓ shows an error state when the list fails to load  680ms
16
- ✓ requires selecting a contract before Confirm is enabled, then switches (REQ-03)  385ms
17
- ✓  browser  test/components/account/cards/MyAccountListCards.browser.test.tsx (16 tests) 2444ms
18
- ✓ shows the tab bar and renders Personal cards by default  985ms
19
- ✓ paginates when there are more than 25 cards  414ms
20
- ✓  browser  test/components/account/orders/BuyingPolicyAlert.browser.test.tsx (13 tests) 1602ms
21
- ✓ opens the reject confirmation modal with the default English copy  652ms
22
- ✓  browser  test/components/ui/RichText/RichText.browser.test.tsx (8 tests) 375ms
23
- ✓  browser  test/sdk/product/usePageProductsQuery.browser.test.ts (9 tests) 172ms
24
- ✓  browser  test/components/account/OrganizationDrawer.browser.test.tsx (10 tests) 1579ms
25
- ✓ renders the menu view with contract details and manage footer  888ms
26
- ✓ opens the contract switcher and returns to the menu on back  339ms
27
- ✓  browser  test/components/CartRecommendationShelf/CartRecommendationShelf.browser.test.tsx (13 tests) 136ms
28
- ✓  browser  test/sdk/localization/useBindingSelector.browser.test.tsx (9 tests) 67ms
29
- ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (6 tests) 7ms
30
- ✓  browser  test/components/ui/ProductGallery/GalleryPageHeightLock.browser.test.tsx (8 tests) 79ms
14
+ ✓  browser  test/components/account/cards/MyAccountListCards.browser.test.tsx (16 tests) 2588ms
15
+ ✓ shows the tab bar and renders Personal cards by default  991ms
16
+ ✓ paginates when there are more than 25 cards  371ms
17
+ ✓  browser  test/components/account/ContractSwitcher.browser.test.tsx (22 tests) 3427ms
18
+ ✓ shows an error state when the list fails to load  627ms
19
+ ✓ requires selecting a contract before Confirm is enabled, then switches (REQ-03)  313ms
20
+ ✓ keeps Confirm disabled when switching is unavailable  326ms
21
+ ✓ honors CMS-provided labels for the header, current session, search, footer, and available count  368ms
22
+ ✓ falls back to English defaults when CMS labels are blank  347ms
23
+ ✓  browser  test/components/account/orders/BuyingPolicyAlert.browser.test.tsx (13 tests) 2038ms
24
+ ✓ opens the reject confirmation modal with the default English copy  661ms
25
+ ✓ opens the reject confirmation modal with CMS-provided labels  390ms
26
+ ✓  browser  test/components/ui/RichText/RichText.browser.test.tsx (8 tests) 517ms
27
+ ✓  browser  test/sdk/product/usePageProductsQuery.browser.test.ts (9 tests) 151ms
28
+ ✓  browser  test/components/account/OrganizationDrawer.browser.test.tsx (10 tests) 1533ms
29
+ ✓ renders the menu view with contract details and manage footer  848ms
30
+ ✓  browser  test/sdk/localization/useBindingSelector.browser.test.tsx (9 tests) 45ms
31
+ ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (6 tests) 17ms
32
+ ✓  browser  test/components/CartRecommendationShelf/CartRecommendationShelf.browser.test.tsx (13 tests) 157ms
33
+ ✓  browser  test/components/ui/ProductGallery/GalleryPageHeightLock.browser.test.tsx (8 tests) 73ms
34
+ ✓  browser  test/sdk/recommendations/useRecommendationShelf.browser.test.tsx (12 tests) 61ms
31
35
  stderr | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx
32
36
  Error in optimistic validation: TypeError: Failed to parse URL from /api/graphql?operationName=ValidateCartMutation&operationHash=3c71b0d3fc2bade14df68abfa271858beb361b12
33
37
   at node:internal/deps/undici/undici:16416:13
@@ -54,16 +58,14 @@ Browserslist: browsers data (caniuse-lite) is 9 months old. Please run:
54
58
  }
55
59
  }
56
60
 
57
- ✓  browser  test/sdk/recommendations/useRecommendationShelf.browser.test.tsx (12 tests) 41ms
58
61
  stderr | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx > RecommendationShelf > renders nothing when there is an error
59
62
  Error fetching recommendations undefined boom for campaign vrn:recommendations:acc:rec-top-items-v2:campaign-1
60
63
 
61
- ✓  browser  test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx (8 tests) 78ms
62
- ✓  browser  test/sdk/product/useProductQuery.browser.test.ts (5 tests) 322ms
63
- ✓  browser  test/components/CartSidebar/CartSidebar.browser.test.tsx (5 tests) 50ms
64
- ✓  browser  test/components/sections/Account/AccountOrderDetails.browser.test.tsx (4 tests) 109ms
65
- ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (7 tests) 9ms
66
- ✓  browser  test/components/navigation/Navbar.browser.test.tsx (3 tests) 72ms
64
+ ✓  browser  test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx (8 tests) 101ms
65
+ ✓  browser  test/components/CartSidebar/CartSidebar.browser.test.tsx (5 tests) 63ms
66
+ ✓  browser  test/sdk/product/useProductQuery.browser.test.ts (5 tests) 428ms
67
+ ✓  browser  test/components/sections/Account/AccountOrderDetails.browser.test.tsx (4 tests) 94ms
68
+ ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (7 tests) 18ms
67
69
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > posts the password and redirects to the requested return path
68
70
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
69
71
 
@@ -101,14 +103,6 @@ act(() => {
101
103
  This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
102
104
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
103
105
 
104
- stderr | test/sdk/session/validateSession.browser.test.ts
105
- Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
106
- at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
107
- at validateCart (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/index.ts:124:9)
108
- at onValidate (/home/runner/work/faststore/faststore/packages/core/src/sdk/useStore.ts:18:20)
109
- at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
110
-  at processTicksAndRejections (node:internal/process/task_queues:103:5)
111
-
112
106
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > defaults returnTo to root and shows API validation errors
113
107
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
114
108
 
@@ -205,7 +199,6 @@ act(() => {
205
199
  This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
206
200
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
207
201
 
208
- ✓  browser  test/sdk/session/validateSession.browser.test.ts (9 tests) 26ms
209
202
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > shows service unavailable when the response is not a login payload
210
203
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
211
204
 
@@ -254,6 +247,14 @@ act(() => {
254
247
  This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
255
248
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
256
249
 
250
+ stderr | test/sdk/session/validateSession.browser.test.ts
251
+ Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
252
+ at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
253
+ at validateCart (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/index.ts:124:9)
254
+ at onValidate (/home/runner/work/faststore/faststore/packages/core/src/sdk/useStore.ts:18:20)
255
+ at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
256
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
257
+
257
258
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > shows service unavailable when the login request fails
258
259
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
259
260
 
@@ -302,9 +303,9 @@ act(() => {
302
303
  This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
303
304
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
304
305
 
305
- ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 676ms
306
- ✓  browser  test/components/account/OrganizationDrawerFooter.browser.test.tsx (8 tests) 474ms
307
- ✓  browser  test/sdk/account/useSwitchContract.browser.test.ts (5 tests) 77ms
306
+ ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 827ms
307
+ ✓  browser  test/sdk/session/validateSession.browser.test.ts (9 tests) 25ms
308
+ ✓  browser  test/components/navigation/Navbar.browser.test.tsx (3 tests) 119ms
308
309
  stderr | test/components/cms/RenderSections.browser.test.tsx
309
310
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
310
311
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -313,9 +314,12 @@ This ensures that you're testing the behavior the user would see in the browser.
313
314
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
314
315
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
315
316
 
316
- ✓  browser  test/components/cms/RenderSections.browser.test.tsx (5 tests) 58ms
317
- ✓  browser  test/sdk/product/usePageProductsQuery.deliveryPromise.browser.test.ts (3 tests) 23ms
318
- ✓  browser  test/components/navigation/NavbarSlider.browser.test.tsx (2 tests) 32ms
317
+ ✓  browser  test/components/account/OrganizationDrawerFooter.browser.test.tsx (8 tests) 512ms
318
+ ✓ shows manage link for organization managers  307ms
319
+ ✓  browser  test/sdk/account/useSwitchContract.browser.test.ts (5 tests) 56ms
320
+ ✓  browser  test/components/cms/RenderSections.browser.test.tsx (5 tests) 76ms
321
+ ✓  browser  test/components/navigation/NavbarSlider.browser.test.tsx (2 tests) 30ms
322
+ ✓  browser  test/sdk/product/usePageProductsQuery.deliveryPromise.browser.test.ts (3 tests) 39ms
319
323
  stderr | test/sdk/localization/store-url.browser.test.ts
320
324
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
321
325
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -324,10 +328,10 @@ This ensures that you're testing the behavior the user would see in the browser.
324
328
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
325
329
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
326
330
 
327
- ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 5ms
328
- ✓  browser  test/sdk/account/useAvailableContracts.browser.test.ts (6 tests) 37ms
329
- ✓  browser  test/components/account/Menu.browser.test.tsx (6 tests) 278ms
330
- ✓  browser  test/components/templates/SearchPage/SearchWrapper.browser.test.tsx (3 tests) 23ms
331
+ ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 6ms
332
+ ✓  browser  test/components/account/Menu.browser.test.tsx (6 tests) 325ms
333
+ ✓  browser  test/sdk/account/useAvailableContracts.browser.test.ts (6 tests) 34ms
334
+ ✓  browser  test/components/templates/SearchPage/SearchWrapper.browser.test.tsx (3 tests) 40ms
331
335
  stderr | test/sdk/session/refreshTokenRoute.browser.test.ts
332
336
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
333
337
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -336,12 +340,12 @@ This ensures that you're testing the behavior the user would see in the browser.
336
340
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
337
341
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
338
342
 
339
- ✓  browser  test/sdk/session/refreshTokenRoute.browser.test.ts (3 tests) 7ms
340
- ✓  browser  test/sdk/recommendations/useRecommendationShelf.sessionFallback.browser.test.tsx (2 tests) 129ms
341
- ✓  browser  test/components/navigation/NavbarAccountArea.browser.test.tsx (4 tests) 38ms
342
- ✓  browser  test/components/sections/Account/AccountListQuotes.browser.test.tsx (4 tests) 95ms
343
- ✓  browser  test/components/CartRecommendationShelf/CartRecommendationProductCard.browser.test.tsx (3 tests) 42ms
344
- ✓  browser  test/sdk/account/changeContractToken.browser.test.ts (9 tests) 15ms
343
+ ✓  browser  test/sdk/session/refreshTokenRoute.browser.test.ts (3 tests) 6ms
344
+ ✓  browser  test/sdk/recommendations/useRecommendationShelf.sessionFallback.browser.test.tsx (2 tests) 134ms
345
+ ✓  browser  test/components/sections/Account/AccountListQuotes.browser.test.tsx (4 tests) 126ms
346
+ ✓  browser  test/components/navigation/NavbarAccountArea.browser.test.tsx (4 tests) 64ms
347
+ ✓  browser  test/components/CartRecommendationShelf/CartRecommendationProductCard.browser.test.tsx (3 tests) 75ms
348
+ ✓  browser  test/sdk/account/changeContractToken.browser.test.ts (9 tests) 14ms
345
349
  stderr | test/components/account/doLogout.browser.test.ts
346
350
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
347
351
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -350,11 +354,12 @@ This ensures that you're testing the behavior the user would see in the browser.
350
354
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
351
355
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
352
356
 
353
- ✓  browser  test/components/account/doLogout.browser.test.ts (1 test) 14ms
354
- ✓  browser  test/components/account/OrganizationDrawerHeader.browser.test.tsx (5 tests) 228ms
355
- ✓  browser  test/sdk/product/useProductNotFoundRedirect.browser.test.ts (7 tests) 32ms
356
- ✓  browser  test/sdk/account/useRefreshToken.browser.test.ts (4 tests) 123ms
357
- ✓  browser  test/components/ui/LocalizationButton.browser.test.tsx (3 tests) 35ms
357
+ ✓  browser  test/components/account/doLogout.browser.test.ts (1 test) 24ms
358
+ ✓  browser  test/components/account/OrganizationDrawerHeader.browser.test.tsx (5 tests) 359ms
359
+ ✓  browser  test/sdk/product/useProductNotFoundRedirect.browser.test.ts (7 tests) 29ms
360
+ ✓  browser  test/sdk/account/useRefreshToken.browser.test.ts (4 tests) 134ms
361
+ ✓  browser  test/components/ui/LocalizationButton.browser.test.tsx (3 tests) 44ms
362
+ ✓  browser  test/components/account/OrganizationSignInButton.browser.test.tsx (4 tests) 256ms
358
363
  stderr | test/sdk/account/clearPersistedSessionState.browser.test.ts
359
364
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
360
365
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -363,14 +368,13 @@ This ensures that you're testing the behavior the user would see in the browser.
363
368
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
364
369
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
365
370
 
366
- ✓  browser  test/sdk/account/clearPersistedSessionState.browser.test.ts (4 tests) 18ms
367
- ✓  browser  test/components/account/OrganizationSignInButton.browser.test.tsx (4 tests) 180ms
368
- ✓  browser  test/components/sections/Account/AccountOrderDelivery.browser.test.tsx (2 tests) 67ms
369
- ✓  browser  test/components/account/orders/DeliveryOptionAccordion.browser.test.tsx (2 tests) 66ms
370
- ✓  browser  test/components/sections/Account/AccountOrderStatus.browser.test.tsx (3 tests) 92ms
371
- ✓  browser  test/components/sections/Account/AccountListCards.browser.test.tsx (3 tests) 68ms
372
- ✓  browser  test/components/region/useRegion.browser.test.ts (1 test) 27ms
373
- ✓  browser  test/components/sections/Account/AccountOrdersList.browser.test.tsx (2 tests) 15ms
371
+ ✓  browser  test/sdk/account/clearPersistedSessionState.browser.test.ts (4 tests) 19ms
372
+ ✓  browser  test/components/sections/Account/AccountOrderDelivery.browser.test.tsx (2 tests) 101ms
373
+ ✓  browser  test/components/account/orders/DeliveryOptionAccordion.browser.test.tsx (2 tests) 94ms
374
+ ✓  browser  test/components/sections/Account/AccountOrderStatus.browser.test.tsx (3 tests) 104ms
375
+ ✓  browser  test/components/sections/Account/AccountListCards.browser.test.tsx (3 tests) 92ms
376
+ ✓  browser  test/components/region/useRegion.browser.test.ts (1 test) 24ms
377
+ ✓  browser  test/components/sections/Account/AccountOrdersList.browser.test.tsx (2 tests) 20ms
374
378
  stderr | test/sdk/session/sessionStore.browser.test.ts
375
379
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
376
380
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -379,10 +383,10 @@ This ensures that you're testing the behavior the user would see in the browser.
379
383
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
380
384
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
381
385
 
382
- ✓  browser  test/sdk/session/sessionStore.browser.test.ts (2 tests) 6ms
383
- ✓  browser  test/components/account/orders/SummaryCard.browser.test.tsx (2 tests) 62ms
384
- ✓  browser  test/components/account/orders/DeliveryOptionAccordionDeliveryInfo.browser.test.tsx (1 test) 30ms
385
- ✓  browser  test/utils/shouldBypassRefreshToken.browser.test.ts (5 tests) 5ms
386
+ ✓  browser  test/sdk/session/sessionStore.browser.test.ts (2 tests) 13ms
387
+ ✓  browser  test/components/account/orders/SummaryCard.browser.test.tsx (2 tests) 92ms
388
+ ✓  browser  test/components/account/orders/DeliveryOptionAccordionDeliveryInfo.browser.test.tsx (1 test) 56ms
389
+ ✓  browser  test/utils/shouldBypassRefreshToken.browser.test.ts (5 tests) 6ms
386
390
  stderr | test/sdk/account/refreshToken.browser.test.ts
387
391
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
388
392
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -391,31 +395,19 @@ This ensures that you're testing the behavior the user would see in the browser.
391
395
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
392
396
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
393
397
 
394
- ✓  browser  test/sdk/account/refreshToken.browser.test.ts (2 tests) 5ms
395
- ✓  browser  test/components/account/orders/StatusCard.browser.test.tsx (2 tests) 93ms
396
- ✓  browser  test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts (1 test) 2ms
397
- ✓  browser  test/components/account/orders/DeliveryCard.browser.test.tsx (1 test) 34ms
398
- ✓  browser  test/components/account/orders/DeliveryOptionAccordionProducts.browser.test.tsx (1 test) 33ms
399
- ✓  browser  test/components/skeletons/ProductGridSkeleton.browser.test.tsx (2 tests) 30ms
400
- ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 20ms
401
- ✓  node  test/pages/api/switch-contract.test.ts (61 tests) 147ms
402
- ✓  browser  test/components/account/orders/FilterFacetPendingApproval.browser.test.tsx (1 test) 141ms
403
- ✓  node  test/server/password-protection-service.test.ts (22 tests) 26ms
404
- ✓  node  test/server/content/service.test.ts (27 tests) 28ms
405
- ✓  node  test/sdk/localization/useBindingSelector.test.tsx (22 tests) 11ms
406
- stderr | test/sdk/deliveryPromise/provider.effect.test.tsx > DeliveryPromiseProvider pickup fetch > clears the loading flag after a failed request and retries on the next update
407
- Failed to fetch pickup points: Error: network
408
- at /home/runner/work/faststore/faststore/packages/core/test/sdk/deliveryPromise/provider.effect.test.tsx:250:30
409
- at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:145:11
410
- at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:915:26
411
- at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1243:20
412
- at new Promise (<anonymous>)
413
- at runWithTimeout (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1209:10)
414
- at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1653:37
415
- at Traces.$ (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/vitest@4.0.18_@opentelemetry+api@1.9.0_@types+node@20.19.13_jiti@2.6.1_jsdom@27.4.0_sas_13be941c57d55f08f06eeaf1c180ddfe/node_modules/vitest/dist/chunks/traces.CCmnQaNT.js:142:27)
416
- at trace (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/vitest@4.0.18_@opentelemetry+api@1.9.0_@types+node@20.19.13_jiti@2.6.1_jsdom@27.4.0_sas_13be941c57d55f08f06eeaf1c180ddfe/node_modules/vitest/dist/chunks/test.B8ej_ZHS.js:239:21)
417
- at runTest (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1653:12)
418
-
398
+ ✓  browser  test/sdk/account/refreshToken.browser.test.ts (2 tests) 6ms
399
+ ✓  browser  test/components/account/orders/StatusCard.browser.test.tsx (2 tests) 114ms
400
+ ✓  browser  test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts (1 test) 3ms
401
+ ✓  browser  test/components/account/orders/DeliveryCard.browser.test.tsx (1 test) 53ms
402
+ ✓  browser  test/components/account/orders/DeliveryOptionAccordionProducts.browser.test.tsx (1 test) 50ms
403
+ ✓  browser  test/components/skeletons/ProductGridSkeleton.browser.test.tsx (2 tests) 35ms
404
+ ✓  node  test/pages/api/switch-contract.test.ts (61 tests) 184ms
405
+ ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 28ms
406
+ ✓  browser  test/components/account/orders/FilterFacetPendingApproval.browser.test.tsx (1 test) 213ms
407
+ ✓  node  test/server/content/service.test.ts (32 tests) 50ms
408
+ ✓  node  test/server/password-protection-service.test.ts (22 tests) 35ms
409
+ ✓  node  test/sdk/localization/useBindingSelector.test.tsx (22 tests) 13ms
410
+ ✓  node  test/utils/match-url.test.ts (10 tests) 7ms
419
411
  stderr | test/pages/api/graphql.test.ts > /api/graphql error status propagation > propagates the upstream 400 from a wrapped BadRequestError instead of 500
420
412
  Graphql execution returned with error: [
421
413
  {
@@ -462,19 +454,6 @@ This ensures that you're testing the behavior the user would see in the browser.
462
454
  { message: 'bad', status: 400, type: 'BadRequestError' }
463
455
  ]
464
456
 
465
- stderr | test/sdk/deliveryPromise/provider.effect.test.tsx > DeliveryPromiseProvider pickup fetch > clears the simulated list when the next postal code fails
466
- Failed to fetch pickup points: Error: network
467
- at /home/runner/work/faststore/faststore/packages/core/test/sdk/deliveryPromise/provider.effect.test.tsx:332:30
468
- at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:145:11
469
- at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:915:26
470
- at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1243:20
471
- at new Promise (<anonymous>)
472
- at runWithTimeout (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1209:10)
473
- at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1653:37
474
- at Traces.$ (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/vitest@4.0.18_@opentelemetry+api@1.9.0_@types+node@20.19.13_jiti@2.6.1_jsdom@27.4.0_sas_13be941c57d55f08f06eeaf1c180ddfe/node_modules/vitest/dist/chunks/traces.CCmnQaNT.js:142:27)
475
- at trace (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/vitest@4.0.18_@opentelemetry+api@1.9.0_@types+node@20.19.13_jiti@2.6.1_jsdom@27.4.0_sas_13be941c57d55f08f06eeaf1c180ddfe/node_modules/vitest/dist/chunks/test.B8ej_ZHS.js:239:21)
476
- at runTest (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1653:12)
477
-
478
457
  stderr | test/pages/api/graphql.test.ts > /api/graphql error status propagation > sets cache-control: no-store on error responses so a bare 404/410 is not cached by intermediaries
479
458
  Graphql execution returned with error: [ { message: 'missing', status: 404, type: 'NotFoundError' } ]
480
459
 
@@ -538,7 +517,6 @@ This ensures that you're testing the behavior the user would see in the browser.
538
517
  at trace (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/vitest@4.0.18_@opentelemetry+api@1.9.0_@types+node@20.19.13_jiti@2.6.1_jsdom@27.4.0_sas_13be941c57d55f08f06eeaf1c180ddfe/node_modules/vitest/dist/chunks/test.B8ej_ZHS.js:239:21)
539
518
  at runTest (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1653:12)
540
519
 
541
- ✓  node  test/utils/match-url.test.ts (10 tests) 6ms
542
520
  stderr | test/pages/api/graphql.test.ts > /api/graphql ValidateSession refresh-token bypass > forces a 401 on the production host brandless.vtex.app
543
521
  Something unexpected occurred querying Graphql endpoint:
544
522
  le [FastStoreError]: Unauthorized: Token expired. Please login again or refresh the page.
@@ -571,11 +549,36 @@ This ensures that you're testing the behavior the user would see in the browser.
571
549
  extensions: { status: 401, type: 'UnauthorizedError' }
572
550
  }
573
551
 
574
- ✓  node  test/sdk/deliveryPromise/provider.effect.test.tsx (9 tests) 62ms
575
- ✓  node  test/pages/api/graphql.test.ts (30 tests) 27ms
576
- ✓  node  test/pages/api/unlock.test.ts (15 tests) 104ms
577
- ✓  node  test/sdk/session/syncSalesChannelFromOrderForm.test.ts (14 tests) 9ms
578
- ✓  node  test/sdk/localization/bindingSelector.test.ts (18 tests) 5ms
552
+ ✓  node  test/pages/api/graphql.test.ts (30 tests) 44ms
553
+ stderr | test/sdk/deliveryPromise/provider.effect.test.tsx > DeliveryPromiseProvider pickup fetch > clears the loading flag after a failed request and retries on the next update
554
+ Failed to fetch pickup points: Error: network
555
+ at /home/runner/work/faststore/faststore/packages/core/test/sdk/deliveryPromise/provider.effect.test.tsx:250:30
556
+ at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:145:11
557
+ at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:915:26
558
+ at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1243:20
559
+ at new Promise (<anonymous>)
560
+ at runWithTimeout (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1209:10)
561
+ at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1653:37
562
+ at Traces.$ (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/vitest@4.0.18_@opentelemetry+api@1.9.0_@types+node@20.19.13_jiti@2.6.1_jsdom@27.4.0_sas_13be941c57d55f08f06eeaf1c180ddfe/node_modules/vitest/dist/chunks/traces.CCmnQaNT.js:142:27)
563
+ at trace (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/vitest@4.0.18_@opentelemetry+api@1.9.0_@types+node@20.19.13_jiti@2.6.1_jsdom@27.4.0_sas_13be941c57d55f08f06eeaf1c180ddfe/node_modules/vitest/dist/chunks/test.B8ej_ZHS.js:239:21)
564
+ at runTest (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1653:12)
565
+
566
+ stderr | test/sdk/deliveryPromise/provider.effect.test.tsx > DeliveryPromiseProvider pickup fetch > clears the simulated list when the next postal code fails
567
+ Failed to fetch pickup points: Error: network
568
+ at /home/runner/work/faststore/faststore/packages/core/test/sdk/deliveryPromise/provider.effect.test.tsx:332:30
569
+ at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:145:11
570
+ at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:915:26
571
+ at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1243:20
572
+ at new Promise (<anonymous>)
573
+ at runWithTimeout (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1209:10)
574
+ at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1653:37
575
+ at Traces.$ (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/vitest@4.0.18_@opentelemetry+api@1.9.0_@types+node@20.19.13_jiti@2.6.1_jsdom@27.4.0_sas_13be941c57d55f08f06eeaf1c180ddfe/node_modules/vitest/dist/chunks/traces.CCmnQaNT.js:142:27)
576
+ at trace (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/vitest@4.0.18_@opentelemetry+api@1.9.0_@types+node@20.19.13_jiti@2.6.1_jsdom@27.4.0_sas_13be941c57d55f08f06eeaf1c180ddfe/node_modules/vitest/dist/chunks/test.B8ej_ZHS.js:239:21)
577
+ at runTest (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1653:12)
578
+
579
+ ✓  node  test/sdk/deliveryPromise/provider.effect.test.tsx (9 tests) 85ms
580
+ ✓  node  test/pages/api/unlock.test.ts (15 tests) 156ms
581
+ ✓  node  test/sdk/session/syncSalesChannelFromOrderForm.test.ts (14 tests) 15ms
579
582
  stderr | test/components/search/SearchInputComponent.test.tsx
580
583
  Warning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter?
581
584
 
@@ -639,63 +642,63 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
639
642
  at Suspense
640
643
  at Wrapper (/home/runner/work/faststore/faststore/packages/core/test/components/search/SearchInputComponent.test.tsx:106:20)
641
644
 
642
- ✓  node  test/components/search/SearchInputComponent.test.tsx (6 tests) 57ms
643
- ✓  node  test/sdk/account/refreshToken.test.ts (21 tests) 10ms
644
- ✓  node  test/components/quotes/MyAccountListQuotesTable.test.tsx (15 tests) 307ms
645
- ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 29ms
645
+ ✓  node  test/components/search/SearchInputComponent.test.tsx (6 tests) 81ms
646
+ ✓  node  test/sdk/localization/bindingSelector.test.ts (18 tests) 8ms
647
+ ✓  node  test/sdk/account/refreshToken.test.ts (21 tests) 15ms
648
+ ✓  node  test/components/quotes/MyAccountListQuotesTable.test.tsx (15 tests) 435ms
646
649
  stderr | test/pages/pvt/account/cards/index.test.ts > Cards page getServerSideProps > redirects to /pvt/account/403 when the query fails with 401/403
647
650
  { extensions: { status: 401 } }
648
651
 
649
652
  stderr | test/pages/pvt/account/cards/index.test.ts > Cards page getServerSideProps > renders the error state (no redirect) when the query fails with a non-auth status
650
653
  { extensions: { status: 502 } }
651
654
 
652
- ✓  node  test/pages/pvt/account/cards/index.test.ts (8 tests) 6ms
653
- ✓  node  test/components/quotes/quoteFilters.test.ts (26 tests) 18ms
654
- ✓  node  test/utils/productJsonLd.test.ts (36 tests) 7ms
655
- ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 8ms
656
- ✓  node  test/components/quotes/MyAccountListQuotes.test.tsx (11 tests) 803ms
657
- ✓ navigates with the search term on blur  357ms
655
+ ✓  node  test/pages/pvt/account/cards/index.test.ts (8 tests) 9ms
656
+ ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 44ms
657
+ ✓  node  test/components/quotes/MyAccountListQuotes.test.tsx (11 tests) 830ms
658
+ ✓ navigates with the search term on blur  361ms
658
659
  ✓ navigates without a label param when the search is cleared  357ms
659
- ✓  node  test/experimental/myAccountCmsServerSideProps.test.ts (5 tests) 8ms
660
- ✓  node  test/utils/clearCookies.test.ts (20 tests) 18ms
661
- ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 5ms
660
+ ✓  node  test/components/quotes/quoteFilters.test.ts (26 tests) 53ms
661
+ ✓  node  test/utils/productJsonLd.test.ts (36 tests) 14ms
662
+ ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 16ms
663
+ ✓  node  test/experimental/myAccountCmsServerSideProps.test.ts (5 tests) 10ms
664
+ ✓  node  test/utils/clearCookies.test.ts (20 tests) 20ms
665
+ ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 7ms
662
666
  stderr | test/sdk/account/useSetPassword.test.ts > useSetPassword > maps wrongcredentials error responses to the existing message
663
667
  Set password request failed: Bad Request
664
668
 
665
- ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 29ms
666
- ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 29ms
669
+ ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 48ms
670
+ ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 39ms
667
671
  ✓  node  test/utils/localization/localizeRedirectDestination.test.ts (11 tests) 5ms
668
- ✓  node  test/components/quotes/MyAccountQuotesFilterSlider.test.tsx (8 tests) 93ms
669
- ✓  node  test/components/quotes/MyAccountQuotesStatusSelector.test.tsx (14 tests) 103ms
670
- ✓  node  test/utils/localization/hreflang.test.ts (8 tests) 9ms
671
- ✓  node  test/server/cms/index.test.ts (7 tests) 15ms
672
- ✓  node  test/sdk/account/getMyAccountRoutes.test.ts (13 tests) 7ms
673
- ✓  node  test/server/content/promiseCache.test.ts (10 tests) 9ms
674
- ✓  node  test/components/quotes/MyAccountQuotesSelectedTags.test.tsx (10 tests) 84ms
675
- ✓  node  test/sdk/redirects/index.test.ts (7 tests) 45ms
676
- ✓  node  test/sdk/orderEntry/useOrderEntryUpload.test.ts (8 tests) 31ms
677
- ✓  node  test/proxy.localization.test.ts (5 tests) 35ms
678
- ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 34ms
679
- ✓  node  test/utils/trustedForwardedHost.test.ts (36 tests) 7ms
680
- ✓  node  test/components/account/orders/getDeliveryOptionLabel.test.ts (21 tests) 6ms
681
- ✓  node  test/sdk/graphql/retryPolicy.test.ts (18 tests) 19ms
672
+ ✓  node  test/components/quotes/MyAccountQuotesFilterSlider.test.tsx (8 tests) 187ms
673
+ ✓  node  test/components/quotes/MyAccountQuotesStatusSelector.test.tsx (14 tests) 176ms
674
+ ✓  node  test/utils/localization/hreflang.test.ts (8 tests) 7ms
675
+ ✓  node  test/sdk/account/getMyAccountRoutes.test.ts (13 tests) 12ms
676
+ ✓  node  test/server/cms/index.test.ts (7 tests) 14ms
677
+ ✓  node  test/components/quotes/MyAccountQuotesSelectedTags.test.tsx (10 tests) 133ms
678
+ ✓  node  test/server/content/promiseCache.test.ts (10 tests) 17ms
679
+ ✓  node  test/sdk/redirects/index.test.ts (7 tests) 53ms
680
+ ✓  node  test/sdk/orderEntry/useOrderEntryUpload.test.ts (8 tests) 55ms
681
+ ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 49ms
682
+ ✓  node  test/proxy.localization.test.ts (5 tests) 58ms
683
+ ✓  node  test/utils/trustedForwardedHost.test.ts (36 tests) 12ms
684
+ ✓  node  test/components/account/orders/getDeliveryOptionLabel.test.ts (21 tests) 9ms
685
+ ✓  node  test/sdk/graphql/retryPolicy.test.ts (18 tests) 21ms
682
686
  ✓  node  test/server/cms/myAccountDefaultSections.test.ts (9 tests) 5ms
683
- ✓  node  test/utils/productJsonLdRendering.test.tsx (5 tests) 8ms
684
- ✓  node  test/server/index.test.ts (7 tests) 839ms
685
- ✓ should handle options and execute  472ms
686
- ✓  node  test/proxy.test.ts (4 tests) 21ms
687
- ✓  node  test/sdk/analytics/useStartRecommendationSession.test.ts (6 tests) 41ms
688
- ✓  node  test/pages/api/logout.test.ts (4 tests) 20ms
689
- ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 29ms
687
+ ✓  node  test/server/index.test.ts (7 tests) 722ms
688
+ ✓  node  test/utils/productJsonLdRendering.test.tsx (5 tests) 15ms
689
+ ✓  node  test/proxy.test.ts (4 tests) 22ms
690
+ ✓  node  test/pages/api/logout.test.ts (4 tests) 32ms
690
691
  ✓  node  test/utils/shouldBypassRefreshToken.test.ts (14 tests) 6ms
691
- ✓  node  test/server/webops-api.test.ts (9 tests) 12ms
692
- ✓  node  test/components/account/orders/StatusCard.test.ts (3 tests) 21ms
693
- ✓  node  test/sdk/deliveryPromise/queries.test.ts (4 tests) 7ms
694
- ✓  node  test/sdk/localization/store-url.test.ts (4 tests) 3ms
695
- ✓  node  test/sdk/cart/waitForSessionValidated.test.ts (5 tests) 9ms
696
- ✓  node  test/server/cms/global.test.ts (3 tests) 4ms
697
- ✓  node  test/sdk/deliveryPromise/provider.test.ts (11 tests) 5ms
698
- ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 21ms
692
+ ✓  node  test/sdk/analytics/useStartRecommendationSession.test.ts (6 tests) 48ms
693
+ ✓  node  test/server/webops-api.test.ts (9 tests) 26ms
694
+ ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 44ms
695
+ ✓  node  test/components/account/orders/StatusCard.test.ts (3 tests) 32ms
696
+ ✓  node  test/sdk/deliveryPromise/queries.test.ts (4 tests) 10ms
697
+ ✓  node  test/sdk/localization/store-url.test.ts (4 tests) 5ms
698
+ ✓  node  test/sdk/cart/waitForSessionValidated.test.ts (5 tests) 13ms
699
+ ✓  node  test/server/cms/global.test.ts (3 tests) 7ms
700
+ ✓  node  test/sdk/deliveryPromise/provider.test.ts (11 tests) 8ms
701
+ ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 41ms
699
702
  stderr | test/server/storeDirectives.test.ts > store directives through the core server > applies @auth from a store field and validates the session once
700
703
  https://storeframework.vtexcommercestable.com.br/api/vtexid/credential/validate {
701
704
  headers: { 'content-type': 'application/json', 'X-FORWARDED-HOST': '' },
@@ -703,43 +706,43 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
703
706
  method: 'POST'
704
707
  } { status: 401, statusText: 'Unauthorized', headers: {} }
705
708
 
706
- ✓  node  test/server/storeDirectives.test.ts (2 tests) 95ms
707
- ✓  node  test/utils/mergeDiscoveryConfig.test.ts (8 tests) 8ms
708
- ✓  node  test/server/rootSpan.test.ts (4 tests) 24ms
709
+ ✓  node  test/server/storeDirectives.test.ts (2 tests) 69ms
710
+ ✓  node  test/utils/mergeDiscoveryConfig.test.ts (8 tests) 11ms
711
+ ✓  node  test/server/rootSpan.test.ts (4 tests) 40ms
709
712
  ✓  node  test/utils/getRequestHostname.test.ts (12 tests) 6ms
710
- ✓  node  test/pages/api/preview.test.ts (2 tests) 5ms
711
- ✓  node  test/components/search/SearchInput.test.ts (6 tests) 6ms
712
- ✓  node  test/components/account/Layout.test.tsx (6 tests) 52ms
713
- ✓  node  test/utils/validateSessionRefreshToken.test.ts (6 tests) 3ms
714
- ✓  node  test/pages/pvt/account/403.test.ts (5 tests) 4ms
715
- ✓  node  test/sdk/recommendations/vrn.test.ts (5 tests) 4ms
716
- ✓  node  test/components/region/useRegion.test.ts (1 test) 15ms
717
- ✓  node  test/sdk/account/getIsB2BBuyer.test.ts (7 tests) 4ms
718
- ✓  node  test/utils/retry.test.ts (5 tests) 11ms
719
- ✓  node  test/sdk/account/getB2BSessionClaims.test.ts (4 tests) 3ms
720
- ✓  node  test/sdk/recommendations/useRecommendationUserId.test.ts (4 tests) 182ms
721
- ✓  node  test/utils/subDomainPrefixWarning.test.ts (6 tests) 4ms
722
- ✓  node  test/utils/userOrderStatus.test.ts (4 tests) 4ms
723
- ✓  node  test/utils/unlockResponse.test.ts (11 tests) 4ms
724
- ✓  node  test/sdk/recommendations/useRecommendations.test.ts (2 tests) 3ms
725
- ✓  node  test/components/account/OrganizationDrawerBody.test.tsx (3 tests) 40ms
726
- ✓  node  test/sdk/deliveryPromise/reducer.test.ts (2 tests) 4ms
727
- ✓  node  test/components/quotes/MyAccountQuoteStatusBadge.test.tsx (4 tests) 26ms
713
+ ✓  node  test/pages/api/preview.test.ts (2 tests) 10ms
714
+ ✓  node  test/components/search/SearchInput.test.ts (6 tests) 10ms
715
+ ✓  node  test/utils/validateSessionRefreshToken.test.ts (6 tests) 7ms
716
+ ✓  node  test/components/account/Layout.test.tsx (6 tests) 59ms
717
+ ✓  node  test/pages/pvt/account/403.test.ts (5 tests) 8ms
718
+ ✓  node  test/components/region/useRegion.test.ts (1 test) 25ms
719
+ ✓  node  test/sdk/recommendations/vrn.test.ts (5 tests) 6ms
720
+ ✓  node  test/utils/retry.test.ts (5 tests) 16ms
721
+ ✓  node  test/sdk/account/getIsB2BBuyer.test.ts (7 tests) 5ms
722
+ ✓  node  test/sdk/account/getB2BSessionClaims.test.ts (4 tests) 4ms
723
+ ✓  node  test/sdk/recommendations/useRecommendationUserId.test.ts (4 tests) 197ms
724
+ ✓  node  test/utils/subDomainPrefixWarning.test.ts (6 tests) 5ms
725
+ ✓  node  test/utils/userOrderStatus.test.ts (4 tests) 5ms
726
+ ✓  node  test/utils/unlockResponse.test.ts (11 tests) 7ms
727
+ ✓  node  test/sdk/recommendations/useRecommendations.test.ts (2 tests) 6ms
728
+ ✓  node  test/components/account/OrganizationDrawerBody.test.tsx (3 tests) 51ms
729
+ ✓  node  test/sdk/deliveryPromise/reducer.test.ts (2 tests) 6ms
728
730
  ✓  node  test/utils/isLocalHost.test.ts (7 tests) 4ms
729
- ✓  node  test/sdk/session/toSessionInput.test.ts (3 tests) 3ms
730
- ✓  node  test/components/account/orders/getOrderTotalLabel.test.ts (6 tests) 2ms
731
- ✓  node  test/components/account/orders/listOrdersLabels.test.ts (2 tests) 3ms
731
+ ✓  node  test/components/quotes/MyAccountQuoteStatusBadge.test.tsx (4 tests) 51ms
732
+ ✓  node  test/sdk/session/toSessionInput.test.ts (3 tests) 4ms
733
+ ✓  node  test/components/account/orders/getOrderTotalLabel.test.ts (6 tests) 5ms
734
+ ✓  node  test/components/account/orders/listOrdersLabels.test.ts (2 tests) 4ms
735
+ ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 39ms
732
736
  ✓  node  test/utils/getCookie.test.ts (4 tests) 4ms
733
- ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 22ms
734
- ✓  node  test/sdk/session/isSignInAreaResolved.test.ts (3 tests) 3ms
737
+ ✓  node  test/sdk/session/isSignInAreaResolved.test.ts (3 tests) 4ms
735
738
  ✓  node  test/utils/filterChannel.test.ts (2 tests) 3ms
736
- ✓  node  test/sdk/analytics/utils.test.ts (2 tests) 3ms
737
- ✓  node  test/instrumentation.test.ts (3 tests) 5ms
738
- ✓  node  test/components/account/orders/orderDetailsLabels.test.ts (1 test) 3ms
739
- ✓  node  test/sdk/account/clearPersistedSessionState.test.ts (1 test) 7ms
739
+ ✓  node  test/sdk/analytics/utils.test.ts (2 tests) 5ms
740
+ ✓  node  test/instrumentation.test.ts (3 tests) 4ms
741
+ ✓  node  test/components/account/orders/orderDetailsLabels.test.ts (1 test) 4ms
742
+ ✓  node  test/sdk/account/clearPersistedSessionState.test.ts (1 test) 9ms
740
743
 
741
744
   Test Files  149 passed (149)
742
-  Tests  1265 passed (1265)
743
-  Start at  15:46:31
744
-  Duration  53.00s (transform 12.00s, setup 0ms, import 47.46s, tests 18.78s, environment 64.60s)
745
+  Tests  1270 passed (1270)
746
+  Start at  19:54:22
747
+  Duration  68.33s (transform 15.29s, setup 0ms, import 59.77s, tests 21.45s, environment 86.98s)
745
748
 
package/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.11.3](https://github.com/vtex/faststore/compare/v4.11.3-dev.1...v4.11.3) (2026-11-10)
7
+
8
+ **Note:** Version bump only for package @faststore/core
9
+
10
+ ## [4.11.3-dev.1](https://github.com/vtex/faststore/compare/v4.11.3-dev.0...v4.11.3-dev.1) (2026-11-10)
11
+
12
+ ### Bug Fixes
13
+
14
+ - **core:** fetch Content Platform list content inline and skip PDP slug lookup ([#3551](https://github.com/vtex/faststore/issues/3551)) ([75ce26d](https://github.com/vtex/faststore/commit/75ce26dfda99447db1672b54c89cc67e87c87121)), closes [#3550](https://github.com/vtex/faststore/issues/3550) [#3550](https://github.com/vtex/faststore/issues/3550)
15
+
6
16
  ## [4.11.3-dev.0](https://github.com/vtex/faststore/compare/v4.11.2...v4.11.3-dev.0) (2026-11-09)
7
17
 
8
18
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "4.11.3-dev.0",
3
+ "version": "4.11.3",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -70,11 +70,11 @@
70
70
  "style-loader": "^3.3.1",
71
71
  "swr": "^2.2.5",
72
72
  "use-sync-external-store": "^1.6.0",
73
- "@faststore/api": "4.11.3-dev.0",
74
- "@faststore/lighthouse": "4.11.3-dev.0",
75
- "@faststore/sdk": "4.11.3-dev.0",
76
- "@faststore/ui": "4.11.3-dev.0",
77
- "@faststore/diagnostics": "4.11.3-dev.0"
73
+ "@faststore/api": "4.11.3",
74
+ "@faststore/diagnostics": "4.11.3",
75
+ "@faststore/lighthouse": "4.11.3",
76
+ "@faststore/sdk": "4.11.3",
77
+ "@faststore/ui": "4.11.3"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@cypress/code-coverage": "^3.12.1",
@@ -98,9 +98,15 @@ export class ContentService {
98
98
  const options = this.createContentOptions(pdpParams)
99
99
 
100
100
  if (isContentPlatformSource()) {
101
- const directMatch = await this.getSingleContent<PDPContentType>(pdpParams)
102
- if (directMatch) {
103
- return directMatch
101
+ // PDP entries are templates picked by findBestPDPTemplate, never by the
102
+ // product slug, so a slug lookup always misses. Only previews and an
103
+ // explicit documentId need the direct fetch.
104
+ if (options.isPreview || pdpParams.documentId) {
105
+ const directMatch =
106
+ await this.getSingleContent<PDPContentType>(pdpParams)
107
+ if (directMatch) {
108
+ return directMatch
109
+ }
104
110
  }
105
111
 
106
112
  const pages = (await this.getMultipleContent(pdpParams)).data
@@ -141,14 +147,46 @@ export class ContentService {
141
147
  serviceParams: EntryPathParams,
142
148
  isPreview: boolean
143
149
  ): Promise<{ data: PageContentType[] }> {
144
- // TODO: This should be temporary until the cp data-plane have a search engine.
150
+ // Previews read from the control plane, which cannot return the content
151
+ // inline, so they still fetch each entry.
152
+ if (isPreview) {
153
+ const entries = await this.listAllPages(
154
+ (scroll) => this.clientCP.listEntries(serviceParams, scroll),
155
+ serviceParams
156
+ )
157
+ return this.fillEntriesWithData(entries, serviceParams, isPreview)
158
+ }
159
+
160
+ const entries = await this.listAllPages(
161
+ (scroll) => this.clientCP.listEntriesWithContent(serviceParams, scroll),
162
+ serviceParams
163
+ )
164
+ return {
165
+ // client-cp's listEntriesWithContent always sets `content`: a row the
166
+ // data plane returns without inline content is fetched by the client
167
+ // itself. The `PageContentType | EntryData` union is narrowed here since
168
+ // parsing is enabled (disableParse is not set).
169
+ data: entries.map(({ content, ...entry }) =>
170
+ this.mergeEntryWithData(entry, content as PageContentType)
171
+ ),
172
+ }
173
+ }
174
+
175
+ private async listAllPages<T>(
176
+ fetchPage: (
177
+ scroll?: string
178
+ ) => Promise<{ entries: T[]; scroll?: string | null }>,
179
+ serviceParams: EntryPathParams
180
+ ): Promise<T[]> {
181
+ // The data plane has no search engine yet, so every entry is listed and
182
+ // the template is matched here.
145
183
  const MAX_PAGES = 25
146
- const allEntries: ContentEntry[] = []
184
+ const allEntries: T[] = []
147
185
  let scroll: string | undefined
148
186
  let pages = 0
149
187
 
150
188
  do {
151
- const result = await this.clientCP.listEntries(serviceParams, scroll)
189
+ const result = await fetchPage(scroll)
152
190
  allEntries.push(...result.entries)
153
191
  const next = result.scroll ?? undefined
154
192
  if (next && next === scroll) break
@@ -156,10 +194,11 @@ export class ContentService {
156
194
  } while (scroll && ++pages < MAX_PAGES)
157
195
 
158
196
  if (pages >= MAX_PAGES) {
159
- console.warn('listEntries pagination hit MAX_PAGES cap', serviceParams)
197
+ // `listEntries` and `listEntriesWithContent` both paginate here.
198
+ console.warn('list pagination hit MAX_PAGES cap', serviceParams)
160
199
  }
161
200
 
162
- return this.fillEntriesWithData(allEntries, serviceParams, isPreview)
201
+ return allEntries
163
202
  }
164
203
 
165
204
  private async fillEntriesWithData(
@@ -60,6 +60,10 @@ const entryData: Record<string, Record<string, unknown>> = {
60
60
  settings: { template: { value: '/outra' } },
61
61
  sections: [{ name: 'Other' }],
62
62
  },
63
+ camisetas: {
64
+ settings: { template: { value: '/camisetas/' } },
65
+ sections: [{ name: 'Camisetas PDP' }],
66
+ },
63
67
  }
64
68
 
65
69
  const toEntry = (id: string): ContentEntry => ({
@@ -74,15 +78,49 @@ const toEntry = (id: string): ContentEntry => ({
74
78
  slug: id,
75
79
  })
76
80
 
81
+ const toEntryWithContent = (id: string) => ({
82
+ ...toEntry(id),
83
+ content: { ...entryData[id] },
84
+ })
85
+
86
+ const toPage = (pages: string[][], scroll?: string) => {
87
+ const index = scroll ? Number(scroll) : 0
88
+ return {
89
+ ids: pages[index],
90
+ scroll: index + 1 < pages.length ? String(index + 1) : null,
91
+ }
92
+ }
93
+
94
+ // The single widening cast below is intentional: the object literal is still
95
+ // structurally checked against the product type, so a typo in a fixture key
96
+ // fails the typecheck instead of being accepted silently (unlike
97
+ // `as unknown as ...`).
98
+ const toProduct = (...breadcrumb: string[]) =>
99
+ ({
100
+ breadcrumbList: {
101
+ itemListElement: breadcrumb.map((item, index) => ({
102
+ item,
103
+ name: item,
104
+ position: index + 1,
105
+ })),
106
+ },
107
+ }) as Parameters<ContentService['getPdpContent']>[0]
108
+
77
109
  function createFakeClientCP(pages: string[][]) {
78
110
  return {
79
111
  listEntries: vi.fn(async (_params: EntryPathParams, scroll?: string) => {
80
- const index = scroll ? Number(scroll) : 0
81
- return {
82
- entries: pages[index].map(toEntry),
83
- scroll: index + 1 < pages.length ? String(index + 1) : null,
84
- }
112
+ const page = toPage(pages, scroll)
113
+ return { entries: page.ids.map(toEntry), scroll: page.scroll }
85
114
  }),
115
+ listEntriesWithContent: vi.fn(
116
+ async (_params: EntryPathParams, scroll?: string) => {
117
+ const page = toPage(pages, scroll)
118
+ return {
119
+ entries: page.ids.map(toEntryWithContent),
120
+ scroll: page.scroll,
121
+ }
122
+ }
123
+ ),
86
124
  getEntry: vi.fn(async ({ entryId }: EntryPathParams) => ({
87
125
  ...entryData[entryId as string],
88
126
  createdBy: 'payload@example.com',
@@ -235,7 +273,7 @@ describe('ContentService', () => {
235
273
  expect(listedPage).not.toHaveProperty('storeId')
236
274
  })
237
275
 
238
- it('shares one list and entry fetch across concurrent PLPs with different slugs', async () => {
276
+ it('shares one listEntriesWithContent fetch across concurrent PLPs with different slugs', async () => {
239
277
  const { service, clientCP } = createServiceWithClient()
240
278
 
241
279
  const [collectionPage, otherPage, unknownPage] = await Promise.all([
@@ -244,8 +282,9 @@ describe('ContentService', () => {
244
282
  service.getPlpContent({ slug: 'nao-existe' }, []),
245
283
  ])
246
284
 
247
- expect(clientCP.listEntries).toHaveBeenCalledTimes(1)
248
- expect(clientCP.getEntry).toHaveBeenCalledTimes(3)
285
+ expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(1)
286
+ expect(clientCP.listEntries).not.toHaveBeenCalled()
287
+ expect(clientCP.getEntry).not.toHaveBeenCalled()
249
288
  expect(collectionPage.sections).toEqual([{ name: 'Collection' }])
250
289
  expect(otherPage.sections).toEqual([{ name: 'Other' }])
251
290
  expect(unknownPage.sections).toEqual([{ name: 'Generic' }])
@@ -257,8 +296,8 @@ describe('ContentService', () => {
257
296
  await service.getPlpContent({ slug: 'colecao' }, [])
258
297
  await service.getPlpContent({ slug: 'outra' }, [])
259
298
 
260
- expect(clientCP.listEntries).toHaveBeenCalledTimes(1)
261
- expect(clientCP.getEntry).toHaveBeenCalledTimes(3)
299
+ expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(1)
300
+ expect(clientCP.getEntry).not.toHaveBeenCalled()
262
301
  })
263
302
 
264
303
  it('still prefers a direct slug match over the cached list', async () => {
@@ -271,7 +310,7 @@ describe('ContentService', () => {
271
310
  const page = await service.getPlpContent({ slug: 'colecao' }, [])
272
311
 
273
312
  expect(page.sections).toEqual([{ name: 'Direct' }])
274
- expect(clientCP.listEntries).toHaveBeenCalledTimes(1)
313
+ expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(1)
275
314
  })
276
315
 
277
316
  it('consumes every scroll page once', async () => {
@@ -287,9 +326,9 @@ describe('ContentService', () => {
287
326
  ])
288
327
  const { data } = await service.getMultipleContent({ contentType: 'plp' })
289
328
 
290
- expect(clientCP.listEntries).toHaveBeenCalledTimes(3)
329
+ expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(3)
291
330
  expect(
292
- clientCP.listEntries.mock.calls.map(([, scroll]) => scroll)
331
+ clientCP.listEntriesWithContent.mock.calls.map(([, scroll]) => scroll)
293
332
  ).toEqual([undefined, '1', '2'])
294
333
  expect(data.map((entry) => entry.id)).toEqual([
295
334
  'generic',
@@ -305,9 +344,11 @@ describe('ContentService', () => {
305
344
  await service.getMultipleContent({ contentType: 'pdp' })
306
345
  await service.getMultipleContent({ contentType: 'pdp' })
307
346
 
308
- expect(clientCP.listEntries).toHaveBeenCalledTimes(2)
347
+ expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(2)
309
348
  expect(
310
- clientCP.listEntries.mock.calls.map(([params]) => params.contentType)
349
+ clientCP.listEntriesWithContent.mock.calls.map(
350
+ ([params]) => params.contentType
351
+ )
311
352
  ).toEqual(['plp', 'pdp'])
312
353
  })
313
354
 
@@ -318,9 +359,11 @@ describe('ContentService', () => {
318
359
  await service.getMultipleContent({ contentType: 'plp', locale: 'en-US' })
319
360
  await service.getMultipleContent({ contentType: 'plp', locale: 'pt-BR' })
320
361
 
321
- expect(clientCP.listEntries).toHaveBeenCalledTimes(2)
362
+ expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(2)
322
363
  expect(
323
- clientCP.listEntries.mock.calls.map(([params]) => params.locale)
364
+ clientCP.listEntriesWithContent.mock.calls.map(
365
+ ([params]) => params.locale
366
+ )
324
367
  ).toEqual(['pt-BR', 'en-US'])
325
368
  })
326
369
 
@@ -340,22 +383,23 @@ describe('ContentService', () => {
340
383
  await service.getMultipleContent(previewParams)
341
384
  await service.getMultipleContent({ contentType: 'plp' })
342
385
 
343
- expect(clientCP.listEntries).toHaveBeenCalledTimes(3)
344
- expect(clientCP.getEntry).toHaveBeenCalledTimes(3)
386
+ expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(1)
387
+ expect(clientCP.listEntries).toHaveBeenCalledTimes(2)
388
+ expect(clientCP.getEntry).not.toHaveBeenCalled()
345
389
  expect(clientCP.previewEntryById).toHaveBeenCalledTimes(6)
346
390
  })
347
391
 
348
392
  it('does not cache failures', async () => {
349
393
  const { service, clientCP } = createServiceWithClient()
350
394
  const error = new Error('Request failed with status code 500')
351
- clientCP.listEntries.mockRejectedValueOnce(error)
395
+ clientCP.listEntriesWithContent.mockRejectedValueOnce(error)
352
396
 
353
397
  await expect(
354
398
  service.getMultipleContent({ contentType: 'plp' })
355
399
  ).rejects.toBe(error)
356
400
  const { data } = await service.getMultipleContent({ contentType: 'plp' })
357
401
 
358
- expect(clientCP.listEntries).toHaveBeenCalledTimes(2)
402
+ expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(2)
359
403
  expect(data).toHaveLength(3)
360
404
  })
361
405
 
@@ -363,7 +407,7 @@ describe('ContentService', () => {
363
407
  vi.useFakeTimers()
364
408
  const { service, clientCP } = createServiceWithClient()
365
409
  let rejectFirst: (err: Error) => void = () => {}
366
- clientCP.listEntries.mockImplementationOnce(
410
+ clientCP.listEntriesWithContent.mockImplementationOnce(
367
411
  () =>
368
412
  new Promise((_, reject) => {
369
413
  rejectFirst = reject
@@ -379,7 +423,7 @@ describe('ContentService', () => {
379
423
  await firstResult
380
424
  await service.getMultipleContent({ contentType: 'plp' })
381
425
 
382
- expect(clientCP.listEntries).toHaveBeenCalledTimes(2)
426
+ expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(2)
383
427
  })
384
428
 
385
429
  it('fetches the list again after the TTL', async () => {
@@ -389,11 +433,103 @@ describe('ContentService', () => {
389
433
  await service.getMultipleContent({ contentType: 'plp' })
390
434
  vi.advanceTimersByTime(FIVE_MINUTES - 1)
391
435
  await service.getMultipleContent({ contentType: 'plp' })
392
- expect(clientCP.listEntries).toHaveBeenCalledTimes(1)
436
+ expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(1)
393
437
 
394
438
  vi.advanceTimersByTime(1)
395
439
  await service.getMultipleContent({ contentType: 'plp' })
396
- expect(clientCP.listEntries).toHaveBeenCalledTimes(2)
440
+ expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(2)
441
+ })
442
+
443
+ it('merges the entry metadata with its inline content', async () => {
444
+ const { service, clientCP } = createServiceWithClient([['collection']])
445
+
446
+ const { data } = await service.getMultipleContent({ contentType: 'plp' })
447
+
448
+ expect(data).toEqual([
449
+ {
450
+ id: 'collection',
451
+ name: 'collection',
452
+ settings: { template: { value: '/colecao' } },
453
+ sections: [{ name: 'Collection' }],
454
+ },
455
+ ])
456
+ expect(clientCP.getEntry).not.toHaveBeenCalled()
457
+ })
458
+
459
+ it('warns without naming one list method when the pagination cap is hit', async () => {
460
+ // 26 pages exceed the MAX_PAGES cap of 25, so the service stops
461
+ // paginating and warns.
462
+ const pages = Array.from({ length: 26 }, (_, index) => [`entry-${index}`])
463
+ const { service, clientCP } = createServiceWithClient(pages)
464
+
465
+ const { data } = await service.getMultipleContent({
466
+ contentType: 'plp',
467
+ })
468
+
469
+ expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(25)
470
+ expect(data).toHaveLength(25)
471
+ expect(console.warn).toHaveBeenCalledWith(
472
+ expect.stringContaining('pagination hit MAX_PAGES cap'),
473
+ expect.anything()
474
+ )
475
+ expect(console.warn).not.toHaveBeenCalledWith(
476
+ expect.stringContaining('listEntries pagination'),
477
+ expect.anything()
478
+ )
479
+ })
480
+
481
+ describe('PDP', () => {
482
+ it('skips the product slug lookup and matches a template from the list', async () => {
483
+ const { service, clientCP } = createServiceWithClient([
484
+ ['generic', 'camisetas'],
485
+ ])
486
+
487
+ const page = await service.getPdpContent(
488
+ toProduct('/camisetas/', '/camiseta-azul-123/p'),
489
+ { slug: 'camiseta-azul-123' }
490
+ )
491
+
492
+ expect(clientCP.getEntryBySlug).not.toHaveBeenCalled()
493
+ expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(1)
494
+ expect(page.sections).toEqual([{ name: 'Camisetas PDP' }])
495
+ })
496
+
497
+ it('still fetches the previewed entry by id', async () => {
498
+ const { service, clientCP } = createServiceWithClient()
499
+
500
+ const page = await service.getPdpContent(
501
+ toProduct('/camiseta-azul-123/p'),
502
+ {
503
+ slug: 'camiseta-azul-123',
504
+ previewData: {
505
+ contentType: 'pdp',
506
+ documentId: 'collection',
507
+ versionId: 'version-1',
508
+ },
509
+ }
510
+ )
511
+
512
+ expect(clientCP.previewEntryById).toHaveBeenCalledWith(
513
+ expect.objectContaining({ entryId: 'collection', contentType: 'pdp' })
514
+ )
515
+ expect(clientCP.listEntriesWithContent).not.toHaveBeenCalled()
516
+ expect(page.sections).toEqual([{ name: 'Collection' }])
517
+ })
518
+
519
+ it('still fetches an explicit documentId directly', async () => {
520
+ const { service, clientCP } = createServiceWithClient()
521
+
522
+ const page = await service.getPdpContent(
523
+ toProduct('/camiseta-azul-123/p'),
524
+ { slug: 'camiseta-azul-123', documentId: 'other' }
525
+ )
526
+
527
+ expect(clientCP.getEntry).toHaveBeenCalledWith(
528
+ expect.objectContaining({ entryId: 'other', contentType: 'pdp' })
529
+ )
530
+ expect(clientCP.listEntriesWithContent).not.toHaveBeenCalled()
531
+ expect(page.sections).toEqual([{ name: 'Other' }])
532
+ })
397
533
  })
398
534
  })
399
535