@faststore/core 4.11.2-dev.1 → 4.11.3-dev.0
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 +180 -182
- package/AGENTS.md +7 -0
- package/CHANGELOG.md +32 -0
- package/discovery.config.js +6 -3
- package/next.config.js +6 -0
- package/package.json +7 -7
- package/src/utils/mergeDiscoveryConfig.js +23 -0
- package/src/utils/subDomainPrefixWarning.js +46 -0
- package/test/utils/mergeDiscoveryConfig.test.ts +73 -0
- package/test/utils/subDomainPrefixWarning.test.ts +49 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@4.11.2
|
|
2
|
+
> @faststore/core@4.11.2 generate /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> pnpm run gen-types && pnpm run cache-graphql
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @faststore/core@4.11.2
|
|
6
|
+
> @faststore/core@4.11.2 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.2
|
|
22
|
+
> @faststore/core@4.11.2 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
|
|
2
|
+
> @faststore/core@4.11.2 test /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> vitest run
|
|
4
4
|
|
|
5
5
|
|
|
@@ -7,30 +7,27 @@
|
|
|
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 959[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
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/
|
|
30
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
31
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/reconcileSessionLocale.browser.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 24[2mms[22m[39m
|
|
32
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/localization/useBindingSelector.browser.test.tsx [2m([22m[2m9 tests[22m[2m)[22m[32m 103[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 87[2mms[22m[39m
|
|
14
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/ContractSwitcher.browser.test.tsx [2m([22m[2m22 tests[22m[2m)[22m[33m 3338[2mms[22m[39m
|
|
15
|
+
[33m[2m✓[22m[39m shows an error state when the list fails to load [33m 680[2mms[22m[39m
|
|
16
|
+
[33m[2m✓[22m[39m requires selecting a contract before Confirm is enabled, then switches (REQ-03) [33m 385[2mms[22m[39m
|
|
17
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/cards/MyAccountListCards.browser.test.tsx [2m([22m[2m16 tests[22m[2m)[22m[33m 2444[2mms[22m[39m
|
|
18
|
+
[33m[2m✓[22m[39m shows the tab bar and renders Personal cards by default [33m 985[2mms[22m[39m
|
|
19
|
+
[33m[2m✓[22m[39m paginates when there are more than 25 cards [33m 414[2mms[22m[39m
|
|
20
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/BuyingPolicyAlert.browser.test.tsx [2m([22m[2m13 tests[22m[2m)[22m[33m 1602[2mms[22m[39m
|
|
21
|
+
[33m[2m✓[22m[39m opens the reject confirmation modal with the default English copy [33m 652[2mms[22m[39m
|
|
22
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/ui/RichText/RichText.browser.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[33m 375[2mms[22m[39m
|
|
23
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/product/usePageProductsQuery.browser.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 172[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 1579[2mms[22m[39m
|
|
25
|
+
[33m[2m✓[22m[39m renders the menu view with contract details and manage footer [33m 888[2mms[22m[39m
|
|
26
|
+
[33m[2m✓[22m[39m opens the contract switcher and returns to the menu on back [33m 339[2mms[22m[39m
|
|
27
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/CartRecommendationShelf/CartRecommendationShelf.browser.test.tsx [2m([22m[2m13 tests[22m[2m)[22m[32m 136[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 67[2mms[22m[39m
|
|
29
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/reconcileSessionLocale.browser.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 7[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 79[2mms[22m[39m
|
|
34
31
|
[90mstderr[2m | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx
|
|
35
32
|
[22m[39mError in optimistic validation: TypeError: Failed to parse URL from /api/graphql?operationName=ValidateCartMutation&operationHash=3c71b0d3fc2bade14df68abfa271858beb361b12
|
|
36
33
|
[90m at node:internal/deps/undici/undici:16416:13[39m
|
|
@@ -57,25 +54,16 @@ Browserslist: browsers data (caniuse-lite) is 9 months old. Please run:
|
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
56
|
|
|
60
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/recommendations/useRecommendationShelf.browser.test.tsx [2m([22m[2m12 tests[22m[2m)[22m[32m
|
|
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
|
|
61
58
|
[90mstderr[2m | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx[2m > [22m[2mRecommendationShelf[2m > [22m[2mrenders nothing when there is an error
|
|
62
59
|
[22m[39mError fetching recommendations [90mundefined[39m boom for campaign vrn:recommendations:acc:rec-top-items-v2:campaign-1
|
|
63
60
|
|
|
64
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
65
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/product/useProductQuery.browser.test.ts [2m([22m[2m5 tests[22m[2m)[22m[33m
|
|
66
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
67
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
68
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/getInitialSession.browser.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m
|
|
69
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/navigation/Navbar.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
70
|
-
[90mstderr[2m | test/sdk/session/validateSession.browser.test.ts
|
|
71
|
-
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
72
|
-
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
73
|
-
at validateCart [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/index.ts:124:9[90m)[39m
|
|
74
|
-
at onValidate [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/useStore.ts:18:20[90m)[39m
|
|
75
|
-
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
76
|
-
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
77
|
-
|
|
78
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/validateSession.browser.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
61
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m 78[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[33m 322[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 50[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 109[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 9[2mms[22m[39m
|
|
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
|
|
79
67
|
[90mstderr[2m | test/pages/password-protection.browser.test.tsx[2m > [22m[2mPasswordProtectionLogin[2m > [22m[2mposts the password and redirects to the requested return path
|
|
80
68
|
[22m[39mWarning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
|
|
81
69
|
|
|
@@ -113,6 +101,14 @@ act(() => {
|
|
|
113
101
|
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
|
|
114
102
|
at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
|
|
115
103
|
|
|
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
|
+
|
|
116
112
|
[90mstderr[2m | test/pages/password-protection.browser.test.tsx[2m > [22m[2mPasswordProtectionLogin[2m > [22m[2mdefaults returnTo to root and shows API validation errors
|
|
117
113
|
[22m[39mWarning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
|
|
118
114
|
|
|
@@ -209,6 +205,7 @@ act(() => {
|
|
|
209
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
|
|
210
206
|
at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
|
|
211
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
|
|
212
209
|
[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
|
|
213
210
|
[22m[39mWarning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
|
|
214
211
|
|
|
@@ -305,8 +302,9 @@ act(() => {
|
|
|
305
302
|
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
|
|
306
303
|
at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
|
|
307
304
|
|
|
308
|
-
[32m✓[39m [30m[46m browser [49m[39m test/pages/password-protection.browser.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[33m
|
|
309
|
-
|
|
305
|
+
[32m✓[39m [30m[46m browser [49m[39m test/pages/password-protection.browser.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[33m 676[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 474[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 77[2mms[22m[39m
|
|
310
308
|
[90mstderr[2m | test/components/cms/RenderSections.browser.test.tsx
|
|
311
309
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
312
310
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -315,12 +313,9 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
315
313
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
316
314
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
317
315
|
|
|
318
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
319
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/
|
|
320
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
321
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/product/usePageProductsQuery.deliveryPromise.browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 48[2mms[22m[39m
|
|
322
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/navigation/NavbarSlider.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 52[2mms[22m[39m
|
|
323
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/Menu.browser.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[33m 372[2mms[22m[39m
|
|
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
|
+
[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
|
|
324
319
|
[90mstderr[2m | test/sdk/localization/store-url.browser.test.ts
|
|
325
320
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
326
321
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -330,8 +325,9 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
330
325
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
331
326
|
|
|
332
327
|
[32m✓[39m [30m[46m browser [49m[39m test/sdk/localization/store-url.browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 5[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
|
|
334
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
328
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/useAvailableContracts.browser.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 37[2mms[22m[39m
|
|
329
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/Menu.browser.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[32m 278[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 23[2mms[22m[39m
|
|
335
331
|
[90mstderr[2m | test/sdk/session/refreshTokenRoute.browser.test.ts
|
|
336
332
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
337
333
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -340,12 +336,12 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
340
336
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
341
337
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
342
338
|
|
|
343
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/refreshTokenRoute.browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
344
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/recommendations/useRecommendationShelf.sessionFallback.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
345
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
346
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
347
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/CartRecommendationShelf/CartRecommendationProductCard.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
348
|
-
[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 7[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 129[2mms[22m[39m
|
|
341
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/navigation/NavbarAccountArea.browser.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m 38[2mms[22m[39m
|
|
342
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountListQuotes.browser.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m 95[2mms[22m[39m
|
|
343
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/CartRecommendationShelf/CartRecommendationProductCard.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 42[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 15[2mms[22m[39m
|
|
349
345
|
[90mstderr[2m | test/components/account/doLogout.browser.test.ts
|
|
350
346
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
351
347
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -354,11 +350,11 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
354
350
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
355
351
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
356
352
|
|
|
357
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/doLogout.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
358
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationDrawerHeader.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[
|
|
359
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/product/useProductNotFoundRedirect.browser.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m
|
|
360
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/useRefreshToken.browser.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
361
|
-
[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 14[2mms[22m[39m
|
|
354
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationDrawerHeader.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m 228[2mms[22m[39m
|
|
355
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/product/useProductNotFoundRedirect.browser.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 32[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 123[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 35[2mms[22m[39m
|
|
362
358
|
[90mstderr[2m | test/sdk/account/clearPersistedSessionState.browser.test.ts
|
|
363
359
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
364
360
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -367,14 +363,14 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
367
363
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
368
364
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
369
365
|
|
|
370
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
371
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
372
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountOrderDelivery.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
373
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/DeliveryOptionAccordion.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
374
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountOrderStatus.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
375
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountListCards.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
376
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/region/useRegion.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
377
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountOrdersList.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
366
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/clearPersistedSessionState.browser.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 18[2mms[22m[39m
|
|
367
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationSignInButton.browser.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m 180[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 67[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 66[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 92[2mms[22m[39m
|
|
371
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountListCards.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 68[2mms[22m[39m
|
|
372
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/region/useRegion.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 27[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 15[2mms[22m[39m
|
|
378
374
|
[90mstderr[2m | test/sdk/session/sessionStore.browser.test.ts
|
|
379
375
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
380
376
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -383,10 +379,10 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
383
379
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
384
380
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
385
381
|
|
|
386
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
387
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
388
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/DeliveryOptionAccordionDeliveryInfo.browser.test.tsx [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
389
|
-
[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 6[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 62[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 30[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 5[2mms[22m[39m
|
|
390
386
|
[90mstderr[2m | test/sdk/account/refreshToken.browser.test.ts
|
|
391
387
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
392
388
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -395,18 +391,18 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
395
391
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
|
|
396
392
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
397
393
|
|
|
398
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/refreshToken.browser.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
399
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/StatusCard.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
400
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
401
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/DeliveryCard.browser.test.tsx [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
402
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/orders/DeliveryOptionAccordionProducts.browser.test.tsx [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
403
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/skeletons/ProductGridSkeleton.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
404
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
405
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
406
|
-
[32m✓[39m [30m[
|
|
407
|
-
[32m✓[39m [30m[
|
|
408
|
-
[32m✓[39m [30m[43m node [49m[39m test/server/content/service.test.ts [2m([22m[2m27 tests[22m[2m)[22m[32m
|
|
409
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/localization/useBindingSelector.test.tsx [2m([22m[2m22 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 5[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 93[2mms[22m[39m
|
|
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 34[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 33[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 30[2mms[22m[39m
|
|
400
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/localization/bindingPaths.test.ts [2m([22m[2m71 tests[22m[2m)[22m[32m 20[2mms[22m[39m
|
|
401
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/api/switch-contract.test.ts [2m([22m[2m61 tests[22m[2m)[22m[32m 147[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 141[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 26[2mms[22m[39m
|
|
404
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/content/service.test.ts [2m([22m[2m27 tests[22m[2m)[22m[32m 28[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 11[2mms[22m[39m
|
|
410
406
|
[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
|
|
411
407
|
[22m[39mFailed to fetch pickup points: Error: network
|
|
412
408
|
at [90m/home/runner/work/faststore/faststore/packages/core/[39mtest/sdk/deliveryPromise/provider.effect.test.tsx:250:30
|
|
@@ -420,21 +416,6 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
420
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)
|
|
421
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)
|
|
422
418
|
|
|
423
|
-
[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
|
|
424
|
-
[22m[39mFailed to fetch pickup points: Error: network
|
|
425
|
-
at [90m/home/runner/work/faststore/faststore/packages/core/[39mtest/sdk/deliveryPromise/provider.effect.test.tsx:332:30
|
|
426
|
-
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
|
|
427
|
-
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
|
|
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:1243:20
|
|
429
|
-
at new Promise (<anonymous>)
|
|
430
|
-
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)
|
|
431
|
-
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
|
|
432
|
-
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)
|
|
433
|
-
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)
|
|
434
|
-
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)
|
|
435
|
-
|
|
436
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/deliveryPromise/provider.effect.test.tsx [2m([22m[2m9 tests[22m[2m)[22m[32m 95[2mms[22m[39m
|
|
437
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/match-url.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
438
419
|
[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
|
|
439
420
|
[22m[39mGraphql execution returned with error: [
|
|
440
421
|
{
|
|
@@ -481,6 +462,19 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
481
462
|
{ message: [32m'bad'[39m, status: [33m400[39m, type: [32m'BadRequestError'[39m }
|
|
482
463
|
]
|
|
483
464
|
|
|
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
|
+
|
|
484
478
|
[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
|
|
485
479
|
[22m[39mGraphql execution returned with error: [ { message: [32m'missing'[39m, status: [33m404[39m, type: [32m'NotFoundError'[39m } ]
|
|
486
480
|
|
|
@@ -544,6 +538,7 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
544
538
|
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)
|
|
545
539
|
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)
|
|
546
540
|
|
|
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
|
|
547
542
|
[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
|
|
548
543
|
[22m[39mSomething unexpected occurred querying Graphql endpoint:
|
|
549
544
|
le [FastStoreError]: Unauthorized: Token expired. Please login again or refresh the page.
|
|
@@ -576,10 +571,11 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
576
571
|
extensions: { status: [33m401[39m, type: [32m'UnauthorizedError'[39m }
|
|
577
572
|
}
|
|
578
573
|
|
|
579
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
580
|
-
[32m✓[39m [30m[43m node [49m[39m test/pages/api/
|
|
581
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
582
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
574
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/deliveryPromise/provider.effect.test.tsx [2m([22m[2m9 tests[22m[2m)[22m[32m 62[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 27[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 104[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 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
|
|
583
579
|
[90mstderr[2m | test/components/search/SearchInputComponent.test.tsx
|
|
584
580
|
[22m[39mWarning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter?
|
|
585
581
|
|
|
@@ -643,63 +639,63 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
|
|
|
643
639
|
at Suspense
|
|
644
640
|
at Wrapper (/home/runner/work/faststore/faststore/packages/core/test/components/search/SearchInputComponent.test.tsx:106:20)
|
|
645
641
|
|
|
646
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/search/SearchInputComponent.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
647
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/refreshToken.test.ts [2m([22m[2m21 tests[22m[2m)[22m[32m
|
|
648
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountListQuotesTable.test.tsx [2m([22m[2m15 tests[22m[2m)[22m[33m
|
|
649
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/search/useSearchHistory.test.ts [2m([22m[2m13 tests[22m[2m)[22m[32m
|
|
642
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/search/SearchInputComponent.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[32m 57[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 10[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 307[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 29[2mms[22m[39m
|
|
650
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
|
|
651
647
|
[22m[39m{ extensions: { status: [33m401[39m } }
|
|
652
648
|
|
|
653
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
|
|
654
650
|
[22m[39m{ extensions: { status: [33m502[39m } }
|
|
655
651
|
|
|
656
|
-
[32m✓[39m [30m[43m node [49m[39m test/pages/pvt/account/cards/index.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
657
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/quoteFilters.test.ts [2m([22m[2m26 tests[22m[2m)[22m[32m
|
|
658
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/productJsonLd.test.ts [2m([22m[2m36 tests[22m[2m)[22m[32m
|
|
659
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/cookieCacheBusting.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m
|
|
660
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountListQuotes.test.tsx [2m([22m[2m11 tests[22m[2m)[22m[33m
|
|
661
|
-
[33m[2m✓[22m[39m navigates with the search term on blur [33m
|
|
662
|
-
[33m[2m✓[22m[39m navigates without a label param when the search is cleared [33m
|
|
663
|
-
[32m✓[39m [30m[43m node [49m[39m test/experimental/myAccountCmsServerSideProps.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
664
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/clearCookies.test.ts [2m([22m[2m20 tests[22m[2m)[22m[32m
|
|
652
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/pvt/account/cards/index.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
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
|
|
655
|
+
[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/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
|
|
658
|
+
[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/experimental/myAccountCmsServerSideProps.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
660
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/clearCookies.test.ts [2m([22m[2m20 tests[22m[2m)[22m[32m 18[2mms[22m[39m
|
|
665
661
|
[32m✓[39m [30m[43m node [49m[39m test/utils/multipleTemplates.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
666
662
|
[90mstderr[2m | test/sdk/account/useSetPassword.test.ts[2m > [22m[2museSetPassword[2m > [22m[2mmaps wrongcredentials error responses to the existing message
|
|
667
663
|
[22m[39mSet password request failed: Bad Request
|
|
668
664
|
|
|
669
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/useSetPassword.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
670
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderEntryOperation.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
671
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/localization/localizeRedirectDestination.test.ts [2m([22m[2m11 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
|
|
673
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuotesStatusSelector.test.tsx [2m([22m[2m14 tests[22m[2m)[22m[32m
|
|
674
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/localization/hreflang.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
675
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
676
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
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/sdk/redirects/index.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m
|
|
680
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderEntryUpload.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
681
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
682
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
683
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/trustedForwardedHost.test.ts [2m([22m[2m36 tests[22m[2m)[22m[32m
|
|
684
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/getDeliveryOptionLabel.test.ts [2m([22m[2m21 tests[22m[2m)[22m[32m
|
|
685
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/graphql/retryPolicy.test.ts [2m([22m[2m18 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 29[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 29[2mms[22m[39m
|
|
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/MyAccountQuotesFilterSlider.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m 93[2mms[22m[39m
|
|
669
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuotesStatusSelector.test.tsx [2m([22m[2m14 tests[22m[2m)[22m[32m 103[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 9[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 15[2mms[22m[39m
|
|
672
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/getMyAccountRoutes.test.ts [2m([22m[2m13 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
673
|
+
[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/components/quotes/MyAccountQuotesSelectedTags.test.tsx [2m([22m[2m10 tests[22m[2m)[22m[32m 84[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 45[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 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
|
|
678
|
+
[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
|
|
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 6[2mms[22m[39m
|
|
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
|
|
686
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
|
|
687
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/productJsonLdRendering.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
688
|
-
[32m✓[39m [30m[43m node [49m[39m test/server/index.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m
|
|
689
|
-
[33m[2m✓[22m[39m should handle options and execute [33m
|
|
690
|
-
[32m✓[39m [30m[43m node [49m[39m test/proxy.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
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/
|
|
683
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/productJsonLdRendering.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
684
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/index.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m 839[2mms[22m[39m
|
|
685
|
+
[33m[2m✓[22m[39m should handle options and execute [33m 472[2mms[22m[39m
|
|
686
|
+
[32m✓[39m [30m[43m node [49m[39m test/proxy.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 21[2mms[22m[39m
|
|
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
|
|
690
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/shouldBypassRefreshToken.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
694
691
|
[32m✓[39m [30m[43m node [49m[39m test/server/webops-api.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
695
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
696
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
697
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/localization/store-url.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
698
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
699
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
700
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
701
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
702
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/auth/useAuth.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 37[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 21[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 7[2mms[22m[39m
|
|
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 9[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 4[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 5[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 21[2mms[22m[39m
|
|
703
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
|
|
704
700
|
[22m[39mhttps://storeframework.vtexcommercestable.com.br/api/vtexid/credential/validate {
|
|
705
701
|
headers: { [32m'content-type'[39m: [32m'application/json'[39m, [32m'X-FORWARDED-HOST'[39m: [32m''[39m },
|
|
@@ -707,41 +703,43 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
|
|
|
707
703
|
method: [32m'POST'[39m
|
|
708
704
|
} { status: [33m401[39m, statusText: [32m'Unauthorized'[39m, headers: {} }
|
|
709
705
|
|
|
710
|
-
[32m✓[39m [30m[43m node [49m[39m test/server/storeDirectives.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
711
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/
|
|
712
|
-
[32m✓[39m [30m[43m node [49m[39m test/server/rootSpan.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
713
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
714
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
715
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
716
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/account/Layout.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
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/recommendations/vrn.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
720
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
721
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/getIsB2BBuyer.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m
|
|
722
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
723
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
724
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
725
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/
|
|
726
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
727
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
728
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
729
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/
|
|
730
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
731
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
732
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
733
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
734
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/
|
|
735
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
736
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
737
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
738
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
706
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/storeDirectives.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 95[2mms[22m[39m
|
|
707
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/mergeDiscoveryConfig.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
708
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/rootSpan.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 24[2mms[22m[39m
|
|
709
|
+
[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 5[2mms[22m[39m
|
|
711
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/search/SearchInput.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
712
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/account/Layout.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[32m 52[2mms[22m[39m
|
|
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
|
+
[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/sdk/recommendations/vrn.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
716
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/region/useRegion.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
717
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/getIsB2BBuyer.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
718
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/retry.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
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 182[2mms[22m[39m
|
|
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 4[2mms[22m[39m
|
|
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
|
+
[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 40[2mms[22m[39m
|
|
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 26[2mms[22m[39m
|
|
728
|
+
[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/sdk/session/toSessionInput.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 3[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 2[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 3[2mms[22m[39m
|
|
732
|
+
[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/components/auth/ProfileChallenge.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 22[2mms[22m[39m
|
|
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
|
|
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
|
+
[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
|
|
739
737
|
[32m✓[39m [30m[43m node [49m[39m test/instrumentation.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
740
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/account/orders/orderDetailsLabels.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
741
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/clearPersistedSessionState.test.ts [2m([22m[2m1 test[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 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 7[2mms[22m[39m
|
|
742
740
|
|
|
743
|
-
[2m Test Files [22m [1m[
|
|
744
|
-
[2m Tests [22m [1m[
|
|
745
|
-
[2m Start at [22m
|
|
746
|
-
[2m Duration [22m
|
|
741
|
+
[2m Test Files [22m [1m[32m149 passed[39m[22m[90m (149)[39m
|
|
742
|
+
[2m Tests [22m [1m[32m1265 passed[39m[22m[90m (1265)[39m
|
|
743
|
+
[2m Start at [22m 15:46:31
|
|
744
|
+
[2m Duration [22m 53.00s[2m (transform 12.00s, setup 0ms, import 47.46s, tests 18.78s, environment 64.60s)[22m
|
|
747
745
|
|
package/AGENTS.md
CHANGED
|
@@ -141,6 +141,13 @@ import { Icon } from '@faststore/ui'
|
|
|
141
141
|
|
|
142
142
|
This project uses icons from [Phosphor Icons](https://phosphoricons.com/).
|
|
143
143
|
|
|
144
|
+
## Discovery config merge
|
|
145
|
+
|
|
146
|
+
`discovery.config.js` merges the default config with the store's through `mergeDiscoveryConfig` (`src/utils/mergeDiscoveryConfig.js`), which works like `deepmerge`: arrays are concatenated. The one exception is `api.subDomainPrefix`:
|
|
147
|
+
|
|
148
|
+
- Not set, or any non-empty value: appended to the default `['www']`, so `www.` is always stripped from the host sent to Checkout.
|
|
149
|
+
- `[]`: replaces the default, so no prefix is stripped and Checkout cookies are set on the storefront host (e.g. `www.store.com`) instead of the root domain. A Checkout served from another host (`secureSubdomain`) does not receive them, and `next.config.js` warns about that setup.
|
|
150
|
+
|
|
144
151
|
## Tests
|
|
145
152
|
|
|
146
153
|
`@faststore/core` separates tests by environment:
|
package/CHANGELOG.md
CHANGED
|
@@ -3,8 +3,40 @@
|
|
|
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.0](https://github.com/vtex/faststore/compare/v4.11.2...v4.11.3-dev.0) (2026-11-09)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **core:** let the store config override api.subDomainPrefix ([e0eeb07](https://github.com/vtex/faststore/commit/e0eeb0754b5ad75e20b3fe1ef0e16d3acb5f5b3b))
|
|
11
|
+
- **core:** move the subDomainPrefix warning to its own module ([cad5c20](https://github.com/vtex/faststore/commit/cad5c2084e335e7ec1e3404c6a078bd875949f86))
|
|
12
|
+
- **core:** only let an empty subDomainPrefix replace the default ([e2c0c0d](https://github.com/vtex/faststore/commit/e2c0c0d1d5e5c81ed149da9adcc9b3d8cc8a2c30))
|
|
13
|
+
- **core:** scope the subDomainPrefix override to api and warn on invalid URLs ([2f0e027](https://github.com/vtex/faststore/commit/2f0e0276f8d2bcd61a5047652ea6529ef127bdb9))
|
|
14
|
+
- **core:** use a Set for the overridden discovery config keys ([1d74a1e](https://github.com/vtex/faststore/commit/1d74a1eb4bf42f5e1dc85b851fecb534498c060e))
|
|
15
|
+
|
|
6
16
|
## [4.11.2-dev.1](https://github.com/vtex/faststore/compare/v4.11.2-dev.0...v4.11.2-dev.1) (2026-11-05)
|
|
7
17
|
|
|
18
|
+
## [4.11.2-dev.0](https://github.com/vtex/faststore/compare/v4.11.1...v4.11.2-dev.0) (2026-11-05)
|
|
19
|
+
|
|
20
|
+
## [4.11.1-dev.1](https://github.com/vtex/faststore/compare/v4.11.1-dev.0...v4.11.1-dev.1) (2026-11-04)
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
- **api:** apply [@auth](https://github.com/auth) and [@cache](https://github.com/cache)Control to store schema extensions ([#3524](https://github.com/vtex/faststore/issues/3524)) ([f6abd0d](https://github.com/vtex/faststore/commit/f6abd0d4f7312794a4195ce693526b539550275e)), closes [#3111](https://github.com/vtex/faststore/issues/3111) [/github.com/vtex/faststore/pull/3524#issuecomment-6258456970](https://github.com//github.com/vtex/faststore/pull/3524/issues/issuecomment-6258456970) [#3111](https://github.com/vtex/faststore/issues/3111) [#3063](https://github.com/vtex/faststore/issues/3063)
|
|
25
|
+
|
|
26
|
+
## [4.11.1-dev.0](https://github.com/vtex/faststore/compare/v4.11.0...v4.11.1-dev.0) (2026-11-03)
|
|
27
|
+
|
|
28
|
+
## [4.10.3-dev.1](https://github.com/vtex/faststore/compare/v4.10.3-dev.0...v4.10.3-dev.1) (2026-10-29)
|
|
29
|
+
|
|
30
|
+
## [4.10.3-dev.0](https://github.com/vtex/faststore/compare/v4.10.2...v4.10.3-dev.0) (2026-10-29)
|
|
31
|
+
|
|
32
|
+
## [4.11.2-dev.1](https://github.com/vtex/faststore/compare/v4.11.2-dev.0...v4.11.2-dev.1) (2026-11-05)
|
|
33
|
+
|
|
34
|
+
## [4.11.2](https://github.com/vtex/faststore/compare/v4.11.1...v4.11.2) (2026-11-09)
|
|
35
|
+
|
|
36
|
+
**Note:** Version bump only for package @faststore/core
|
|
37
|
+
|
|
38
|
+
## [4.11.1](https://github.com/vtex/faststore/compare/v4.11.0...v4.11.1) (2026-11-05)
|
|
39
|
+
|
|
8
40
|
**Note:** Version bump only for package @faststore/core
|
|
9
41
|
|
|
10
42
|
## [4.11.2-dev.0](https://github.com/vtex/faststore/compare/v4.11.1...v4.11.2-dev.0) (2026-11-05)
|
package/discovery.config.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
const defaultConfig = require('./discovery.config.default')
|
|
2
2
|
const starterConfig = require('./src/customizations/discovery.config')
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const { mergeDiscoveryConfig } = require('./src/utils/mergeDiscoveryConfig')
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @type {typeof defaultConfig & Record<string, any>}
|
|
8
8
|
* */
|
|
9
|
-
let finalConfig =
|
|
9
|
+
let finalConfig = mergeDiscoveryConfig(defaultConfig, starterConfig)
|
|
10
10
|
|
|
11
11
|
try {
|
|
12
|
-
finalConfig =
|
|
12
|
+
finalConfig = mergeDiscoveryConfig(
|
|
13
|
+
finalConfig,
|
|
14
|
+
require('./discovery.config.local')
|
|
15
|
+
)
|
|
13
16
|
} catch (error) {
|
|
14
17
|
if (error?.code !== 'MODULE_NOT_FOUND') {
|
|
15
18
|
throw error
|
package/next.config.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
const path = require('node:path')
|
|
2
2
|
const storeConfig = require('./discovery.config')
|
|
3
|
+
const {
|
|
4
|
+
getSubDomainPrefixWarning,
|
|
5
|
+
} = require('./src/utils/subDomainPrefixWarning')
|
|
3
6
|
const { buildI18nDomains } = require('./scripts/i18n')
|
|
4
7
|
|
|
5
8
|
// Load locales settings (generated by CLI during build)
|
|
@@ -16,6 +19,9 @@ console.log(`
|
|
|
16
19
|
AccountID: ${storeConfig.api?.storeId ?? 'Unknown'}
|
|
17
20
|
`)
|
|
18
21
|
|
|
22
|
+
const subDomainPrefixWarning = getSubDomainPrefixWarning(storeConfig)
|
|
23
|
+
if (subDomainPrefixWarning) console.warn(subDomainPrefixWarning)
|
|
24
|
+
|
|
19
25
|
/**
|
|
20
26
|
* @type {import('next').NextConfig}
|
|
21
27
|
* */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.3-dev.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@qwik.dev/partytown": "^0.14.0",
|
|
48
48
|
"@types/react": "^18.3.27",
|
|
49
49
|
"@vtex/client-cms": "^0.2.16",
|
|
50
|
-
"@vtex/client-cp": "0.
|
|
50
|
+
"@vtex/client-cp": "0.7.1",
|
|
51
51
|
"@vtex/prettier-config": "1.0.0",
|
|
52
52
|
"autoprefixer": "^10.4.0",
|
|
53
53
|
"cookie": "^0.7.0",
|
|
@@ -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/
|
|
74
|
-
"@faststore/
|
|
75
|
-
"@faststore/sdk": "4.11.
|
|
76
|
-
"@faststore/
|
|
77
|
-
"@faststore/diagnostics": "4.11.
|
|
73
|
+
"@faststore/api": "4.11.3-dev.0",
|
|
74
|
+
"@faststore/lighthouse": "4.11.3-dev.0",
|
|
75
|
+
"@faststore/sdk": "4.11.3-dev.0",
|
|
76
|
+
"@faststore/ui": "4.11.3-dev.0",
|
|
77
|
+
"@faststore/diagnostics": "4.11.3-dev.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@cypress/code-coverage": "^3.12.1",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const deepmerge = require('deepmerge')
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Merges discovery configs like `deepmerge`, except that an empty
|
|
5
|
+
* `api.subDomainPrefix` replaces the default instead of being appended to it.
|
|
6
|
+
*
|
|
7
|
+
* deepmerge concatenates arrays, so the default `['www']` is always kept. An
|
|
8
|
+
* empty array is how a store asks for no prefix to be stripped from the host
|
|
9
|
+
* sent to Checkout. Any other value is still appended to the default, as
|
|
10
|
+
* before, to keep the current behavior of existing stores.
|
|
11
|
+
*/
|
|
12
|
+
function mergeDiscoveryConfig(target, source) {
|
|
13
|
+
const merged = deepmerge(target, source)
|
|
14
|
+
const subDomainPrefix = source?.api?.subDomainPrefix
|
|
15
|
+
|
|
16
|
+
if (Array.isArray(subDomainPrefix) && subDomainPrefix.length === 0) {
|
|
17
|
+
merged.api.subDomainPrefix = []
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return merged
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
module.exports = { mergeDiscoveryConfig }
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const getHostname = (url) => {
|
|
2
|
+
try {
|
|
3
|
+
return new URL(url).hostname
|
|
4
|
+
} catch {
|
|
5
|
+
return undefined
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* With `api.subDomainPrefix: []`, Checkout cookies are set on the storefront
|
|
11
|
+
* host only, so a checkout served from another host (`secureSubdomain`) does
|
|
12
|
+
* not receive them. Returns a warning for that setup, or `undefined`.
|
|
13
|
+
*/
|
|
14
|
+
function getSubDomainPrefixWarning(config) {
|
|
15
|
+
const prefixes = config?.api?.subDomainPrefix
|
|
16
|
+
|
|
17
|
+
if (!Array.isArray(prefixes) || prefixes.length > 0) {
|
|
18
|
+
return undefined
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const invalidUrls = ['storeUrl', 'secureSubdomain'].filter(
|
|
22
|
+
(key) => config[key] && !getHostname(config[key])
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
if (invalidUrls.length > 0) {
|
|
26
|
+
return (
|
|
27
|
+
`[FastStore] api.subDomainPrefix is [], but ${invalidUrls.join(' and ')} could not be parsed as a URL, ` +
|
|
28
|
+
`so it was not possible to check where Checkout cookies are sent. Use a full URL (e.g. https://www.store.com).`
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const storeHost = getHostname(config.storeUrl)
|
|
33
|
+
const secureHost = getHostname(config.secureSubdomain)
|
|
34
|
+
|
|
35
|
+
if (!storeHost || !secureHost || storeHost === secureHost) {
|
|
36
|
+
return undefined
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
`[FastStore] api.subDomainPrefix is [], so Checkout cookies are set on ${storeHost} only ` +
|
|
41
|
+
`and are not sent to the secureSubdomain (${secureHost}). If the checkout runs on ${secureHost}, ` +
|
|
42
|
+
`remove api.subDomainPrefix or set it to the prefixes to strip (e.g. ['www']).`
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
module.exports = { getSubDomainPrefixWarning }
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import defaultConfig from '../../discovery.config.default'
|
|
3
|
+
import { mergeDiscoveryConfig } from '../../src/utils/mergeDiscoveryConfig'
|
|
4
|
+
|
|
5
|
+
describe('mergeDiscoveryConfig', () => {
|
|
6
|
+
describe('api.subDomainPrefix', () => {
|
|
7
|
+
it('keeps the default when the store does not set it', () => {
|
|
8
|
+
const config = mergeDiscoveryConfig(defaultConfig, {
|
|
9
|
+
api: { storeId: 'store' },
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
expect(config.api.subDomainPrefix).toEqual(['www'])
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
it('lets the store clear the prefixes with an empty array', () => {
|
|
16
|
+
const config = mergeDiscoveryConfig(defaultConfig, {
|
|
17
|
+
api: { subDomainPrefix: [] },
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
expect(config.api.subDomainPrefix).toEqual([])
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
it('keeps appending non-empty arrays to the default', () => {
|
|
24
|
+
const config = mergeDiscoveryConfig(defaultConfig, {
|
|
25
|
+
api: { subDomainPrefix: ['shop'] },
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
expect(config.api.subDomainPrefix).toEqual(['www', 'shop'])
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it('applies to every merge in the chain', () => {
|
|
32
|
+
const storeConfig = mergeDiscoveryConfig(defaultConfig, {
|
|
33
|
+
api: { subDomainPrefix: ['shop'] },
|
|
34
|
+
})
|
|
35
|
+
const config = mergeDiscoveryConfig(storeConfig, {
|
|
36
|
+
api: { subDomainPrefix: [] },
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
expect(config.api.subDomainPrefix).toEqual([])
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
it('keeps merging the other api fields', () => {
|
|
44
|
+
const config = mergeDiscoveryConfig(defaultConfig, {
|
|
45
|
+
api: { storeId: 'store', subDomainPrefix: [] },
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
expect(config.api.storeId).toBe('store')
|
|
49
|
+
expect(config.api.environment).toBe(defaultConfig.api.environment)
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
it('keeps concatenating the other arrays', () => {
|
|
53
|
+
const config = mergeDiscoveryConfig({ list: ['a'] }, { list: [] })
|
|
54
|
+
|
|
55
|
+
expect(config.list).toEqual(['a'])
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
it('only clears subDomainPrefix under api', () => {
|
|
59
|
+
const config = mergeDiscoveryConfig(
|
|
60
|
+
{ api: { subDomainPrefix: ['www'] }, other: { subDomainPrefix: ['a'] } },
|
|
61
|
+
{ api: { subDomainPrefix: [] }, other: { subDomainPrefix: [] } }
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
expect(config.api.subDomainPrefix).toEqual([])
|
|
65
|
+
expect(config.other.subDomainPrefix).toEqual(['a'])
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
it('does not mutate the default config', () => {
|
|
69
|
+
mergeDiscoveryConfig(defaultConfig, { api: { subDomainPrefix: [] } })
|
|
70
|
+
|
|
71
|
+
expect(defaultConfig.api.subDomainPrefix).toEqual(['www'])
|
|
72
|
+
})
|
|
73
|
+
})
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import { getSubDomainPrefixWarning } from '../../src/utils/subDomainPrefixWarning'
|
|
3
|
+
|
|
4
|
+
describe('getSubDomainPrefixWarning', () => {
|
|
5
|
+
const store = (
|
|
6
|
+
subDomainPrefix: string[] | undefined,
|
|
7
|
+
secureSubdomain: string,
|
|
8
|
+
storeUrl = 'https://www.store.com'
|
|
9
|
+
) => ({ storeUrl, secureSubdomain, api: { subDomainPrefix } })
|
|
10
|
+
|
|
11
|
+
it('warns when the prefixes are cleared and checkout is on another host', () => {
|
|
12
|
+
expect(
|
|
13
|
+
getSubDomainPrefixWarning(store([], 'https://secure.store.com'))
|
|
14
|
+
).toContain('secure.store.com')
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
it('does not warn when checkout is on the storefront host', () => {
|
|
18
|
+
expect(
|
|
19
|
+
getSubDomainPrefixWarning(store([], 'https://www.store.com'))
|
|
20
|
+
).toBeUndefined()
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
it('does not warn when the store keeps any prefix', () => {
|
|
24
|
+
expect(
|
|
25
|
+
getSubDomainPrefixWarning(store(['www'], 'https://secure.store.com'))
|
|
26
|
+
).toBeUndefined()
|
|
27
|
+
expect(
|
|
28
|
+
getSubDomainPrefixWarning(store(undefined, 'https://secure.store.com'))
|
|
29
|
+
).toBeUndefined()
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
it('does not warn when secureSubdomain is not set', () => {
|
|
33
|
+
expect(getSubDomainPrefixWarning(store([], ''))).toBeUndefined()
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
it('warns when secureSubdomain is not a valid URL', () => {
|
|
37
|
+
expect(getSubDomainPrefixWarning(store([], 'secure.store.com'))).toContain(
|
|
38
|
+
'secureSubdomain could not be parsed'
|
|
39
|
+
)
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
it('warns when storeUrl is not a valid URL', () => {
|
|
43
|
+
expect(
|
|
44
|
+
getSubDomainPrefixWarning(
|
|
45
|
+
store([], 'https://secure.store.com', 'www.store.com')
|
|
46
|
+
)
|
|
47
|
+
).toContain('storeUrl could not be parsed')
|
|
48
|
+
})
|
|
49
|
+
})
|