@faststore/core 4.11.3-dev.0 → 4.11.3-dev.1
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 +163 -163
- package/CHANGELOG.md +6 -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.0 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.0 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.0 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.0 test /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> vitest run
|
|
4
4
|
|
|
5
5
|
|
|
@@ -7,27 +7,28 @@
|
|
|
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 1216[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
|
-
|
|
17
|
-
|
|
18
|
-
[33m[2m✓[22m[39m
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
[33m[2m✓[22m[39m opens the reject confirmation modal with
|
|
22
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
23
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
24
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationDrawer.browser.test.tsx [2m([22m[2m10 tests[22m[2m)[22m[33m
|
|
25
|
-
[33m[2m✓[22m[39m renders the menu view with contract details and manage footer [33m
|
|
26
|
-
[33m[2m✓[22m[39m opens the contract switcher and returns to the menu on back [33m
|
|
27
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
28
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/localization/useBindingSelector.browser.test.tsx [2m([22m[2m9 tests[22m[2m)[22m[32m
|
|
29
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
30
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/ui/ProductGallery/GalleryPageHeightLock.browser.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
14
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/cards/MyAccountListCards.browser.test.tsx [2m([22m[2m16 tests[22m[2m)[22m[33m 1119[2mms[22m[39m
|
|
15
|
+
[33m[2m✓[22m[39m shows the tab bar and renders Personal cards by default [33m 458[2mms[22m[39m
|
|
16
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/ContractSwitcher.browser.test.tsx [2m([22m[2m22 tests[22m[2m)[22m[33m 2408[2mms[22m[39m
|
|
17
|
+
[33m[2m✓[22m[39m shows an error state when the list fails to load [33m 318[2mms[22m[39m
|
|
18
|
+
[33m[2m✓[22m[39m requires selecting a contract before Confirm is enabled, then switches (REQ-03) [33m 342[2mms[22m[39m
|
|
19
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/BuyingPolicyAlert.browser.test.tsx [2m([22m[2m13 tests[22m[2m)[22m[33m 1680[2mms[22m[39m
|
|
20
|
+
[33m[2m✓[22m[39m opens the reject confirmation modal with the default English copy [33m 733[2mms[22m[39m
|
|
21
|
+
[33m[2m✓[22m[39m opens the reject confirmation modal with CMS-provided labels [33m 303[2mms[22m[39m
|
|
22
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/product/usePageProductsQuery.browser.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 174[2mms[22m[39m
|
|
23
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/ui/RichText/RichText.browser.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m 266[2mms[22m[39m
|
|
24
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationDrawer.browser.test.tsx [2m([22m[2m10 tests[22m[2m)[22m[33m 1668[2mms[22m[39m
|
|
25
|
+
[33m[2m✓[22m[39m renders the menu view with contract details and manage footer [33m 843[2mms[22m[39m
|
|
26
|
+
[33m[2m✓[22m[39m opens the contract switcher and returns to the menu on back [33m 323[2mms[22m[39m
|
|
27
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/reconcileSessionLocale.browser.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
28
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/localization/useBindingSelector.browser.test.tsx [2m([22m[2m9 tests[22m[2m)[22m[32m 31[2mms[22m[39m
|
|
29
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/CartRecommendationShelf/CartRecommendationShelf.browser.test.tsx [2m([22m[2m13 tests[22m[2m)[22m[32m 109[2mms[22m[39m
|
|
30
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/ui/ProductGallery/GalleryPageHeightLock.browser.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m 48[2mms[22m[39m
|
|
31
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/recommendations/useRecommendationShelf.browser.test.tsx [2m([22m[2m12 tests[22m[2m)[22m[32m 51[2mms[22m[39m
|
|
31
32
|
[90mstderr[2m | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx
|
|
32
33
|
[22m[39mError in optimistic validation: TypeError: Failed to parse URL from /api/graphql?operationName=ValidateCartMutation&operationHash=3c71b0d3fc2bade14df68abfa271858beb361b12
|
|
33
34
|
[90m at node:internal/deps/undici/undici:16416:13[39m
|
|
@@ -54,16 +55,23 @@ Browserslist: browsers data (caniuse-lite) is 9 months old. Please run:
|
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
|
|
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
58
|
[90mstderr[2m | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx[2m > [22m[2mRecommendationShelf[2m > [22m[2mrenders nothing when there is an error
|
|
59
59
|
[22m[39mError fetching recommendations [90mundefined[39m boom for campaign vrn:recommendations:acc:rec-top-items-v2:campaign-1
|
|
60
60
|
|
|
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/sdk/product/useProductQuery.browser.test.ts [2m([22m[2m5 tests[22m[2m)[22m[
|
|
63
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/CartSidebar/CartSidebar.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
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
|
-
|
|
61
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m 87[2mms[22m[39m
|
|
62
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/product/useProductQuery.browser.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 300[2mms[22m[39m
|
|
63
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/CartSidebar/CartSidebar.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m 53[2mms[22m[39m
|
|
64
|
+
[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
|
|
65
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/getInitialSession.browser.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
66
|
+
[90mstderr[2m | test/sdk/session/validateSession.browser.test.ts
|
|
67
|
+
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
68
|
+
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
69
|
+
at validateCart [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/index.ts:124:9[90m)[39m
|
|
70
|
+
at onValidate [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/useStore.ts:18:20[90m)[39m
|
|
71
|
+
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
72
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
73
|
+
|
|
74
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/validateSession.browser.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 16[2mms[22m[39m
|
|
67
75
|
[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
76
|
[22m[39mWarning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
|
|
69
77
|
|
|
@@ -101,14 +109,6 @@ act(() => {
|
|
|
101
109
|
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
110
|
at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
|
|
103
111
|
|
|
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
112
|
[90mstderr[2m | test/pages/password-protection.browser.test.tsx[2m > [22m[2mPasswordProtectionLogin[2m > [22m[2mdefaults returnTo to root and shows API validation errors
|
|
113
113
|
[22m[39mWarning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
|
|
114
114
|
|
|
@@ -205,7 +205,6 @@ act(() => {
|
|
|
205
205
|
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
206
|
at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
|
|
207
207
|
|
|
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
208
|
[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
209
|
[22m[39mWarning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
|
|
211
210
|
|
|
@@ -302,9 +301,10 @@ act(() => {
|
|
|
302
301
|
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
302
|
at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
|
|
304
303
|
|
|
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/components/
|
|
307
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
304
|
+
[32m✓[39m [30m[46m browser [49m[39m test/pages/password-protection.browser.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[33m 817[2mms[22m[39m
|
|
305
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/navigation/Navbar.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 120[2mms[22m[39m
|
|
306
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationDrawerFooter.browser.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[33m 557[2mms[22m[39m
|
|
307
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/useSwitchContract.browser.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 59[2mms[22m[39m
|
|
308
308
|
[90mstderr[2m | test/components/cms/RenderSections.browser.test.tsx
|
|
309
309
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
310
310
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -313,9 +313,9 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
313
313
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
314
314
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
315
315
|
|
|
316
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/cms/RenderSections.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m 58[2mms[22m[39m
|
|
317
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/product/usePageProductsQuery.deliveryPromise.browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 23[2mms[22m[39m
|
|
318
316
|
[32m✓[39m [30m[46m browser [49m[39m test/components/navigation/NavbarSlider.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 32[2mms[22m[39m
|
|
317
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/product/usePageProductsQuery.deliveryPromise.browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 21[2mms[22m[39m
|
|
318
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/cms/RenderSections.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m 50[2mms[22m[39m
|
|
319
319
|
[90mstderr[2m | test/sdk/localization/store-url.browser.test.ts
|
|
320
320
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
321
321
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -324,10 +324,10 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
324
324
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
325
325
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
326
326
|
|
|
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
|
|
327
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/localization/store-url.browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
328
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/Menu.browser.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[32m 239[2mms[22m[39m
|
|
329
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/useAvailableContracts.browser.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 18[2mms[22m[39m
|
|
330
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/templates/SearchPage/SearchWrapper.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 30[2mms[22m[39m
|
|
331
331
|
[90mstderr[2m | test/sdk/session/refreshTokenRoute.browser.test.ts
|
|
332
332
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
333
333
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -336,12 +336,12 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
336
336
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
337
337
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
338
338
|
|
|
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/
|
|
344
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/changeContractToken.browser.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m
|
|
339
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/refreshTokenRoute.browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
340
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/recommendations/useRecommendationShelf.sessionFallback.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 121[2mms[22m[39m
|
|
341
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountListQuotes.browser.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m 57[2mms[22m[39m
|
|
342
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/CartRecommendationShelf/CartRecommendationProductCard.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 29[2mms[22m[39m
|
|
343
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/navigation/NavbarAccountArea.browser.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m 40[2mms[22m[39m
|
|
344
|
+
[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
345
|
[90mstderr[2m | test/components/account/doLogout.browser.test.ts
|
|
346
346
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
347
347
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -350,11 +350,12 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
350
350
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
351
351
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
352
352
|
|
|
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/
|
|
355
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
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
|
|
353
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/doLogout.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 18[2mms[22m[39m
|
|
354
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/product/useProductNotFoundRedirect.browser.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 25[2mms[22m[39m
|
|
355
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationDrawerHeader.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m 225[2mms[22m[39m
|
|
356
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/useRefreshToken.browser.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 130[2mms[22m[39m
|
|
357
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/ui/LocalizationButton.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 33[2mms[22m[39m
|
|
358
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationSignInButton.browser.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m 188[2mms[22m[39m
|
|
358
359
|
[90mstderr[2m | test/sdk/account/clearPersistedSessionState.browser.test.ts
|
|
359
360
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
360
361
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -363,14 +364,13 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
363
364
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
364
365
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
365
366
|
|
|
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/
|
|
371
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountListCards.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
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
|
|
367
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/clearPersistedSessionState.browser.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 13[2mms[22m[39m
|
|
368
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountOrderDelivery.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 63[2mms[22m[39m
|
|
369
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/DeliveryOptionAccordion.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 60[2mms[22m[39m
|
|
370
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountOrderStatus.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 73[2mms[22m[39m
|
|
371
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/region/useRegion.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
372
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountListCards.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 61[2mms[22m[39m
|
|
373
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountOrdersList.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 16[2mms[22m[39m
|
|
374
374
|
[90mstderr[2m | test/sdk/session/sessionStore.browser.test.ts
|
|
375
375
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
376
376
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -379,10 +379,10 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
379
379
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
380
380
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
381
381
|
|
|
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
|
|
382
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/sessionStore.browser.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
383
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/SummaryCard.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 55[2mms[22m[39m
|
|
384
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/DeliveryOptionAccordionDeliveryInfo.browser.test.tsx [2m([22m[2m1 test[22m[2m)[22m[32m 27[2mms[22m[39m
|
|
385
|
+
[32m✓[39m [30m[46m browser [49m[39m test/utils/shouldBypassRefreshToken.browser.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
386
386
|
[90mstderr[2m | test/sdk/account/refreshToken.browser.test.ts
|
|
387
387
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
388
388
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -391,18 +391,19 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
391
391
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
392
392
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
393
393
|
|
|
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
|
|
394
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/refreshToken.browser.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
395
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/StatusCard.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 60[2mms[22m[39m
|
|
396
396
|
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
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/password-protection-service.test.ts [2m([22m[2m22 tests[22m[2m)[22m[32m
|
|
404
|
-
[32m✓[39m [30m[43m node [49m[39m test/server/content/service.test.ts [2m([22m[
|
|
405
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/localization/useBindingSelector.test.tsx [2m([22m[2m22 tests[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 31[2mms[22m[39m
|
|
398
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/DeliveryOptionAccordionProducts.browser.test.tsx [2m([22m[2m1 test[22m[2m)[22m[32m 24[2mms[22m[39m
|
|
399
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/skeletons/ProductGridSkeleton.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 18[2mms[22m[39m
|
|
400
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/api/switch-contract.test.ts [2m([22m[2m61 tests[22m[2m)[22m[32m 132[2mms[22m[39m
|
|
401
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/localization/bindingPaths.test.ts [2m([22m[2m71 tests[22m[2m)[22m[32m 18[2mms[22m[39m
|
|
402
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/FilterFacetPendingApproval.browser.test.tsx [2m([22m[2m1 test[22m[2m)[22m[32m 124[2mms[22m[39m
|
|
403
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/password-protection-service.test.ts [2m([22m[2m22 tests[22m[2m)[22m[32m 23[2mms[22m[39m
|
|
404
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/content/service.test.ts [2m([22m[2m32 tests[22m[2m)[22m[32m 34[2mms[22m[39m
|
|
405
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/localization/useBindingSelector.test.tsx [2m([22m[2m22 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
406
|
+
[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
|
|
406
407
|
[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
|
|
407
408
|
[22m[39mFailed to fetch pickup points: Error: network
|
|
408
409
|
at [90m/home/runner/work/faststore/faststore/packages/core/[39mtest/sdk/deliveryPromise/provider.effect.test.tsx:250:30
|
|
@@ -416,6 +417,20 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
416
417
|
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
418
|
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
419
|
|
|
420
|
+
[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
|
|
421
|
+
[22m[39mFailed to fetch pickup points: Error: network
|
|
422
|
+
at [90m/home/runner/work/faststore/faststore/packages/core/[39mtest/sdk/deliveryPromise/provider.effect.test.tsx:332:30
|
|
423
|
+
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
|
|
424
|
+
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
|
|
425
|
+
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
|
|
426
|
+
at new Promise (<anonymous>)
|
|
427
|
+
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)
|
|
428
|
+
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
|
|
429
|
+
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)
|
|
430
|
+
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)
|
|
431
|
+
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)
|
|
432
|
+
|
|
433
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/deliveryPromise/provider.effect.test.tsx [2m([22m[2m9 tests[22m[2m)[22m[32m 60[2mms[22m[39m
|
|
419
434
|
[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
435
|
[22m[39mGraphql execution returned with error: [
|
|
421
436
|
{
|
|
@@ -462,19 +477,6 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
462
477
|
{ message: [32m'bad'[39m, status: [33m400[39m, type: [32m'BadRequestError'[39m }
|
|
463
478
|
]
|
|
464
479
|
|
|
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
480
|
[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
481
|
[22m[39mGraphql execution returned with error: [ { message: [32m'missing'[39m, status: [33m404[39m, type: [32m'NotFoundError'[39m } ]
|
|
480
482
|
|
|
@@ -538,7 +540,6 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
538
540
|
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
541
|
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
542
|
|
|
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
543
|
[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
544
|
[22m[39mSomething unexpected occurred querying Graphql endpoint:
|
|
544
545
|
le [FastStoreError]: Unauthorized: Token expired. Please login again or refresh the page.
|
|
@@ -571,11 +572,9 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
571
572
|
extensions: { status: [33m401[39m, type: [32m'UnauthorizedError'[39m }
|
|
572
573
|
}
|
|
573
574
|
|
|
574
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
575
|
-
[32m✓[39m [30m[43m node [49m[39m test/pages/api/
|
|
576
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
577
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/session/syncSalesChannelFromOrderForm.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
578
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/localization/bindingSelector.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
575
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/api/graphql.test.ts [2m([22m[2m30 tests[22m[2m)[22m[32m 33[2mms[22m[39m
|
|
576
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/api/unlock.test.ts [2m([22m[2m15 tests[22m[2m)[22m[32m 110[2mms[22m[39m
|
|
577
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/session/syncSalesChannelFromOrderForm.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
579
578
|
[90mstderr[2m | test/components/search/SearchInputComponent.test.tsx
|
|
580
579
|
[22m[39mWarning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter?
|
|
581
580
|
|
|
@@ -639,63 +638,64 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
|
|
|
639
638
|
at Suspense
|
|
640
639
|
at Wrapper (/home/runner/work/faststore/faststore/packages/core/test/components/search/SearchInputComponent.test.tsx:106:20)
|
|
641
640
|
|
|
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/
|
|
641
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/search/SearchInputComponent.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[32m 39[2mms[22m[39m
|
|
642
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/localization/bindingSelector.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
643
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/refreshToken.test.ts [2m([22m[2m21 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
644
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountListQuotesTable.test.tsx [2m([22m[2m15 tests[22m[2m)[22m[33m 318[2mms[22m[39m
|
|
645
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/search/useSearchHistory.test.ts [2m([22m[2m13 tests[22m[2m)[22m[32m 28[2mms[22m[39m
|
|
646
646
|
[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
647
|
[22m[39m{ extensions: { status: [33m401[39m } }
|
|
648
648
|
|
|
649
649
|
[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
650
|
[22m[39m{ extensions: { status: [33m502[39m } }
|
|
651
651
|
|
|
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/components/quotes/quoteFilters.test.ts [2m([22m[2m26 tests[22m[2m)[22m[32m 18[2mms[22m[39m
|
|
654
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/productJsonLd.test.ts [2m([22m[2m36 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
652
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/pvt/account/cards/index.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
655
653
|
[32m✓[39m [30m[43m node [49m[39m test/utils/cookieCacheBusting.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
656
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
654
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/quoteFilters.test.ts [2m([22m[2m26 tests[22m[2m)[22m[32m 22[2mms[22m[39m
|
|
655
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/productJsonLd.test.ts [2m([22m[2m36 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
656
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountListQuotes.test.tsx [2m([22m[2m11 tests[22m[2m)[22m[33m 784[2mms[22m[39m
|
|
657
|
+
[33m[2m✓[22m[39m navigates with the search term on blur [33m 356[2mms[22m[39m
|
|
658
|
+
[33m[2m✓[22m[39m navigates without a label param when the search is cleared [33m 356[2mms[22m[39m
|
|
659
|
+
[32m✓[39m [30m[43m node [49m[39m test/experimental/myAccountCmsServerSideProps.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
660
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/clearCookies.test.ts [2m([22m[2m20 tests[22m[2m)[22m[32m 17[2mms[22m[39m
|
|
661
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/multipleTemplates.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
662
662
|
[90mstderr[2m | test/sdk/account/useSetPassword.test.ts[2m > [22m[2museSetPassword[2m > [22m[2mmaps wrongcredentials error responses to the existing message
|
|
663
663
|
[22m[39mSet password request failed: Bad Request
|
|
664
664
|
|
|
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
|
|
665
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/useSetPassword.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 27[2mms[22m[39m
|
|
666
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderEntryOperation.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 26[2mms[22m[39m
|
|
667
667
|
[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/
|
|
669
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/
|
|
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/server/cms/index.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m
|
|
672
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
668
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuotesStatusSelector.test.tsx [2m([22m[2m14 tests[22m[2m)[22m[32m 101[2mms[22m[39m
|
|
669
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuotesFilterSlider.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m 115[2mms[22m[39m
|
|
670
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/localization/hreflang.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
671
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/cms/index.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
672
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuotesSelectedTags.test.tsx [2m([22m[2m10 tests[22m[2m)[22m[32m 64[2mms[22m[39m
|
|
673
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/getMyAccountRoutes.test.ts [2m([22m[2m13 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
673
674
|
[32m✓[39m [30m[43m node [49m[39m test/server/content/promiseCache.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
674
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
675
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
676
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderEntryUpload.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 31[2mms[22m[39m
|
|
677
|
-
[32m✓[39m [30m[43m node [49m[39m test/proxy.localization.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 35[2mms[22m[39m
|
|
675
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/redirects/index.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 46[2mms[22m[39m
|
|
676
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderEntryUpload.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 56[2mms[22m[39m
|
|
678
677
|
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderEntry.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 34[2mms[22m[39m
|
|
678
|
+
[32m✓[39m [30m[43m node [49m[39m test/proxy.localization.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 39[2mms[22m[39m
|
|
679
679
|
[32m✓[39m [30m[43m node [49m[39m test/utils/trustedForwardedHost.test.ts [2m([22m[2m36 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
680
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/getDeliveryOptionLabel.test.ts [2m([22m[2m21 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 4[2mms[22m[39m
|
|
681
681
|
[32m✓[39m [30m[43m node [49m[39m test/sdk/graphql/retryPolicy.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m 19[2mms[22m[39m
|
|
682
682
|
[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/utils/productJsonLdRendering.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
684
|
-
[32m✓[39m [30m[43m node [49m[39m test/server/index.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m
|
|
685
|
-
[33m[2m✓[22m[39m should handle options and execute [33m
|
|
686
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
687
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
688
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
689
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
690
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/shouldBypassRefreshToken.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m
|
|
691
|
-
[32m✓[39m [30m[43m node [49m[39m test/server/webops-api.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m
|
|
692
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/StatusCard.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
693
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/deliveryPromise/queries.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
683
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/productJsonLdRendering.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
684
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/index.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m 884[2mms[22m[39m
|
|
685
|
+
[33m[2m✓[22m[39m should handle options and execute [33m 508[2mms[22m[39m
|
|
686
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/analytics/useStartRecommendationSession.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 39[2mms[22m[39m
|
|
687
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderFormItems.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 20[2mms[22m[39m
|
|
688
|
+
[32m✓[39m [30m[43m node [49m[39m test/proxy.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 29[2mms[22m[39m
|
|
689
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/api/logout.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 26[2mms[22m[39m
|
|
690
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/shouldBypassRefreshToken.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
691
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/webops-api.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
692
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/StatusCard.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
693
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/deliveryPromise/queries.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
694
694
|
[32m✓[39m [30m[43m node [49m[39m test/sdk/localization/store-url.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
695
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/cart/waitForSessionValidated.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
696
|
-
[32m✓[39m [30m[43m node [49m[39m test/server/cms/global.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
697
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/deliveryPromise/provider.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m
|
|
698
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/auth/useAuth.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
695
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/cart/waitForSessionValidated.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
696
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/cms/global.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
697
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/deliveryPromise/provider.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
698
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/auth/useAuth.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 23[2mms[22m[39m
|
|
699
699
|
[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
700
|
[22m[39mhttps://storeframework.vtexcommercestable.com.br/api/vtexid/credential/validate {
|
|
701
701
|
headers: { [32m'content-type'[39m: [32m'application/json'[39m, [32m'X-FORWARDED-HOST'[39m: [32m''[39m },
|
|
@@ -703,43 +703,43 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
|
|
|
703
703
|
method: [32m'POST'[39m
|
|
704
704
|
} { status: [33m401[39m, statusText: [32m'Unauthorized'[39m, headers: {} }
|
|
705
705
|
|
|
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/utils/getRequestHostname.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m
|
|
706
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/storeDirectives.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 72[2mms[22m[39m
|
|
707
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/mergeDiscoveryConfig.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
708
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/rootSpan.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 23[2mms[22m[39m
|
|
709
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/getRequestHostname.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
710
710
|
[32m✓[39m [30m[43m node [49m[39m test/pages/api/preview.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
711
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/
|
|
712
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/
|
|
711
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/account/Layout.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[32m 39[2mms[22m[39m
|
|
712
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/search/SearchInput.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
713
713
|
[32m✓[39m [30m[43m node [49m[39m test/utils/validateSessionRefreshToken.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
714
714
|
[32m✓[39m [30m[43m node [49m[39m test/pages/pvt/account/403.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
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/
|
|
715
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/region/useRegion.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 17[2mms[22m[39m
|
|
716
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/recommendations/vrn.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
717
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/retry.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
718
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/getIsB2BBuyer.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
719
719
|
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/getB2BSessionClaims.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
720
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/recommendations/useRecommendationUserId.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 179[2mms[22m[39m
|
|
721
721
|
[32m✓[39m [30m[43m node [49m[39m test/utils/subDomainPrefixWarning.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
722
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/userOrderStatus.test.ts [2m([22m[2m4 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 3[2mms[22m[39m
|
|
723
723
|
[32m✓[39m [30m[43m node [49m[39m test/utils/unlockResponse.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
724
724
|
[32m✓[39m [30m[43m node [49m[39m test/sdk/recommendations/useRecommendations.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
725
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/account/OrganizationDrawerBody.test.tsx [2m([22m[2m3 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 34[2mms[22m[39m
|
|
726
726
|
[32m✓[39m [30m[43m node [49m[39m test/sdk/deliveryPromise/reducer.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
727
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuoteStatusBadge.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
728
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/isLocalHost.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m
|
|
729
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/session/toSessionInput.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
730
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/getOrderTotalLabel.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
731
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/listOrdersLabels.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
732
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/getCookie.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
733
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
734
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
727
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuoteStatusBadge.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m 29[2mms[22m[39m
|
|
728
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/isLocalHost.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
729
|
+
[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
|
|
730
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/getOrderTotalLabel.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
731
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/listOrdersLabels.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
732
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/getCookie.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
733
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/session/isSignInAreaResolved.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
734
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/auth/ProfileChallenge.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 21[2mms[22m[39m
|
|
735
735
|
[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
736
|
[32m✓[39m [30m[43m node [49m[39m test/sdk/analytics/utils.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
737
|
-
[32m✓[39m [30m[43m node [49m[39m test/instrumentation.test.ts [2m([22m[2m3 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 4[2mms[22m[39m
|
|
738
738
|
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/orderDetailsLabels.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
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/account/clearPersistedSessionState.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
740
740
|
|
|
741
741
|
[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
|
|
742
|
+
[2m Tests [22m [1m[32m1270 passed[39m[22m[90m (1270)[39m
|
|
743
|
+
[2m Start at [22m 14:45:21
|
|
744
|
+
[2m Duration [22m 48.01s[2m (transform 13.35s, setup 0ms, import 44.94s, tests 16.68s, environment 56.55s)[22m
|
|
745
745
|
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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-dev.1](https://github.com/vtex/faststore/compare/v4.11.3-dev.0...v4.11.3-dev.1) (2026-11-10)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **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)
|
|
11
|
+
|
|
6
12
|
## [4.11.3-dev.0](https://github.com/vtex/faststore/compare/v4.11.2...v4.11.3-dev.0) (2026-11-09)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "4.11.3-dev.
|
|
3
|
+
"version": "4.11.3-dev.1",
|
|
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.
|
|
74
|
-
"@faststore/lighthouse": "4.11.3-dev.
|
|
75
|
-
"@faststore/sdk": "4.11.3-dev.
|
|
76
|
-
"@faststore/ui": "4.11.3-dev.
|
|
77
|
-
"@faststore/diagnostics": "4.11.3-dev.
|
|
73
|
+
"@faststore/api": "4.11.3-dev.1",
|
|
74
|
+
"@faststore/lighthouse": "4.11.3-dev.1",
|
|
75
|
+
"@faststore/sdk": "4.11.3-dev.1",
|
|
76
|
+
"@faststore/ui": "4.11.3-dev.1",
|
|
77
|
+
"@faststore/diagnostics": "4.11.3-dev.1"
|
|
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
|
|