@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.
- package/.turbo/turbo-generate.log +3 -3
- package/.turbo/turbo-test.log +192 -189
- package/CHANGELOG.md +10 -0
- package/package.json +6 -6
- package/src/server/content/service.ts +47 -8
- package/test/server/content/service.test.ts +161 -25
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@4.11.
|
|
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.
|
|
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
|
[33m[STARTED][39m Parse Configuration
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
[32m[COMPLETED][39m Generate to @generated/
|
|
20
20
|
[32m[COMPLETED][39m Generate outputs
|
|
21
21
|
|
|
22
|
-
> @faststore/core@4.11.
|
|
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
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@4.11.
|
|
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
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/ui/useScrollRestoration.browser.test.ts [2m([22m[2m43 tests[22m[2m)[22m[33m
|
|
10
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/ui/useScrollRestoration.browser.test.ts [2m([22m[2m43 tests[22m[2m)[22m[33m 906[2mms[22m[39m
|
|
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
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/
|
|
15
|
-
[33m[2m✓[22m[39m shows
|
|
16
|
-
[33m[2m✓[22m[39m
|
|
17
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/
|
|
18
|
-
[33m[2m✓[22m[39m shows
|
|
19
|
-
[33m[2m✓[22m[39m
|
|
20
|
-
|
|
21
|
-
[33m[2m✓[22m[39m
|
|
22
|
-
|
|
23
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
24
|
-
|
|
25
|
-
[33m[2m✓[22m[39m
|
|
26
|
-
|
|
27
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
28
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
29
|
-
|
|
30
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
14
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/cards/MyAccountListCards.browser.test.tsx [2m([22m[2m16 tests[22m[2m)[22m[33m 2588[2mms[22m[39m
|
|
15
|
+
[33m[2m✓[22m[39m shows the tab bar and renders Personal cards by default [33m 991[2mms[22m[39m
|
|
16
|
+
[33m[2m✓[22m[39m paginates when there are more than 25 cards [33m 371[2mms[22m[39m
|
|
17
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/ContractSwitcher.browser.test.tsx [2m([22m[2m22 tests[22m[2m)[22m[33m 3427[2mms[22m[39m
|
|
18
|
+
[33m[2m✓[22m[39m shows an error state when the list fails to load [33m 627[2mms[22m[39m
|
|
19
|
+
[33m[2m✓[22m[39m requires selecting a contract before Confirm is enabled, then switches (REQ-03) [33m 313[2mms[22m[39m
|
|
20
|
+
[33m[2m✓[22m[39m keeps Confirm disabled when switching is unavailable [33m 326[2mms[22m[39m
|
|
21
|
+
[33m[2m✓[22m[39m honors CMS-provided labels for the header, current session, search, footer, and available count [33m 368[2mms[22m[39m
|
|
22
|
+
[33m[2m✓[22m[39m falls back to English defaults when CMS labels are blank [33m 347[2mms[22m[39m
|
|
23
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/BuyingPolicyAlert.browser.test.tsx [2m([22m[2m13 tests[22m[2m)[22m[33m 2038[2mms[22m[39m
|
|
24
|
+
[33m[2m✓[22m[39m opens the reject confirmation modal with the default English copy [33m 661[2mms[22m[39m
|
|
25
|
+
[33m[2m✓[22m[39m opens the reject confirmation modal with CMS-provided labels [33m 390[2mms[22m[39m
|
|
26
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/ui/RichText/RichText.browser.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[33m 517[2mms[22m[39m
|
|
27
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/product/usePageProductsQuery.browser.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 151[2mms[22m[39m
|
|
28
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationDrawer.browser.test.tsx [2m([22m[2m10 tests[22m[2m)[22m[33m 1533[2mms[22m[39m
|
|
29
|
+
[33m[2m✓[22m[39m renders the menu view with contract details and manage footer [33m 848[2mms[22m[39m
|
|
30
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/localization/useBindingSelector.browser.test.tsx [2m([22m[2m9 tests[22m[2m)[22m[32m 45[2mms[22m[39m
|
|
31
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/reconcileSessionLocale.browser.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 17[2mms[22m[39m
|
|
32
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/CartRecommendationShelf/CartRecommendationShelf.browser.test.tsx [2m([22m[2m13 tests[22m[2m)[22m[32m 157[2mms[22m[39m
|
|
33
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/ui/ProductGallery/GalleryPageHeightLock.browser.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m 73[2mms[22m[39m
|
|
34
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/recommendations/useRecommendationShelf.browser.test.tsx [2m([22m[2m12 tests[22m[2m)[22m[32m 61[2mms[22m[39m
|
|
31
35
|
[90mstderr[2m | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx
|
|
32
36
|
[22m[39mError in optimistic validation: TypeError: Failed to parse URL from /api/graphql?operationName=ValidateCartMutation&operationHash=3c71b0d3fc2bade14df68abfa271858beb361b12
|
|
33
37
|
[90m at node:internal/deps/undici/undici:16416:13[39m
|
|
@@ -54,16 +58,14 @@ Browserslist: browsers data (caniuse-lite) is 9 months old. Please run:
|
|
|
54
58
|
}
|
|
55
59
|
}
|
|
56
60
|
|
|
57
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/recommendations/useRecommendationShelf.browser.test.tsx [2m([22m[2m12 tests[22m[2m)[22m[32m 41[2mms[22m[39m
|
|
58
61
|
[90mstderr[2m | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx[2m > [22m[2mRecommendationShelf[2m > [22m[2mrenders nothing when there is an error
|
|
59
62
|
[22m[39mError fetching recommendations [90mundefined[39m boom for campaign vrn:recommendations:acc:rec-top-items-v2:campaign-1
|
|
60
63
|
|
|
61
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
62
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
63
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
64
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountOrderDetails.browser.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
65
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/getInitialSession.browser.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m
|
|
66
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/navigation/Navbar.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 72[2mms[22m[39m
|
|
64
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m 101[2mms[22m[39m
|
|
65
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/CartSidebar/CartSidebar.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m 63[2mms[22m[39m
|
|
66
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/product/useProductQuery.browser.test.ts [2m([22m[2m5 tests[22m[2m)[22m[33m 428[2mms[22m[39m
|
|
67
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountOrderDetails.browser.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m 94[2mms[22m[39m
|
|
68
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/getInitialSession.browser.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 18[2mms[22m[39m
|
|
67
69
|
[90mstderr[2m | test/pages/password-protection.browser.test.tsx[2m > [22m[2mPasswordProtectionLogin[2m > [22m[2mposts the password and redirects to the requested return path
|
|
68
70
|
[22m[39mWarning: 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
|
-
[90mstderr[2m | test/sdk/session/validateSession.browser.test.ts
|
|
105
|
-
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
106
|
-
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
107
|
-
at validateCart [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/index.ts:124:9[90m)[39m
|
|
108
|
-
at onValidate [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/useStore.ts:18:20[90m)[39m
|
|
109
|
-
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
110
|
-
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
111
|
-
|
|
112
106
|
[90mstderr[2m | test/pages/password-protection.browser.test.tsx[2m > [22m[2mPasswordProtectionLogin[2m > [22m[2mdefaults returnTo to root and shows API validation errors
|
|
113
107
|
[22m[39mWarning: 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
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/validateSession.browser.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 26[2mms[22m[39m
|
|
209
202
|
[90mstderr[2m | test/pages/password-protection.browser.test.tsx[2m > [22m[2mPasswordProtectionLogin[2m > [22m[2mshows service unavailable when the response is not a login payload
|
|
210
203
|
[22m[39mWarning: 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
|
+
[90mstderr[2m | test/sdk/session/validateSession.browser.test.ts
|
|
251
|
+
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
252
|
+
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
253
|
+
at validateCart [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/index.ts:124:9[90m)[39m
|
|
254
|
+
at onValidate [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/useStore.ts:18:20[90m)[39m
|
|
255
|
+
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
256
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
257
|
+
|
|
257
258
|
[90mstderr[2m | test/pages/password-protection.browser.test.tsx[2m > [22m[2mPasswordProtectionLogin[2m > [22m[2mshows service unavailable when the login request fails
|
|
258
259
|
[22m[39mWarning: 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
|
-
[32m✓[39m [30m[46m browser [49m[39m test/pages/password-protection.browser.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[33m
|
|
306
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
307
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
306
|
+
[32m✓[39m [30m[46m browser [49m[39m test/pages/password-protection.browser.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[33m 827[2mms[22m[39m
|
|
307
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/validateSession.browser.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 25[2mms[22m[39m
|
|
308
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/navigation/Navbar.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 119[2mms[22m[39m
|
|
308
309
|
[90mstderr[2m | test/components/cms/RenderSections.browser.test.tsx
|
|
309
310
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
310
311
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -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
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
315
316
|
|
|
316
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
317
|
-
|
|
318
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
317
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationDrawerFooter.browser.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[33m 512[2mms[22m[39m
|
|
318
|
+
[33m[2m✓[22m[39m shows manage link for organization managers [33m 307[2mms[22m[39m
|
|
319
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/useSwitchContract.browser.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 56[2mms[22m[39m
|
|
320
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/cms/RenderSections.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m 76[2mms[22m[39m
|
|
321
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/navigation/NavbarSlider.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 30[2mms[22m[39m
|
|
322
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/product/usePageProductsQuery.deliveryPromise.browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 39[2mms[22m[39m
|
|
319
323
|
[90mstderr[2m | test/sdk/localization/store-url.browser.test.ts
|
|
320
324
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
321
325
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -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
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
326
330
|
|
|
327
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/localization/store-url.browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
328
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
329
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
330
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/templates/SearchPage/SearchWrapper.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
331
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/localization/store-url.browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
332
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/Menu.browser.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[33m 325[2mms[22m[39m
|
|
333
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/useAvailableContracts.browser.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 34[2mms[22m[39m
|
|
334
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/templates/SearchPage/SearchWrapper.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 40[2mms[22m[39m
|
|
331
335
|
[90mstderr[2m | test/sdk/session/refreshTokenRoute.browser.test.ts
|
|
332
336
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
333
337
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -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
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
338
342
|
|
|
339
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/refreshTokenRoute.browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
340
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/recommendations/useRecommendationShelf.sessionFallback.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
341
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
342
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
343
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/CartRecommendationShelf/CartRecommendationProductCard.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
344
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/changeContractToken.browser.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m
|
|
343
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/refreshTokenRoute.browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
344
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/recommendations/useRecommendationShelf.sessionFallback.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 134[2mms[22m[39m
|
|
345
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountListQuotes.browser.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m 126[2mms[22m[39m
|
|
346
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/navigation/NavbarAccountArea.browser.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m 64[2mms[22m[39m
|
|
347
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/CartRecommendationShelf/CartRecommendationProductCard.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 75[2mms[22m[39m
|
|
348
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/changeContractToken.browser.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
345
349
|
[90mstderr[2m | test/components/account/doLogout.browser.test.ts
|
|
346
350
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
347
351
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -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
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
352
356
|
|
|
353
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/doLogout.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
354
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationDrawerHeader.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[
|
|
355
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/product/useProductNotFoundRedirect.browser.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m
|
|
356
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/useRefreshToken.browser.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
357
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/ui/LocalizationButton.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
357
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/doLogout.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 24[2mms[22m[39m
|
|
358
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationDrawerHeader.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[33m 359[2mms[22m[39m
|
|
359
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/product/useProductNotFoundRedirect.browser.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 29[2mms[22m[39m
|
|
360
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/useRefreshToken.browser.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 134[2mms[22m[39m
|
|
361
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/ui/LocalizationButton.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 44[2mms[22m[39m
|
|
362
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationSignInButton.browser.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m 256[2mms[22m[39m
|
|
358
363
|
[90mstderr[2m | test/sdk/account/clearPersistedSessionState.browser.test.ts
|
|
359
364
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
360
365
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -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
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
365
370
|
|
|
366
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/clearPersistedSessionState.browser.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
367
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
368
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
369
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
370
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/
|
|
371
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
372
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
373
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountOrdersList.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
371
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/clearPersistedSessionState.browser.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 19[2mms[22m[39m
|
|
372
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountOrderDelivery.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 101[2mms[22m[39m
|
|
373
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/DeliveryOptionAccordion.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 94[2mms[22m[39m
|
|
374
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountOrderStatus.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 104[2mms[22m[39m
|
|
375
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountListCards.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 92[2mms[22m[39m
|
|
376
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/region/useRegion.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 24[2mms[22m[39m
|
|
377
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountOrdersList.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 20[2mms[22m[39m
|
|
374
378
|
[90mstderr[2m | test/sdk/session/sessionStore.browser.test.ts
|
|
375
379
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
376
380
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -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
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
381
385
|
|
|
382
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/sessionStore.browser.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
383
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/SummaryCard.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
384
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/DeliveryOptionAccordionDeliveryInfo.browser.test.tsx [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
385
|
-
[32m✓[39m [30m[46m browser [49m[39m test/utils/shouldBypassRefreshToken.browser.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
386
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/sessionStore.browser.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 13[2mms[22m[39m
|
|
387
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/SummaryCard.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 92[2mms[22m[39m
|
|
388
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/DeliveryOptionAccordionDeliveryInfo.browser.test.tsx [2m([22m[2m1 test[22m[2m)[22m[32m 56[2mms[22m[39m
|
|
389
|
+
[32m✓[39m [30m[46m browser [49m[39m test/utils/shouldBypassRefreshToken.browser.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
386
390
|
[90mstderr[2m | test/sdk/account/refreshToken.browser.test.ts
|
|
387
391
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
388
392
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -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
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
393
397
|
|
|
394
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/refreshToken.browser.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
395
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/StatusCard.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
396
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
397
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/DeliveryCard.browser.test.tsx [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
398
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/DeliveryOptionAccordionProducts.browser.test.tsx [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
399
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/skeletons/ProductGridSkeleton.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
400
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
401
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
402
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/FilterFacetPendingApproval.browser.test.tsx [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
403
|
-
[32m✓[39m [30m[43m node [49m[39m test/server/
|
|
404
|
-
[32m✓[39m [30m[43m node [49m[39m test/server/
|
|
405
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/localization/useBindingSelector.test.tsx [2m([22m[2m22 tests[22m[2m)[22m[32m
|
|
406
|
-
[
|
|
407
|
-
[22m[39mFailed to fetch pickup points: Error: network
|
|
408
|
-
at [90m/home/runner/work/faststore/faststore/packages/core/[39mtest/sdk/deliveryPromise/provider.effect.test.tsx:250:30
|
|
409
|
-
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:145:11
|
|
410
|
-
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:915:26
|
|
411
|
-
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1243:20
|
|
412
|
-
at new Promise (<anonymous>)
|
|
413
|
-
at runWithTimeout (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1209:10)
|
|
414
|
-
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1653:37
|
|
415
|
-
at Traces.$ (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/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/[4mvitest[24m/dist/chunks/traces.CCmnQaNT.js:142:27)
|
|
416
|
-
at trace (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/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/[4mvitest[24m/dist/chunks/test.B8ej_ZHS.js:239:21)
|
|
417
|
-
at runTest (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1653:12)
|
|
418
|
-
|
|
398
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/refreshToken.browser.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
399
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/StatusCard.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 114[2mms[22m[39m
|
|
400
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
401
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/DeliveryCard.browser.test.tsx [2m([22m[2m1 test[22m[2m)[22m[32m 53[2mms[22m[39m
|
|
402
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/DeliveryOptionAccordionProducts.browser.test.tsx [2m([22m[2m1 test[22m[2m)[22m[32m 50[2mms[22m[39m
|
|
403
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/skeletons/ProductGridSkeleton.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 35[2mms[22m[39m
|
|
404
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/api/switch-contract.test.ts [2m([22m[2m61 tests[22m[2m)[22m[32m 184[2mms[22m[39m
|
|
405
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/localization/bindingPaths.test.ts [2m([22m[2m71 tests[22m[2m)[22m[32m 28[2mms[22m[39m
|
|
406
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/FilterFacetPendingApproval.browser.test.tsx [2m([22m[2m1 test[22m[2m)[22m[32m 213[2mms[22m[39m
|
|
407
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/content/service.test.ts [2m([22m[2m32 tests[22m[2m)[22m[32m 50[2mms[22m[39m
|
|
408
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/password-protection-service.test.ts [2m([22m[2m22 tests[22m[2m)[22m[32m 35[2mms[22m[39m
|
|
409
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/localization/useBindingSelector.test.tsx [2m([22m[2m22 tests[22m[2m)[22m[32m 13[2mms[22m[39m
|
|
410
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/match-url.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
419
411
|
[90mstderr[2m | test/pages/api/graphql.test.ts[2m > [22m[2m/api/graphql error status propagation[2m > [22m[2mpropagates the upstream 400 from a wrapped BadRequestError instead of 500
|
|
420
412
|
[22m[39mGraphql 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: [32m'bad'[39m, status: [33m400[39m, type: [32m'BadRequestError'[39m }
|
|
463
455
|
]
|
|
464
456
|
|
|
465
|
-
[90mstderr[2m | test/sdk/deliveryPromise/provider.effect.test.tsx[2m > [22m[2mDeliveryPromiseProvider pickup fetch[2m > [22m[2mclears the simulated list when the next postal code fails
|
|
466
|
-
[22m[39mFailed to fetch pickup points: Error: network
|
|
467
|
-
at [90m/home/runner/work/faststore/faststore/packages/core/[39mtest/sdk/deliveryPromise/provider.effect.test.tsx:332:30
|
|
468
|
-
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:145:11
|
|
469
|
-
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:915:26
|
|
470
|
-
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1243:20
|
|
471
|
-
at new Promise (<anonymous>)
|
|
472
|
-
at runWithTimeout (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1209:10)
|
|
473
|
-
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1653:37
|
|
474
|
-
at Traces.$ (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/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/[4mvitest[24m/dist/chunks/traces.CCmnQaNT.js:142:27)
|
|
475
|
-
at trace (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/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/[4mvitest[24m/dist/chunks/test.B8ej_ZHS.js:239:21)
|
|
476
|
-
at runTest (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1653:12)
|
|
477
|
-
|
|
478
457
|
[90mstderr[2m | test/pages/api/graphql.test.ts[2m > [22m[2m/api/graphql error status propagation[2m > [22m[2msets cache-control: no-store on error responses so a bare 404/410 is not cached by intermediaries
|
|
479
458
|
[22m[39mGraphql execution returned with error: [ { message: [32m'missing'[39m, status: [33m404[39m, type: [32m'NotFoundError'[39m } ]
|
|
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/[4m.pnpm[24m/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/[4mvitest[24m/dist/chunks/test.B8ej_ZHS.js:239:21)
|
|
539
518
|
at runTest (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1653:12)
|
|
540
519
|
|
|
541
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/match-url.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
542
520
|
[90mstderr[2m | test/pages/api/graphql.test.ts[2m > [22m[2m/api/graphql ValidateSession refresh-token bypass[2m > [22m[2mforces a 401 on the production host brandless.vtex.app
|
|
543
521
|
[22m[39mSomething 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: [33m401[39m, type: [32m'UnauthorizedError'[39m }
|
|
572
550
|
}
|
|
573
551
|
|
|
574
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
[
|
|
578
|
-
|
|
552
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/api/graphql.test.ts [2m([22m[2m30 tests[22m[2m)[22m[32m 44[2mms[22m[39m
|
|
553
|
+
[90mstderr[2m | test/sdk/deliveryPromise/provider.effect.test.tsx[2m > [22m[2mDeliveryPromiseProvider pickup fetch[2m > [22m[2mclears the loading flag after a failed request and retries on the next update
|
|
554
|
+
[22m[39mFailed to fetch pickup points: Error: network
|
|
555
|
+
at [90m/home/runner/work/faststore/faststore/packages/core/[39mtest/sdk/deliveryPromise/provider.effect.test.tsx:250:30
|
|
556
|
+
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:145:11
|
|
557
|
+
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:915:26
|
|
558
|
+
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1243:20
|
|
559
|
+
at new Promise (<anonymous>)
|
|
560
|
+
at runWithTimeout (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1209:10)
|
|
561
|
+
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1653:37
|
|
562
|
+
at Traces.$ (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/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/[4mvitest[24m/dist/chunks/traces.CCmnQaNT.js:142:27)
|
|
563
|
+
at trace (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/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/[4mvitest[24m/dist/chunks/test.B8ej_ZHS.js:239:21)
|
|
564
|
+
at runTest (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1653:12)
|
|
565
|
+
|
|
566
|
+
[90mstderr[2m | test/sdk/deliveryPromise/provider.effect.test.tsx[2m > [22m[2mDeliveryPromiseProvider pickup fetch[2m > [22m[2mclears the simulated list when the next postal code fails
|
|
567
|
+
[22m[39mFailed to fetch pickup points: Error: network
|
|
568
|
+
at [90m/home/runner/work/faststore/faststore/packages/core/[39mtest/sdk/deliveryPromise/provider.effect.test.tsx:332:30
|
|
569
|
+
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:145:11
|
|
570
|
+
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:915:26
|
|
571
|
+
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1243:20
|
|
572
|
+
at new Promise (<anonymous>)
|
|
573
|
+
at runWithTimeout (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1209:10)
|
|
574
|
+
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1653:37
|
|
575
|
+
at Traces.$ (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/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/[4mvitest[24m/dist/chunks/traces.CCmnQaNT.js:142:27)
|
|
576
|
+
at trace (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/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/[4mvitest[24m/dist/chunks/test.B8ej_ZHS.js:239:21)
|
|
577
|
+
at runTest (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1653:12)
|
|
578
|
+
|
|
579
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/deliveryPromise/provider.effect.test.tsx [2m([22m[2m9 tests[22m[2m)[22m[32m 85[2mms[22m[39m
|
|
580
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/api/unlock.test.ts [2m([22m[2m15 tests[22m[2m)[22m[32m 156[2mms[22m[39m
|
|
581
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/session/syncSalesChannelFromOrderForm.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
579
582
|
[90mstderr[2m | test/components/search/SearchInputComponent.test.tsx
|
|
580
583
|
[22m[39mWarning: 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
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/search/SearchInputComponent.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
643
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
644
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
645
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
645
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/search/SearchInputComponent.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[32m 81[2mms[22m[39m
|
|
646
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/localization/bindingSelector.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
647
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/refreshToken.test.ts [2m([22m[2m21 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
648
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountListQuotesTable.test.tsx [2m([22m[2m15 tests[22m[2m)[22m[33m 435[2mms[22m[39m
|
|
646
649
|
[90mstderr[2m | test/pages/pvt/account/cards/index.test.ts[2m > [22m[2mCards page getServerSideProps[2m > [22m[2mredirects to /pvt/account/403 when the query fails with 401/403
|
|
647
650
|
[22m[39m{ extensions: { status: [33m401[39m } }
|
|
648
651
|
|
|
649
652
|
[90mstderr[2m | test/pages/pvt/account/cards/index.test.ts[2m > [22m[2mCards page getServerSideProps[2m > [22m[2mrenders the error state (no redirect) when the query fails with a non-auth status
|
|
650
653
|
[22m[39m{ extensions: { status: [33m502[39m } }
|
|
651
654
|
|
|
652
|
-
[32m✓[39m [30m[43m node [49m[39m test/pages/pvt/account/cards/index.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
653
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
654
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
655
|
-
|
|
656
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountListQuotes.test.tsx [2m([22m[2m11 tests[22m[2m)[22m[33m 803[2mms[22m[39m
|
|
657
|
-
[33m[2m✓[22m[39m navigates with the search term on blur [33m 357[2mms[22m[39m
|
|
655
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/pvt/account/cards/index.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
656
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/search/useSearchHistory.test.ts [2m([22m[2m13 tests[22m[2m)[22m[32m 44[2mms[22m[39m
|
|
657
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountListQuotes.test.tsx [2m([22m[2m11 tests[22m[2m)[22m[33m 830[2mms[22m[39m
|
|
658
|
+
[33m[2m✓[22m[39m navigates with the search term on blur [33m 361[2mms[22m[39m
|
|
658
659
|
[33m[2m✓[22m[39m navigates without a label param when the search is cleared [33m 357[2mms[22m[39m
|
|
659
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
660
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/
|
|
661
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/
|
|
660
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/quoteFilters.test.ts [2m([22m[2m26 tests[22m[2m)[22m[32m 53[2mms[22m[39m
|
|
661
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/productJsonLd.test.ts [2m([22m[2m36 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
662
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/cookieCacheBusting.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 16[2mms[22m[39m
|
|
663
|
+
[32m✓[39m [30m[43m node [49m[39m test/experimental/myAccountCmsServerSideProps.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
664
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/clearCookies.test.ts [2m([22m[2m20 tests[22m[2m)[22m[32m 20[2mms[22m[39m
|
|
665
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/multipleTemplates.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
662
666
|
[90mstderr[2m | test/sdk/account/useSetPassword.test.ts[2m > [22m[2museSetPassword[2m > [22m[2mmaps wrongcredentials error responses to the existing message
|
|
663
667
|
[22m[39mSet password request failed: Bad Request
|
|
664
668
|
|
|
665
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/useSetPassword.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
666
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderEntryOperation.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
669
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/useSetPassword.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 48[2mms[22m[39m
|
|
670
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderEntryOperation.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 39[2mms[22m[39m
|
|
667
671
|
[32m✓[39m [30m[43m node [49m[39m test/utils/localization/localizeRedirectDestination.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
668
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuotesFilterSlider.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
669
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuotesStatusSelector.test.tsx [2m([22m[2m14 tests[22m[2m)[22m[32m
|
|
670
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/localization/hreflang.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
671
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
672
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
673
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
674
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
675
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/redirects/index.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m
|
|
676
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderEntryUpload.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
677
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
678
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
679
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/trustedForwardedHost.test.ts [2m([22m[2m36 tests[22m[2m)[22m[32m
|
|
680
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/getDeliveryOptionLabel.test.ts [2m([22m[2m21 tests[22m[2m)[22m[32m
|
|
681
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/graphql/retryPolicy.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m
|
|
672
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuotesFilterSlider.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m 187[2mms[22m[39m
|
|
673
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuotesStatusSelector.test.tsx [2m([22m[2m14 tests[22m[2m)[22m[32m 176[2mms[22m[39m
|
|
674
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/localization/hreflang.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
675
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/getMyAccountRoutes.test.ts [2m([22m[2m13 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
676
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/cms/index.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
677
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuotesSelectedTags.test.tsx [2m([22m[2m10 tests[22m[2m)[22m[32m 133[2mms[22m[39m
|
|
678
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/content/promiseCache.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 17[2mms[22m[39m
|
|
679
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/redirects/index.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 53[2mms[22m[39m
|
|
680
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderEntryUpload.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 55[2mms[22m[39m
|
|
681
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderEntry.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 49[2mms[22m[39m
|
|
682
|
+
[32m✓[39m [30m[43m node [49m[39m test/proxy.localization.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 58[2mms[22m[39m
|
|
683
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/trustedForwardedHost.test.ts [2m([22m[2m36 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
684
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/getDeliveryOptionLabel.test.ts [2m([22m[2m21 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
685
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/graphql/retryPolicy.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m 21[2mms[22m[39m
|
|
682
686
|
[32m✓[39m [30m[43m node [49m[39m test/server/cms/myAccountDefaultSections.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
683
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
684
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
685
|
-
|
|
686
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
687
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/analytics/useStartRecommendationSession.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 41[2mms[22m[39m
|
|
688
|
-
[32m✓[39m [30m[43m node [49m[39m test/pages/api/logout.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 20[2mms[22m[39m
|
|
689
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderFormItems.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 29[2mms[22m[39m
|
|
687
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/index.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m 722[2mms[22m[39m
|
|
688
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/productJsonLdRendering.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
689
|
+
[32m✓[39m [30m[43m node [49m[39m test/proxy.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 22[2mms[22m[39m
|
|
690
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/api/logout.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 32[2mms[22m[39m
|
|
690
691
|
[32m✓[39m [30m[43m node [49m[39m test/utils/shouldBypassRefreshToken.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
691
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
692
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
693
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
694
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
695
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
696
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
697
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
698
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
692
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/analytics/useStartRecommendationSession.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 48[2mms[22m[39m
|
|
693
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/webops-api.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 26[2mms[22m[39m
|
|
694
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderFormItems.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 44[2mms[22m[39m
|
|
695
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/StatusCard.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 32[2mms[22m[39m
|
|
696
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/deliveryPromise/queries.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
697
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/localization/store-url.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
698
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/cart/waitForSessionValidated.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 13[2mms[22m[39m
|
|
699
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/cms/global.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
700
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/deliveryPromise/provider.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
701
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/auth/useAuth.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 41[2mms[22m[39m
|
|
699
702
|
[90mstderr[2m | test/server/storeDirectives.test.ts[2m > [22m[2mstore directives through the core server[2m > [22m[2mapplies @auth from a store field and validates the session once
|
|
700
703
|
[22m[39mhttps://storeframework.vtexcommercestable.com.br/api/vtexid/credential/validate {
|
|
701
704
|
headers: { [32m'content-type'[39m: [32m'application/json'[39m, [32m'X-FORWARDED-HOST'[39m: [32m''[39m },
|
|
@@ -703,43 +706,43 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
|
|
|
703
706
|
method: [32m'POST'[39m
|
|
704
707
|
} { status: [33m401[39m, statusText: [32m'Unauthorized'[39m, headers: {} }
|
|
705
708
|
|
|
706
|
-
[32m✓[39m [30m[43m node [49m[39m test/server/storeDirectives.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
707
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/mergeDiscoveryConfig.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
708
|
-
[32m✓[39m [30m[43m node [49m[39m test/server/rootSpan.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
709
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/storeDirectives.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 69[2mms[22m[39m
|
|
710
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/mergeDiscoveryConfig.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
711
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/rootSpan.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 40[2mms[22m[39m
|
|
709
712
|
[32m✓[39m [30m[43m node [49m[39m test/utils/getRequestHostname.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
710
|
-
[32m✓[39m [30m[43m node [49m[39m test/pages/api/preview.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
711
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/search/SearchInput.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
712
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
713
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
714
|
-
[32m✓[39m [30m[43m node [49m[39m test/pages/pvt/account/403.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
715
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
716
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
717
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
718
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
719
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/getB2BSessionClaims.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
720
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/recommendations/useRecommendationUserId.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
721
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/subDomainPrefixWarning.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
722
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/userOrderStatus.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
723
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/unlockResponse.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m
|
|
724
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/recommendations/useRecommendations.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
725
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/account/OrganizationDrawerBody.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
726
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/deliveryPromise/reducer.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
727
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuoteStatusBadge.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m 26[2mms[22m[39m
|
|
713
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/api/preview.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
714
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/search/SearchInput.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
715
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/validateSessionRefreshToken.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
716
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/account/Layout.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[32m 59[2mms[22m[39m
|
|
717
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/pvt/account/403.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
718
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/region/useRegion.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 25[2mms[22m[39m
|
|
719
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/recommendations/vrn.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
720
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/retry.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 16[2mms[22m[39m
|
|
721
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/getIsB2BBuyer.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
722
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/getB2BSessionClaims.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
723
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/recommendations/useRecommendationUserId.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 197[2mms[22m[39m
|
|
724
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/subDomainPrefixWarning.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
725
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/userOrderStatus.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
726
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/unlockResponse.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
727
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/recommendations/useRecommendations.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
728
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/account/OrganizationDrawerBody.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 51[2mms[22m[39m
|
|
729
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/deliveryPromise/reducer.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
728
730
|
[32m✓[39m [30m[43m node [49m[39m test/utils/isLocalHost.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
729
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
730
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
731
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/
|
|
731
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuoteStatusBadge.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m 51[2mms[22m[39m
|
|
732
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/session/toSessionInput.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
733
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/getOrderTotalLabel.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
734
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/listOrdersLabels.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
735
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/auth/ProfileChallenge.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 39[2mms[22m[39m
|
|
732
736
|
[32m✓[39m [30m[43m node [49m[39m test/utils/getCookie.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
733
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
734
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/session/isSignInAreaResolved.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
737
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/session/isSignInAreaResolved.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
735
738
|
[32m✓[39m [30m[43m node [49m[39m test/utils/filterChannel.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
736
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/analytics/utils.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
737
|
-
[32m✓[39m [30m[43m node [49m[39m test/instrumentation.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
738
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/orderDetailsLabels.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
739
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/clearPersistedSessionState.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
739
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/analytics/utils.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
740
|
+
[32m✓[39m [30m[43m node [49m[39m test/instrumentation.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
741
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/orderDetailsLabels.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
742
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/clearPersistedSessionState.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
740
743
|
|
|
741
744
|
[2m Test Files [22m [1m[32m149 passed[39m[22m[90m (149)[39m
|
|
742
|
-
[2m Tests [22m [1m[
|
|
743
|
-
[2m Start at [22m
|
|
744
|
-
[2m Duration [22m
|
|
745
|
+
[2m Tests [22m [1m[32m1270 passed[39m[22m[90m (1270)[39m
|
|
746
|
+
[2m Start at [22m 19:54:22
|
|
747
|
+
[2m Duration [22m 68.33s[2m (transform 15.29s, setup 0ms, import 59.77s, tests 21.45s, environment 86.98s)[22m
|
|
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
|
|
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
|
|
74
|
-
"@faststore/
|
|
75
|
-
"@faststore/
|
|
76
|
-
"@faststore/
|
|
77
|
-
"@faststore/
|
|
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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|
-
//
|
|
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:
|
|
184
|
+
const allEntries: T[] = []
|
|
147
185
|
let scroll: string | undefined
|
|
148
186
|
let pages = 0
|
|
149
187
|
|
|
150
188
|
do {
|
|
151
|
-
const result = await
|
|
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
|
-
|
|
197
|
+
// `listEntries` and `listEntriesWithContent` both paginate here.
|
|
198
|
+
console.warn('list pagination hit MAX_PAGES cap', serviceParams)
|
|
160
199
|
}
|
|
161
200
|
|
|
162
|
-
return
|
|
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
|
|
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
|
|
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.
|
|
248
|
-
expect(clientCP.
|
|
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.
|
|
261
|
-
expect(clientCP.getEntry).
|
|
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.
|
|
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.
|
|
329
|
+
expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(3)
|
|
291
330
|
expect(
|
|
292
|
-
clientCP.
|
|
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.
|
|
347
|
+
expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(2)
|
|
309
348
|
expect(
|
|
310
|
-
clientCP.
|
|
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.
|
|
362
|
+
expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(2)
|
|
322
363
|
expect(
|
|
323
|
-
clientCP.
|
|
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.
|
|
344
|
-
expect(clientCP.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
436
|
+
expect(clientCP.listEntriesWithContent).toHaveBeenCalledTimes(1)
|
|
393
437
|
|
|
394
438
|
vi.advanceTimersByTime(1)
|
|
395
439
|
await service.getMultipleContent({ contentType: 'plp' })
|
|
396
|
-
expect(clientCP.
|
|
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
|
|