@shopbite-de/storefront 1.23.2 → 1.24.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/.env.example +19 -0
- package/.github/workflows/build.yaml +1 -1
- package/.github/workflows/ci.yaml +6 -3
- package/.nuxtrc +1 -1
- package/CLAUDE.md +41 -3
- package/README.md +139 -40
- package/api-gen.config.json +9 -0
- package/api-types/storeApiSchema.shopbite.overrides.json +35 -0
- package/api-types/storeApiTypes.d.ts +95 -81
- package/app/app.vue +37 -53
- package/app/assets/css/main.css +20 -4
- package/app/components/Address/Fields.vue +2 -21
- package/app/components/AnimatedSection.vue +9 -4
- package/app/components/BottomNavi.vue +9 -2
- package/app/components/Cart/Item.vue +21 -10
- package/app/components/Category/Breadcrumb.vue +11 -12
- package/app/components/Category/Header.vue +9 -3
- package/app/components/Category/Listing.vue +51 -42
- package/app/components/Checkout/PaymentAndDelivery.vue +19 -3
- package/app/components/Checkout/Summary.vue +65 -1
- package/app/components/Cta.vue +4 -2
- package/app/components/Food/MarqueeItem.vue +20 -8
- package/app/components/Footer/Contact.vue +78 -0
- package/app/components/Footer/StoreStatus.vue +30 -0
- package/app/components/Footer.vue +2 -1
- package/app/components/Header/Body.vue +1 -1
- package/app/components/Header/Right.vue +27 -13
- package/app/components/Header/Title.vue +1 -0
- package/app/components/Header.vue +5 -15
- package/app/components/Hero.vue +45 -2
- package/app/components/ImageGallery.vue +11 -5
- package/app/components/Product/Card.vue +9 -3
- package/app/components/Product/CardFooter.vue +22 -12
- package/app/components/User/RegistrationForm.vue +0 -1
- package/app/components/Wishlist.vue +2 -15
- package/app/composables/useAddToCart.ts +13 -13
- package/app/composables/useAddressAutocomplete.ts +12 -19
- package/app/composables/useAddressSuggestionArea.ts +16 -0
- package/app/composables/useAddressValidation.ts +3 -19
- package/app/composables/useCartMutations.ts +168 -0
- package/app/composables/{useCategory.ts → useCategoryById.ts} +1 -1
- package/app/composables/useCategorySeo.ts +22 -25
- package/app/composables/useCheckoutMethodGuard.ts +201 -0
- package/app/composables/useMatomo.ts +25 -0
- package/app/composables/useMatomoConfig.ts +12 -0
- package/app/composables/useMenuSectionSchema.ts +55 -0
- package/app/composables/useNavigation.ts +12 -9
- package/app/composables/usePageSeo.ts +50 -0
- package/app/composables/useRestaurantSchema.ts +64 -0
- package/app/composables/useScrollAnimation.ts +39 -8
- package/app/composables/useSearchTracking.ts +33 -0
- package/app/composables/useSeoUrlRoute.ts +58 -0
- package/app/composables/useSortingSelection.ts +28 -0
- package/app/composables/useStoreStatus.ts +48 -0
- package/app/composables/useTrackEvent.ts +29 -23
- package/app/pages/[...all].vue +4 -4
- package/app/pages/account/recover/password/index.vue +1 -0
- package/app/pages/anmelden.vue +4 -0
- package/app/pages/bestellung/[id]/erfolg.vue +1 -5
- package/app/pages/bestellung/[id]/fehler.vue +2 -2
- package/app/pages/bestellung/[id]/index.vue +10 -4
- package/app/pages/bestellung/bestaetigen.vue +1 -5
- package/app/pages/bestellung/warenkorb.vue +1 -5
- package/app/pages/bestellung/zahlung-versand.vue +1 -5
- package/app/pages/c/[...all].vue +2 -35
- package/app/pages/index.vue +25 -13
- package/app/pages/kontakt.vue +4 -0
- package/app/pages/konto/adressen.vue +4 -0
- package/app/pages/konto/bestellung/[id].vue +4 -0
- package/app/pages/konto/bestellungen.vue +4 -0
- package/app/pages/konto/index.vue +4 -0
- package/app/pages/konto/profil.vue +4 -0
- package/app/pages/maintenance.vue +6 -0
- package/app/pages/merkliste.vue +1 -7
- package/app/pages/passwort-vergessen.vue +1 -0
- package/app/pages/registrierung/bestaetigen.vue +4 -0
- package/app/pages/registrierung/index.vue +4 -0
- package/app/pages/speisekarte/[...all].vue +2 -36
- package/app/pages/suche.vue +24 -21
- package/app/plugins/matomo.ts +35 -0
- package/app/utils/hydrateWhenVisible.ts +20 -0
- package/app/utils/media.ts +33 -0
- package/app/utils/openingHours.ts +67 -0
- package/app/utils/schema.ts +235 -0
- package/app/utils/seo.ts +56 -0
- package/app/utils/seoPath.ts +57 -0
- package/content/index.yml +10 -9
- package/content.config.ts +3 -0
- package/docs/notes/2026-07-05-issue-259-matomo-broken.md +14 -0
- package/docs/notes/2026-09-07-dependency-update.md +113 -0
- package/docs/notes/2026-09-08-issue-240-shipping-method-blocked.md +83 -0
- package/docs/notes/2026-09-08-issue-241-cart-lock-conflicts.md +63 -0
- package/docs/notes/2026-09-08-issue-244-category-url-trailing-slash.md +65 -0
- package/docs/notes/2026-09-08-issue-276-payment-method-blocked.md +39 -0
- package/docs/notes/2026-09-08-issue-277-typecheck.md +99 -0
- package/docs/notes/2026-09-10-issue-250-animated-section.md +23 -0
- package/docs/notes/2026-09-10-issue-251-shop-data-in-base-layer.md +30 -0
- package/docs/notes/2026-09-10-issue-272-restaurant-schema.md +27 -0
- package/docs/notes/2026-09-10-issue-273-performance-media.md +64 -0
- package/docs/notes/2026-09-10-issue-274-seo-basics.md +49 -0
- package/docs/notes/2026-09-10-issue-275-accessibility.md +46 -0
- package/docs/notes/2026-09-10-issue-290-footer-nap.md +28 -0
- package/docs/notes/2026-09-10-issue-291-seo-url-trailing-slash.md +24 -0
- package/docs/notes/2026-09-10-issue-294-matomo-without-config.md +33 -0
- package/docs/notes/2026-09-10-issue-295-search-hydration-mismatch.md +25 -0
- package/docs/notes/2026-09-10-issue-296-track-direct-search.md +19 -0
- package/docs/notes/2026-09-10-issue-312-store-api-criteria-post.md +64 -0
- package/docs/notes/2026-09-10-issue-313-wishlist-scoped-tailwind.md +29 -0
- package/docs/notes/2026-09-10-issue-314-mobile-js-cost.md +119 -0
- package/node.dockerfile +5 -2
- package/nuxt.config.ts +74 -15
- package/package.json +45 -42
- package/patches/@shopware__nuxt-module@1.5.1.patch +32 -0
- package/pnpm-workspace.yaml +2 -0
- package/public/hero-poster.webp +0 -0
- package/server/api/__sitemap__/urls.get.ts +49 -0
- package/server/api/category/[categoryId].get.ts +20 -9
- package/server/api/content/home.get.ts +14 -0
- package/server/api/content/page.get.ts +22 -0
- package/server/api/listing/[categoryId].get.ts +12 -18
- package/server/api/product/[productId]/cross-selling.get.ts +3 -9
- package/server/api/product/[productId].get.ts +4 -8
- package/server/plugins/site-url.ts +13 -0
- package/server/plugins/sitemap-trailing-slash.ts +26 -0
- package/server/utils/sitemap.ts +60 -0
- package/server/utils/storeApi.ts +34 -0
- package/shopware.d.ts +35 -11
- package/test/nuxt/AddressFields.test.ts +2 -73
- package/test/nuxt/AnimatedSection.test.ts +67 -0
- package/test/nuxt/CartItem.test.ts +95 -0
- package/test/nuxt/FooterContact.test.ts +102 -0
- package/test/nuxt/FooterStoreStatus.test.ts +48 -0
- package/test/nuxt/HeaderRight.test.ts +14 -10
- package/test/nuxt/Hero.test.ts +68 -0
- package/test/nuxt/PaymentAndDelivery.test.ts +67 -8
- package/test/nuxt/RegistrationForm.test.ts +20 -6
- package/test/nuxt/useAddToCart.test.ts +34 -1
- package/test/nuxt/useAddressAutocomplete.test.ts +2 -38
- package/test/nuxt/useAddressSuggestionArea.test.ts +27 -0
- package/test/nuxt/useBusinessHours.test.ts +1 -1
- package/test/nuxt/useCartMutations.test.ts +225 -0
- package/test/nuxt/useCategoryListing.test.ts +5 -3
- package/test/nuxt/useCheckoutMethodGuard.test.ts +386 -0
- package/test/nuxt/useProductConfigurator.test.ts +4 -1
- package/test/nuxt/useScrollAnimation.test.ts +55 -49
- package/test/nuxt/useSearchTracking.test.ts +71 -0
- package/test/nuxt/useSeoUrlRoute.test.ts +93 -0
- package/test/nuxt/useStoreStatus.test.ts +77 -0
- package/test/nuxt/useTrackEvent.test.ts +112 -0
- package/test/unit/media.spec.ts +49 -0
- package/test/unit/openingHours.spec.ts +59 -0
- package/test/unit/schema.spec.ts +243 -0
- package/test/unit/seo.spec.ts +107 -0
- package/test/unit/seoPath.spec.ts +116 -0
- package/test/unit/sitemap.spec.ts +88 -0
- package/test/unit/useCategorySeo.spec.ts +40 -30
- package/test/unit/useSortingSelection.spec.ts +39 -0
- package/tsconfig.json +1 -1
- package/app/composables/useValidCitiesForDelivery.ts +0 -12
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { describe, it, expect, vi, beforeEach } from "vitest";
|
|
2
|
+
import { mockNuxtImport } from "@nuxt/test-utils/runtime";
|
|
3
|
+
import { ref } from "vue";
|
|
4
|
+
import {
|
|
5
|
+
useCartMutations,
|
|
6
|
+
isCartLockedError,
|
|
7
|
+
} from "~/composables/useCartMutations";
|
|
8
|
+
import type { Schemas } from "#shopware";
|
|
9
|
+
|
|
10
|
+
const {
|
|
11
|
+
mockRefreshCart,
|
|
12
|
+
mockAddProducts,
|
|
13
|
+
mockChangeProductQuantity,
|
|
14
|
+
mockRemoveItem,
|
|
15
|
+
mockToastAdd,
|
|
16
|
+
} = vi.hoisted(() => ({
|
|
17
|
+
mockRefreshCart: vi.fn(),
|
|
18
|
+
mockAddProducts: vi.fn(),
|
|
19
|
+
mockChangeProductQuantity: vi.fn(),
|
|
20
|
+
mockRemoveItem: vi.fn(),
|
|
21
|
+
mockToastAdd: vi.fn(),
|
|
22
|
+
}));
|
|
23
|
+
|
|
24
|
+
// Read lazily inside the factory, i.e. after module initialisation.
|
|
25
|
+
const cart = ref<Schemas["Cart"] | undefined>();
|
|
26
|
+
|
|
27
|
+
mockNuxtImport("useCart", () => () => ({
|
|
28
|
+
cart,
|
|
29
|
+
refreshCart: mockRefreshCart,
|
|
30
|
+
addProducts: mockAddProducts,
|
|
31
|
+
changeProductQuantity: mockChangeProductQuantity,
|
|
32
|
+
removeItem: mockRemoveItem,
|
|
33
|
+
}));
|
|
34
|
+
|
|
35
|
+
mockNuxtImport("useToast", () => () => ({
|
|
36
|
+
add: mockToastAdd,
|
|
37
|
+
}));
|
|
38
|
+
|
|
39
|
+
function cartWith(items: { id: string; quantity: number }[]) {
|
|
40
|
+
return { lineItems: items } as unknown as Schemas["Cart"];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** A promise the test resolves by hand. */
|
|
44
|
+
function deferred<T = void>() {
|
|
45
|
+
let resolve!: (value: T) => void;
|
|
46
|
+
let reject!: (reason?: unknown) => void;
|
|
47
|
+
const promise = new Promise<T>((res, rej) => {
|
|
48
|
+
resolve = res;
|
|
49
|
+
reject = rej;
|
|
50
|
+
});
|
|
51
|
+
return { promise, resolve, reject };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const lockedError = Object.assign(new Error("locked"), {
|
|
55
|
+
status: 409,
|
|
56
|
+
details: { errors: [{ code: "CHECKOUT__CART_LOCKED" }] },
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
describe("isCartLockedError", () => {
|
|
60
|
+
it("detects the lock conflict by status or error code", () => {
|
|
61
|
+
expect(isCartLockedError(lockedError)).toBe(true);
|
|
62
|
+
expect(isCartLockedError({ status: 409 })).toBe(true);
|
|
63
|
+
expect(
|
|
64
|
+
isCartLockedError({
|
|
65
|
+
details: { errors: [{ code: "CHECKOUT__CART_LOCKED" }] },
|
|
66
|
+
}),
|
|
67
|
+
).toBe(true);
|
|
68
|
+
expect(isCartLockedError({ status: 500 })).toBe(false);
|
|
69
|
+
expect(isCartLockedError(new Error("x"))).toBe(false);
|
|
70
|
+
expect(isCartLockedError(undefined)).toBe(false);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
describe("useCartMutations", () => {
|
|
75
|
+
beforeEach(() => {
|
|
76
|
+
vi.clearAllMocks();
|
|
77
|
+
cart.value = cartWith([{ id: "li-1", quantity: 1 }]);
|
|
78
|
+
mockRefreshCart.mockResolvedValue(undefined);
|
|
79
|
+
mockAddProducts.mockResolvedValue({ id: "cart" });
|
|
80
|
+
mockRemoveItem.mockResolvedValue({ id: "cart" });
|
|
81
|
+
mockChangeProductQuantity.mockImplementation(
|
|
82
|
+
async ({ id, quantity }: { id: string; quantity: number }) => {
|
|
83
|
+
cart.value = cartWith([{ id, quantity }]);
|
|
84
|
+
return cart.value;
|
|
85
|
+
},
|
|
86
|
+
);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it("runs writes one after another in call order", async () => {
|
|
90
|
+
const first = deferred<Schemas["Cart"]>();
|
|
91
|
+
mockAddProducts.mockReturnValueOnce(first.promise);
|
|
92
|
+
|
|
93
|
+
const { addLineItems, removeLineItem, isMutating } = useCartMutations();
|
|
94
|
+
|
|
95
|
+
const add = addLineItems([{ id: "p1", quantity: 1, type: "product" }]);
|
|
96
|
+
const remove = removeLineItem({ id: "li-1" } as Schemas["LineItem"]);
|
|
97
|
+
await Promise.resolve();
|
|
98
|
+
|
|
99
|
+
expect(isMutating.value).toBe(true);
|
|
100
|
+
expect(mockAddProducts).toHaveBeenCalledTimes(1);
|
|
101
|
+
expect(mockRemoveItem).not.toHaveBeenCalled();
|
|
102
|
+
|
|
103
|
+
first.resolve({ id: "cart" } as unknown as Schemas["Cart"]);
|
|
104
|
+
await add;
|
|
105
|
+
await remove;
|
|
106
|
+
|
|
107
|
+
expect(mockRemoveItem).toHaveBeenCalledTimes(1);
|
|
108
|
+
expect(mockAddProducts.mock.invocationCallOrder[0]).toBeLessThan(
|
|
109
|
+
mockRemoveItem.mock.invocationCallOrder[0] as number,
|
|
110
|
+
);
|
|
111
|
+
expect(isMutating.value).toBe(false);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
it("coalesces rapid quantity changes into one request with the latest value", async () => {
|
|
115
|
+
const inFlight = deferred<Schemas["Cart"]>();
|
|
116
|
+
mockChangeProductQuantity.mockReturnValueOnce(inFlight.promise);
|
|
117
|
+
|
|
118
|
+
const { setQuantity } = useCartMutations();
|
|
119
|
+
|
|
120
|
+
const p1 = setQuantity("li-1", 2);
|
|
121
|
+
await Promise.resolve();
|
|
122
|
+
expect(mockChangeProductQuantity).toHaveBeenCalledWith({
|
|
123
|
+
id: "li-1",
|
|
124
|
+
quantity: 2,
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
// while the first request is in flight: three more clicks
|
|
128
|
+
const p2 = setQuantity("li-1", 3);
|
|
129
|
+
const p3 = setQuantity("li-1", 4);
|
|
130
|
+
const p4 = setQuantity("li-1", 5);
|
|
131
|
+
expect(p3).toBe(p2);
|
|
132
|
+
expect(p4).toBe(p2);
|
|
133
|
+
|
|
134
|
+
cart.value = cartWith([{ id: "li-1", quantity: 2 }]);
|
|
135
|
+
inFlight.resolve(cart.value);
|
|
136
|
+
await Promise.all([p1, p2, p3, p4]);
|
|
137
|
+
|
|
138
|
+
expect(mockChangeProductQuantity).toHaveBeenCalledTimes(2);
|
|
139
|
+
expect(mockChangeProductQuantity).toHaveBeenLastCalledWith({
|
|
140
|
+
id: "li-1",
|
|
141
|
+
quantity: 5,
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
it("skips the request when the latest value equals the cart quantity", async () => {
|
|
146
|
+
const { setQuantity } = useCartMutations();
|
|
147
|
+
|
|
148
|
+
await setQuantity("li-1", 1);
|
|
149
|
+
|
|
150
|
+
expect(mockChangeProductQuantity).not.toHaveBeenCalled();
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
it("retries once when the cart is locked", async () => {
|
|
154
|
+
vi.useFakeTimers();
|
|
155
|
+
try {
|
|
156
|
+
mockChangeProductQuantity
|
|
157
|
+
.mockRejectedValueOnce(lockedError)
|
|
158
|
+
.mockResolvedValueOnce(cartWith([{ id: "li-1", quantity: 3 }]));
|
|
159
|
+
|
|
160
|
+
const { setQuantity } = useCartMutations();
|
|
161
|
+
const pending = setQuantity("li-1", 3);
|
|
162
|
+
await vi.advanceTimersByTimeAsync(400);
|
|
163
|
+
await pending;
|
|
164
|
+
|
|
165
|
+
expect(mockChangeProductQuantity).toHaveBeenCalledTimes(2);
|
|
166
|
+
expect(mockToastAdd).not.toHaveBeenCalled();
|
|
167
|
+
} finally {
|
|
168
|
+
vi.useRealTimers();
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
it("syncs the shared cart from the write response", async () => {
|
|
173
|
+
const returned = cartWith([
|
|
174
|
+
{ id: "li-1", quantity: 1 },
|
|
175
|
+
{ id: "li-2", quantity: 1 },
|
|
176
|
+
]);
|
|
177
|
+
mockAddProducts.mockResolvedValueOnce(returned);
|
|
178
|
+
|
|
179
|
+
const { addLineItems } = useCartMutations();
|
|
180
|
+
await addLineItems([{ id: "p2", quantity: 1, type: "product" }]);
|
|
181
|
+
|
|
182
|
+
expect(mockRefreshCart).toHaveBeenCalledWith(returned);
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
it("does not retry other errors", async () => {
|
|
186
|
+
mockChangeProductQuantity.mockRejectedValueOnce(new Error("network"));
|
|
187
|
+
|
|
188
|
+
const { setQuantity } = useCartMutations();
|
|
189
|
+
await setQuantity("li-1", 3);
|
|
190
|
+
|
|
191
|
+
expect(mockChangeProductQuantity).toHaveBeenCalledTimes(1);
|
|
192
|
+
expect(mockToastAdd).toHaveBeenCalledWith(
|
|
193
|
+
expect.objectContaining({ title: "Menge konnte nicht geändert werden" }),
|
|
194
|
+
);
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
it("reports a final failure, re-syncs the cart and resolves undefined", async () => {
|
|
198
|
+
mockRemoveItem.mockRejectedValue(new Error("network"));
|
|
199
|
+
|
|
200
|
+
const { removeLineItem, isMutating } = useCartMutations();
|
|
201
|
+
const result = await removeLineItem({ id: "li-1" } as Schemas["LineItem"]);
|
|
202
|
+
|
|
203
|
+
expect(result).toBeUndefined();
|
|
204
|
+
expect(mockToastAdd).toHaveBeenCalledWith(
|
|
205
|
+
expect.objectContaining({
|
|
206
|
+
title: "Artikel konnte nicht entfernt werden",
|
|
207
|
+
color: "error",
|
|
208
|
+
}),
|
|
209
|
+
);
|
|
210
|
+
expect(mockRefreshCart).toHaveBeenCalledWith();
|
|
211
|
+
expect(isMutating.value).toBe(false);
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
it("keeps processing the queue after a failure", async () => {
|
|
215
|
+
mockAddProducts.mockRejectedValueOnce(new Error("boom"));
|
|
216
|
+
|
|
217
|
+
const { addLineItems } = useCartMutations();
|
|
218
|
+
const failed = addLineItems([{ id: "p1", quantity: 1, type: "product" }]);
|
|
219
|
+
const next = addLineItems([{ id: "p2", quantity: 1, type: "product" }]);
|
|
220
|
+
|
|
221
|
+
expect(await failed).toBeUndefined();
|
|
222
|
+
expect(await next).toEqual({ id: "cart" });
|
|
223
|
+
expect(mockAddProducts).toHaveBeenCalledTimes(2);
|
|
224
|
+
});
|
|
225
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
|
|
2
2
|
import { flushPromises } from "@vue/test-utils";
|
|
3
|
-
import { mountSuspended } from "@nuxt/test-utils/runtime";
|
|
3
|
+
import { mountSuspended, mockNuxtImport } from "@nuxt/test-utils/runtime";
|
|
4
4
|
import { defineComponent, h } from "vue";
|
|
5
5
|
import { useCategoryListing } from "~/composables/useCategoryListing";
|
|
6
6
|
|
|
@@ -8,6 +8,10 @@ import { useCategoryListing } from "~/composables/useCategoryListing";
|
|
|
8
8
|
|
|
9
9
|
const { mockFetch } = vi.hoisted(() => ({ mockFetch: vi.fn() }));
|
|
10
10
|
|
|
11
|
+
// `$fetch` is a Nuxt auto-import (bound at module load), so a global stub
|
|
12
|
+
// would not reach the composable.
|
|
13
|
+
mockNuxtImport("$fetch", () => mockFetch);
|
|
14
|
+
|
|
11
15
|
const emptyListing = (properties: string[] = []) => ({
|
|
12
16
|
elements: [],
|
|
13
17
|
aggregations: {},
|
|
@@ -50,12 +54,10 @@ async function mountWithListing(
|
|
|
50
54
|
|
|
51
55
|
describe("useCategoryListing", () => {
|
|
52
56
|
beforeEach(() => {
|
|
53
|
-
vi.stubGlobal("$fetch", mockFetch);
|
|
54
57
|
mockFetch.mockResolvedValue(emptyListing());
|
|
55
58
|
});
|
|
56
59
|
|
|
57
60
|
afterEach(() => {
|
|
58
|
-
vi.unstubAllGlobals();
|
|
59
61
|
vi.clearAllMocks();
|
|
60
62
|
});
|
|
61
63
|
|
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import { describe, it, expect, vi, beforeEach } from "vitest";
|
|
2
|
+
import { mockNuxtImport } from "@nuxt/test-utils/runtime";
|
|
3
|
+
import { ref } from "vue";
|
|
4
|
+
import {
|
|
5
|
+
useCheckoutMethodGuard,
|
|
6
|
+
hasBlockedShippingMethod,
|
|
7
|
+
hasBlockedPaymentMethod,
|
|
8
|
+
getCartErrors,
|
|
9
|
+
} from "~/composables/useCheckoutMethodGuard";
|
|
10
|
+
import type { Schemas } from "#shopware";
|
|
11
|
+
|
|
12
|
+
const {
|
|
13
|
+
mockRefreshCart,
|
|
14
|
+
mockGetShippingMethods,
|
|
15
|
+
mockSetShippingMethod,
|
|
16
|
+
mockGetPaymentMethods,
|
|
17
|
+
mockSetPaymentMethod,
|
|
18
|
+
mockToastAdd,
|
|
19
|
+
} = vi.hoisted(() => ({
|
|
20
|
+
mockRefreshCart: vi.fn(),
|
|
21
|
+
mockGetShippingMethods: vi.fn(),
|
|
22
|
+
mockSetShippingMethod: vi.fn(),
|
|
23
|
+
mockGetPaymentMethods: vi.fn(),
|
|
24
|
+
mockSetPaymentMethod: vi.fn(),
|
|
25
|
+
mockToastAdd: vi.fn(),
|
|
26
|
+
}));
|
|
27
|
+
|
|
28
|
+
// Reactive state shared with the mocked composables. Only read lazily
|
|
29
|
+
// inside the composable factories, i.e. after module initialisation.
|
|
30
|
+
const cart = ref<Schemas["Cart"] | undefined>();
|
|
31
|
+
const sessionContext = ref<unknown>();
|
|
32
|
+
const selectedShippingMethod = ref<Schemas["ShippingMethod"] | null>(null);
|
|
33
|
+
const selectedPaymentMethod = ref<Schemas["PaymentMethod"] | null>(null);
|
|
34
|
+
|
|
35
|
+
mockNuxtImport("useCart", () => () => ({
|
|
36
|
+
cart,
|
|
37
|
+
refreshCart: mockRefreshCart,
|
|
38
|
+
}));
|
|
39
|
+
|
|
40
|
+
mockNuxtImport("useCheckout", () => () => ({
|
|
41
|
+
getShippingMethods: mockGetShippingMethods,
|
|
42
|
+
setShippingMethod: mockSetShippingMethod,
|
|
43
|
+
selectedShippingMethod,
|
|
44
|
+
getPaymentMethods: mockGetPaymentMethods,
|
|
45
|
+
setPaymentMethod: mockSetPaymentMethod,
|
|
46
|
+
selectedPaymentMethod,
|
|
47
|
+
}));
|
|
48
|
+
|
|
49
|
+
mockNuxtImport("useSessionContext", () => () => ({
|
|
50
|
+
sessionContext,
|
|
51
|
+
}));
|
|
52
|
+
|
|
53
|
+
mockNuxtImport("useToast", () => () => ({
|
|
54
|
+
add: mockToastAdd,
|
|
55
|
+
}));
|
|
56
|
+
|
|
57
|
+
const delivery = {
|
|
58
|
+
id: "sm-delivery",
|
|
59
|
+
name: "Lieferung",
|
|
60
|
+
position: 1,
|
|
61
|
+
} as Schemas["ShippingMethod"];
|
|
62
|
+
const pickup = {
|
|
63
|
+
id: "sm-pickup",
|
|
64
|
+
name: "Abholung",
|
|
65
|
+
position: 2,
|
|
66
|
+
} as Schemas["ShippingMethod"];
|
|
67
|
+
|
|
68
|
+
const cash = {
|
|
69
|
+
id: "pm-cash",
|
|
70
|
+
name: "Cash",
|
|
71
|
+
distinguishableName: "Barzahlung",
|
|
72
|
+
} as Schemas["PaymentMethod"];
|
|
73
|
+
const paypal = {
|
|
74
|
+
id: "pm-paypal",
|
|
75
|
+
name: "PayPal",
|
|
76
|
+
distinguishableName: "PayPal",
|
|
77
|
+
} as Schemas["PaymentMethod"];
|
|
78
|
+
|
|
79
|
+
const shippingBlocked = {
|
|
80
|
+
code: 0,
|
|
81
|
+
key: "shipping-method-blocked-Lieferung",
|
|
82
|
+
level: 10 as const,
|
|
83
|
+
message: "Shipping method Lieferung not available. Reason: not allowed",
|
|
84
|
+
messageKey: "shipping-method-blocked",
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const paymentBlocked = {
|
|
88
|
+
code: 0,
|
|
89
|
+
key: "payment-method-blocked-Barzahlung",
|
|
90
|
+
level: 10 as const,
|
|
91
|
+
message: "Payment method Barzahlung not available. Reason: not allowed",
|
|
92
|
+
messageKey: "payment-method-blocked",
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
function cartWith(errors: Schemas["Cart"]["errors"]): Schemas["Cart"] {
|
|
96
|
+
return { errors } as unknown as Schemas["Cart"];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Makes the next cart refresh resolve to the given cart state. */
|
|
100
|
+
function nextRefreshSets(errors: Schemas["Cart"]["errors"]) {
|
|
101
|
+
mockRefreshCart.mockImplementationOnce(async () => {
|
|
102
|
+
cart.value = cartWith(errors);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
describe("useCheckoutMethodGuard", () => {
|
|
107
|
+
beforeEach(() => {
|
|
108
|
+
vi.clearAllMocks();
|
|
109
|
+
cart.value = cartWith({});
|
|
110
|
+
sessionContext.value = {
|
|
111
|
+
salesChannel: { shippingMethodId: pickup.id, paymentMethodId: paypal.id },
|
|
112
|
+
};
|
|
113
|
+
selectedShippingMethod.value = delivery;
|
|
114
|
+
selectedPaymentMethod.value = cash;
|
|
115
|
+
mockRefreshCart.mockResolvedValue(undefined);
|
|
116
|
+
mockSetShippingMethod.mockResolvedValue(undefined);
|
|
117
|
+
mockSetPaymentMethod.mockResolvedValue(undefined);
|
|
118
|
+
mockGetShippingMethods.mockResolvedValue(ref([delivery, pickup]));
|
|
119
|
+
mockGetPaymentMethods.mockResolvedValue(ref([cash, paypal]));
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
describe("cart error helpers", () => {
|
|
123
|
+
it("reads errors delivered as keyed object", () => {
|
|
124
|
+
const c = cartWith({ [shippingBlocked.key]: shippingBlocked });
|
|
125
|
+
expect(getCartErrors(c)).toEqual([shippingBlocked]);
|
|
126
|
+
expect(hasBlockedShippingMethod(c)).toBe(true);
|
|
127
|
+
expect(hasBlockedPaymentMethod(c)).toBe(false);
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
it("reads errors delivered as array", () => {
|
|
131
|
+
const c = cartWith([paymentBlocked]);
|
|
132
|
+
expect(hasBlockedPaymentMethod(c)).toBe(true);
|
|
133
|
+
expect(hasBlockedShippingMethod(c)).toBe(false);
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
it("ignores unrelated errors and missing carts", () => {
|
|
137
|
+
const c = cartWith({
|
|
138
|
+
"promotion-not-found-x": {
|
|
139
|
+
...shippingBlocked,
|
|
140
|
+
messageKey: "promotion-not-found",
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
expect(hasBlockedShippingMethod(c)).toBe(false);
|
|
144
|
+
expect(hasBlockedPaymentMethod(c)).toBe(false);
|
|
145
|
+
expect(hasBlockedShippingMethod(undefined)).toBe(false);
|
|
146
|
+
expect(hasBlockedPaymentMethod(undefined)).toBe(false);
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
describe("ensureAvailableShippingMethod", () => {
|
|
151
|
+
it("returns true without switching when nothing is blocked", async () => {
|
|
152
|
+
const { ensureAvailableShippingMethod, isShippingMethodBlocked } =
|
|
153
|
+
useCheckoutMethodGuard();
|
|
154
|
+
|
|
155
|
+
await expect(ensureAvailableShippingMethod()).resolves.toBe(true);
|
|
156
|
+
|
|
157
|
+
expect(mockRefreshCart).toHaveBeenCalledTimes(1);
|
|
158
|
+
expect(mockGetShippingMethods).not.toHaveBeenCalled();
|
|
159
|
+
expect(mockSetShippingMethod).not.toHaveBeenCalled();
|
|
160
|
+
expect(mockToastAdd).not.toHaveBeenCalled();
|
|
161
|
+
expect(isShippingMethodBlocked.value).toBe(false);
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
it("switches to the sales-channel default shipping method when blocked", async () => {
|
|
165
|
+
cart.value = cartWith({ [shippingBlocked.key]: shippingBlocked });
|
|
166
|
+
mockRefreshCart.mockImplementationOnce(async () => {});
|
|
167
|
+
nextRefreshSets({});
|
|
168
|
+
const extra = {
|
|
169
|
+
id: "sm-extra",
|
|
170
|
+
name: "Express",
|
|
171
|
+
position: 0,
|
|
172
|
+
} as Schemas["ShippingMethod"];
|
|
173
|
+
mockGetShippingMethods.mockResolvedValue(ref([extra, delivery, pickup]));
|
|
174
|
+
|
|
175
|
+
const { ensureAvailableShippingMethod } = useCheckoutMethodGuard();
|
|
176
|
+
|
|
177
|
+
await expect(ensureAvailableShippingMethod()).resolves.toBe(true);
|
|
178
|
+
|
|
179
|
+
expect(mockGetShippingMethods).toHaveBeenCalledWith({
|
|
180
|
+
forceReload: true,
|
|
181
|
+
});
|
|
182
|
+
expect(mockSetShippingMethod).toHaveBeenCalledWith({ id: pickup.id });
|
|
183
|
+
expect(mockRefreshCart).toHaveBeenCalledTimes(2);
|
|
184
|
+
expect(mockToastAdd).toHaveBeenCalledWith(
|
|
185
|
+
expect.objectContaining({
|
|
186
|
+
title: "Versandart geändert",
|
|
187
|
+
description:
|
|
188
|
+
"Lieferung ist nicht mehr verfügbar. Abholung wurde ausgewählt.",
|
|
189
|
+
}),
|
|
190
|
+
);
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
it("falls back to the first available method when the default is not available", async () => {
|
|
194
|
+
cart.value = cartWith({ [shippingBlocked.key]: shippingBlocked });
|
|
195
|
+
sessionContext.value = {
|
|
196
|
+
salesChannel: { shippingMethodId: delivery.id },
|
|
197
|
+
};
|
|
198
|
+
mockRefreshCart.mockImplementationOnce(async () => {});
|
|
199
|
+
nextRefreshSets({});
|
|
200
|
+
// The blocked method is still returned by the API in some setups
|
|
201
|
+
mockGetShippingMethods.mockResolvedValue(ref([delivery, pickup]));
|
|
202
|
+
|
|
203
|
+
const { ensureAvailableShippingMethod } = useCheckoutMethodGuard();
|
|
204
|
+
|
|
205
|
+
await expect(ensureAvailableShippingMethod()).resolves.toBe(true);
|
|
206
|
+
expect(mockSetShippingMethod).toHaveBeenCalledWith({ id: pickup.id });
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
it("returns false when no alternative shipping method exists", async () => {
|
|
210
|
+
cart.value = cartWith({ [shippingBlocked.key]: shippingBlocked });
|
|
211
|
+
mockGetShippingMethods.mockResolvedValue(ref([delivery]));
|
|
212
|
+
|
|
213
|
+
const { ensureAvailableShippingMethod, isShippingMethodBlocked } =
|
|
214
|
+
useCheckoutMethodGuard();
|
|
215
|
+
|
|
216
|
+
await expect(ensureAvailableShippingMethod()).resolves.toBe(false);
|
|
217
|
+
|
|
218
|
+
expect(mockSetShippingMethod).not.toHaveBeenCalled();
|
|
219
|
+
expect(mockToastAdd).not.toHaveBeenCalled();
|
|
220
|
+
expect(isShippingMethodBlocked.value).toBe(true);
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
it("returns false when the cart is still blocked after switching", async () => {
|
|
224
|
+
cart.value = cartWith({ [shippingBlocked.key]: shippingBlocked });
|
|
225
|
+
|
|
226
|
+
const { ensureAvailableShippingMethod } = useCheckoutMethodGuard();
|
|
227
|
+
|
|
228
|
+
await expect(ensureAvailableShippingMethod()).resolves.toBe(false);
|
|
229
|
+
|
|
230
|
+
expect(mockSetShippingMethod).toHaveBeenCalledWith({ id: pickup.id });
|
|
231
|
+
expect(mockToastAdd).not.toHaveBeenCalled();
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
describe("ensureAvailablePaymentMethod", () => {
|
|
236
|
+
it("switches to the sales-channel default payment method when blocked", async () => {
|
|
237
|
+
cart.value = cartWith({ [paymentBlocked.key]: paymentBlocked });
|
|
238
|
+
mockRefreshCart.mockImplementationOnce(async () => {});
|
|
239
|
+
nextRefreshSets({});
|
|
240
|
+
|
|
241
|
+
const { ensureAvailablePaymentMethod, isPaymentMethodBlocked } =
|
|
242
|
+
useCheckoutMethodGuard();
|
|
243
|
+
|
|
244
|
+
await expect(ensureAvailablePaymentMethod()).resolves.toBe(true);
|
|
245
|
+
|
|
246
|
+
expect(mockGetPaymentMethods).toHaveBeenCalledWith({
|
|
247
|
+
forceReload: true,
|
|
248
|
+
});
|
|
249
|
+
expect(mockSetPaymentMethod).toHaveBeenCalledWith({ id: paypal.id });
|
|
250
|
+
expect(mockSetShippingMethod).not.toHaveBeenCalled();
|
|
251
|
+
expect(isPaymentMethodBlocked.value).toBe(false);
|
|
252
|
+
expect(mockToastAdd).toHaveBeenCalledWith(
|
|
253
|
+
expect.objectContaining({
|
|
254
|
+
title: "Zahlart geändert",
|
|
255
|
+
description:
|
|
256
|
+
"Barzahlung ist nicht mehr verfügbar. PayPal wurde ausgewählt.",
|
|
257
|
+
}),
|
|
258
|
+
);
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
it("returns false when no alternative payment method exists", async () => {
|
|
262
|
+
cart.value = cartWith({ [paymentBlocked.key]: paymentBlocked });
|
|
263
|
+
mockGetPaymentMethods.mockResolvedValue(ref([cash]));
|
|
264
|
+
|
|
265
|
+
const { ensureAvailablePaymentMethod, isPaymentMethodBlocked } =
|
|
266
|
+
useCheckoutMethodGuard();
|
|
267
|
+
|
|
268
|
+
await expect(ensureAvailablePaymentMethod()).resolves.toBe(false);
|
|
269
|
+
|
|
270
|
+
expect(mockSetPaymentMethod).not.toHaveBeenCalled();
|
|
271
|
+
expect(mockToastAdd).not.toHaveBeenCalled();
|
|
272
|
+
expect(isPaymentMethodBlocked.value).toBe(true);
|
|
273
|
+
});
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
describe("ensureAvailableCheckoutMethods", () => {
|
|
277
|
+
it("refreshes the cart once and returns true when nothing is blocked", async () => {
|
|
278
|
+
const { ensureAvailableCheckoutMethods } = useCheckoutMethodGuard();
|
|
279
|
+
|
|
280
|
+
await expect(ensureAvailableCheckoutMethods()).resolves.toBe(true);
|
|
281
|
+
|
|
282
|
+
expect(mockRefreshCart).toHaveBeenCalledTimes(1);
|
|
283
|
+
expect(mockSetShippingMethod).not.toHaveBeenCalled();
|
|
284
|
+
expect(mockSetPaymentMethod).not.toHaveBeenCalled();
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
it("resolves shipping first, then payment, when both are blocked", async () => {
|
|
288
|
+
cart.value = cartWith({
|
|
289
|
+
[shippingBlocked.key]: shippingBlocked,
|
|
290
|
+
[paymentBlocked.key]: paymentBlocked,
|
|
291
|
+
});
|
|
292
|
+
mockRefreshCart.mockImplementationOnce(async () => {});
|
|
293
|
+
// after shipping switch: only payment still blocked
|
|
294
|
+
nextRefreshSets({ [paymentBlocked.key]: paymentBlocked });
|
|
295
|
+
// after payment switch: clean
|
|
296
|
+
nextRefreshSets({});
|
|
297
|
+
|
|
298
|
+
const { ensureAvailableCheckoutMethods } = useCheckoutMethodGuard();
|
|
299
|
+
|
|
300
|
+
await expect(ensureAvailableCheckoutMethods()).resolves.toBe(true);
|
|
301
|
+
|
|
302
|
+
expect(mockSetShippingMethod).toHaveBeenCalledWith({ id: pickup.id });
|
|
303
|
+
expect(mockSetPaymentMethod).toHaveBeenCalledWith({ id: paypal.id });
|
|
304
|
+
expect(mockSetShippingMethod.mock.invocationCallOrder[0]).toBeLessThan(
|
|
305
|
+
mockSetPaymentMethod.mock.invocationCallOrder[0] as number,
|
|
306
|
+
);
|
|
307
|
+
expect(mockRefreshCart).toHaveBeenCalledTimes(3);
|
|
308
|
+
expect(mockToastAdd).toHaveBeenCalledTimes(2);
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
it("leaves the payment method untouched when shipping cannot be resolved", async () => {
|
|
312
|
+
cart.value = cartWith({
|
|
313
|
+
[shippingBlocked.key]: shippingBlocked,
|
|
314
|
+
[paymentBlocked.key]: paymentBlocked,
|
|
315
|
+
});
|
|
316
|
+
mockGetShippingMethods.mockResolvedValue(ref([delivery]));
|
|
317
|
+
|
|
318
|
+
const { ensureAvailableCheckoutMethods } = useCheckoutMethodGuard();
|
|
319
|
+
|
|
320
|
+
await expect(ensureAvailableCheckoutMethods()).resolves.toBe(false);
|
|
321
|
+
|
|
322
|
+
expect(mockGetPaymentMethods).not.toHaveBeenCalled();
|
|
323
|
+
expect(mockSetPaymentMethod).not.toHaveBeenCalled();
|
|
324
|
+
expect(mockToastAdd).not.toHaveBeenCalled();
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
it("returns false when the payment method cannot be resolved", async () => {
|
|
328
|
+
cart.value = cartWith({ [paymentBlocked.key]: paymentBlocked });
|
|
329
|
+
mockGetPaymentMethods.mockResolvedValue(ref([cash]));
|
|
330
|
+
|
|
331
|
+
const { ensureAvailableCheckoutMethods, isPaymentMethodBlocked } =
|
|
332
|
+
useCheckoutMethodGuard();
|
|
333
|
+
|
|
334
|
+
await expect(ensureAvailableCheckoutMethods()).resolves.toBe(false);
|
|
335
|
+
expect(isPaymentMethodBlocked.value).toBe(true);
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
it("serializes concurrent calls so the switch happens only once", async () => {
|
|
339
|
+
cart.value = cartWith({ [shippingBlocked.key]: shippingBlocked });
|
|
340
|
+
let releaseFirstRefresh: () => void = () => {};
|
|
341
|
+
mockRefreshCart.mockImplementationOnce(
|
|
342
|
+
() => new Promise<void>((r) => (releaseFirstRefresh = r)),
|
|
343
|
+
);
|
|
344
|
+
nextRefreshSets({});
|
|
345
|
+
|
|
346
|
+
const { ensureAvailableCheckoutMethods, ensureAvailableShippingMethod } =
|
|
347
|
+
useCheckoutMethodGuard();
|
|
348
|
+
|
|
349
|
+
const first = ensureAvailableCheckoutMethods();
|
|
350
|
+
const second = ensureAvailableShippingMethod();
|
|
351
|
+
await Promise.resolve();
|
|
352
|
+
expect(mockRefreshCart).toHaveBeenCalledTimes(1);
|
|
353
|
+
|
|
354
|
+
releaseFirstRefresh();
|
|
355
|
+
await expect(first).resolves.toBe(true);
|
|
356
|
+
await expect(second).resolves.toBe(true);
|
|
357
|
+
|
|
358
|
+
expect(mockSetShippingMethod).toHaveBeenCalledTimes(1);
|
|
359
|
+
expect(mockToastAdd).toHaveBeenCalledTimes(1);
|
|
360
|
+
// second call re-checked after the first one finished
|
|
361
|
+
expect(mockRefreshCart).toHaveBeenCalledTimes(3);
|
|
362
|
+
expect(mockRefreshCart.mock.invocationCallOrder[2]).toBeGreaterThan(
|
|
363
|
+
mockSetShippingMethod.mock.invocationCallOrder[0] as number,
|
|
364
|
+
);
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
it("still runs after a previous call failed", async () => {
|
|
368
|
+
mockRefreshCart.mockRejectedValueOnce(new Error("network"));
|
|
369
|
+
|
|
370
|
+
const { ensureAvailableCheckoutMethods } = useCheckoutMethodGuard();
|
|
371
|
+
|
|
372
|
+
await expect(ensureAvailableCheckoutMethods()).rejects.toThrow("network");
|
|
373
|
+
await expect(ensureAvailableCheckoutMethods()).resolves.toBe(true);
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
it("resets isResolving even when a request fails", async () => {
|
|
377
|
+
mockRefreshCart.mockRejectedValueOnce(new Error("network"));
|
|
378
|
+
|
|
379
|
+
const { ensureAvailableCheckoutMethods, isResolving } =
|
|
380
|
+
useCheckoutMethodGuard();
|
|
381
|
+
|
|
382
|
+
await expect(ensureAvailableCheckoutMethods()).rejects.toThrow("network");
|
|
383
|
+
expect(isResolving.value).toBe(false);
|
|
384
|
+
});
|
|
385
|
+
});
|
|
386
|
+
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect, vi, beforeEach } from "vitest";
|
|
2
|
+
import { mockNuxtImport } from "@nuxt/test-utils/runtime";
|
|
2
3
|
import { useProductConfigurator } from "../../app/composables/useProductConfigurator";
|
|
3
4
|
|
|
4
5
|
const { mockFetch, mockConfigurator, mockProduct } = vi.hoisted(() => ({
|
|
@@ -7,7 +8,9 @@ const { mockFetch, mockConfigurator, mockProduct } = vi.hoisted(() => ({
|
|
|
7
8
|
mockProduct: { value: { id: "p1", optionIds: [], options: [] } },
|
|
8
9
|
}));
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
// `$fetch` is a Nuxt auto-import (bound at module load), so a global stub
|
|
12
|
+
// would not reach the composable.
|
|
13
|
+
mockNuxtImport("$fetch", () => mockFetch);
|
|
11
14
|
|
|
12
15
|
vi.mock("@shopware/composables", () => ({
|
|
13
16
|
useProductConfigurator: () => ({
|