@lookiero/checkout 12.14.1 → 12.16.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.
|
@@ -2,6 +2,7 @@ import { CheckoutStatus } from "../../src/domain/checkout/model/checkout";
|
|
|
2
2
|
import { CheckoutItemStatus } from "../../src/domain/checkoutItem/model/checkoutItem";
|
|
3
3
|
import { bookedProductsVariants } from "../../src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock";
|
|
4
4
|
import { checkout } from "../../src/infrastructure/projection/checkout/checkout.mock";
|
|
5
|
+
import { checkoutBooking } from "../../src/infrastructure/projection/checkoutBooking/checkoutBooking.mock";
|
|
5
6
|
import { checkoutFeedbackDefinition } from "../../src/infrastructure/projection/checkoutFeedback/checkoutFeedbackDefinition.mock";
|
|
6
7
|
import { checkoutItem } from "../../src/infrastructure/projection/checkoutItem/checkoutItem.mock";
|
|
7
8
|
import { paymentFlowPayload } from "../../src/infrastructure/projection/payment/paymentFlowPayload.mock";
|
|
@@ -18,8 +19,10 @@ import { interceptReplaceCheckoutItem } from "../support/interceptReplaceCheckou
|
|
|
18
19
|
import { interceptReturnCheckoutItem } from "../support/interceptReturnCheckoutItem";
|
|
19
20
|
import { interceptSubmitCheckout } from "../support/interceptSubmitCheckout";
|
|
20
21
|
import { interceptViewBookedProductsVariantsForCheckoutItem } from "../support/interceptViewBookedProductsVariantsForCheckoutItem";
|
|
22
|
+
import { interceptViewCheckoutBookingById } from "../support/interceptViewCheckoutBookingById";
|
|
21
23
|
import { interceptViewCheckoutById } from "../support/interceptViewCheckoutById";
|
|
22
24
|
import { interceptViewCheckoutFeedbackDefinitionByCheckoutId } from "../support/interceptViewCheckoutFeedbackDefinitionByCheckoutId";
|
|
25
|
+
import { interceptViewCheckoutItemById } from "../support/interceptViewCheckoutItemById";
|
|
23
26
|
import { interceptViewFirstAvailableCheckoutByCustomerId } from "../support/interceptViewFirstAvailableCheckoutByCustomerId";
|
|
24
27
|
import { interceptViewFiveItemsDiscountByCustomerId } from "../support/interceptViewFiveItemsDiscountByCustomerId";
|
|
25
28
|
import { interceptViewIsSizeChangeEnabledByCheckoutId } from "../support/interceptViewIsSizeChangeEnabledByCheckoutId";
|
|
@@ -57,7 +60,6 @@ const randomIndex = (count: number) => Math.floor(Math.random() * count);
|
|
|
57
60
|
const navigateToHome = () => cy.visit("/");
|
|
58
61
|
const confirmCheckout = () => {
|
|
59
62
|
cy.shouldIncludePathInUrl(`${BASEPATH}/${Routes.CHECKOUT}`);
|
|
60
|
-
cy.getByTestId("confirm-checkout-button").click();
|
|
61
63
|
|
|
62
64
|
interceptViewFirstAvailableCheckoutByCustomerId(
|
|
63
65
|
checkout({
|
|
@@ -70,6 +72,7 @@ const confirmCheckout = () => {
|
|
|
70
72
|
),
|
|
71
73
|
}),
|
|
72
74
|
).as("submittedViewFirstAvailableCheckoutByCustomerId");
|
|
75
|
+
cy.getByTestId("confirm-checkout-button").click();
|
|
73
76
|
|
|
74
77
|
cy.getByTestId("modal-notification-button").click();
|
|
75
78
|
cy.wait("@submitCheckout");
|
|
@@ -130,6 +133,7 @@ describe("Checkout", () => {
|
|
|
130
133
|
interceptViewPricingByCheckoutId(pricing());
|
|
131
134
|
interceptViewPaymentFlowPayloadByCheckoutId(paymentFlowPayload);
|
|
132
135
|
interceptViewCheckoutFeedbackDefinitionByCheckoutId(checkoutFeedbackDefinition);
|
|
136
|
+
interceptViewCheckoutBookingById(checkoutBooking);
|
|
133
137
|
|
|
134
138
|
interceptKeepCheckoutItem();
|
|
135
139
|
interceptReplaceCheckoutItem();
|
|
@@ -145,7 +149,7 @@ describe("Checkout", () => {
|
|
|
145
149
|
checkoutProjection.items.forEach((checkoutItemProjection, checkoutItemIndex) => {
|
|
146
150
|
cy.shouldIncludePathInUrl(checkoutItemProjection.id);
|
|
147
151
|
|
|
148
|
-
|
|
152
|
+
interceptViewCheckoutItemById({ ...checkoutItemProjection, status: CheckoutItemStatus.INITIAL });
|
|
149
153
|
|
|
150
154
|
const queryAlias = `viewFirstAvailableCheckoutByCustomerId_${checkoutItemProjection.id}`;
|
|
151
155
|
interceptViewFirstAvailableCheckoutByCustomerId(
|
|
@@ -159,6 +163,7 @@ describe("Checkout", () => {
|
|
|
159
163
|
),
|
|
160
164
|
}),
|
|
161
165
|
).as(queryAlias);
|
|
166
|
+
cy.getByTestId("keep-button").click();
|
|
162
167
|
cy.wait(`@${queryAlias}`);
|
|
163
168
|
});
|
|
164
169
|
|
|
@@ -178,6 +183,7 @@ describe("Checkout", () => {
|
|
|
178
183
|
checkoutProjection.items.forEach((checkoutItemProjection, checkoutItemIndex) => {
|
|
179
184
|
cy.shouldIncludePathInUrl(checkoutItemProjection.id);
|
|
180
185
|
|
|
186
|
+
interceptViewCheckoutItemById({ ...checkoutItemProjection, status: CheckoutItemStatus.INITIAL });
|
|
181
187
|
cy.getByTestId("size-selector").click();
|
|
182
188
|
|
|
183
189
|
const queryAlias = `viewFirstAvailableCheckoutByCustomerId_${checkoutItemProjection.id}`;
|
|
@@ -218,6 +224,7 @@ describe("Checkout", () => {
|
|
|
218
224
|
checkoutProjection.items.forEach((checkoutItemProjection, checkoutItemIndex) => {
|
|
219
225
|
cy.shouldIncludePathInUrl(checkoutItemProjection.id);
|
|
220
226
|
|
|
227
|
+
interceptViewCheckoutItemById({ ...checkoutItemProjection, status: CheckoutItemStatus.INITIAL });
|
|
221
228
|
cy.getByTestId("return-button").click();
|
|
222
229
|
|
|
223
230
|
cy.shouldIncludePathInUrl(`${BASEPATH}/return`);
|
|
@@ -228,8 +235,6 @@ describe("Checkout", () => {
|
|
|
228
235
|
});
|
|
229
236
|
});
|
|
230
237
|
|
|
231
|
-
cy.getByTestId("return-questions-button").click();
|
|
232
|
-
|
|
233
238
|
const queryAlias = `viewFirstAvailableCheckoutByCustomerId_${checkoutItemProjection.id}`;
|
|
234
239
|
interceptViewFirstAvailableCheckoutByCustomerId(
|
|
235
240
|
checkout({
|
|
@@ -242,6 +247,7 @@ describe("Checkout", () => {
|
|
|
242
247
|
),
|
|
243
248
|
}),
|
|
244
249
|
).as(queryAlias);
|
|
250
|
+
cy.getByTestId("return-questions-button").click();
|
|
245
251
|
cy.wait(`@${queryAlias}`);
|
|
246
252
|
});
|
|
247
253
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CheckoutBookingProjection } from "../../src/projection/checkoutBooking/checkoutBooking";
|
|
2
|
+
|
|
3
|
+
const interceptViewCheckoutBookingById = (response: CheckoutBookingProjection) =>
|
|
4
|
+
cy.intercept({ method: "POST", url: "/local-to-dev/view-checkout-booking-by-id" }, { body: { result: response } });
|
|
5
|
+
|
|
6
|
+
export { interceptViewCheckoutBookingById };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CheckoutItemProjection } from "../../src/projection/checkoutItem/checkoutItem";
|
|
2
|
+
|
|
3
|
+
const interceptViewCheckoutItemById = (response: CheckoutItemProjection) =>
|
|
4
|
+
cy.intercept({ method: "POST", url: "/local-to-dev/view-checkout-item-by-id" }, { body: { result: response } });
|
|
5
|
+
|
|
6
|
+
export { interceptViewCheckoutItemById };
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "12.
|
|
1
|
+
export declare const VERSION = "12.16.0";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "12.
|
|
1
|
+
export const VERSION = "12.16.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lookiero/checkout",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.16.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"sideEffects": "false",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@lookiero/sty-psp-ab-testing": "^0.3",
|
|
25
25
|
"@lookiero/sty-psp-expo-config": "^1.0",
|
|
26
26
|
"@lookiero/sty-psp-http": "^2.0",
|
|
27
|
-
"@lookiero/sty-psp-i18n": "^1.
|
|
27
|
+
"@lookiero/sty-psp-i18n": "^1.3",
|
|
28
28
|
"@lookiero/sty-psp-locale": "^1.0",
|
|
29
29
|
"@lookiero/sty-psp-logging": "^1.0",
|
|
30
30
|
"@lookiero/sty-psp-notifications": "^2.7",
|