@shopware-ag/acceptance-test-suite 3.4.0 → 3.5.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/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.mjs +19 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -801,6 +801,7 @@ declare class CheckoutCart implements PageObject {
|
|
|
801
801
|
readonly stockReachedAlert: Locator;
|
|
802
802
|
readonly cartLineItemImages: Locator;
|
|
803
803
|
readonly unitPriceInfo: Locator;
|
|
804
|
+
readonly cartQuantityNumber: Locator;
|
|
804
805
|
constructor(page: Page);
|
|
805
806
|
url(): string;
|
|
806
807
|
}
|
|
@@ -1260,6 +1261,8 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
1260
1261
|
Register: Task;
|
|
1261
1262
|
} & {
|
|
1262
1263
|
AddProductToCart: Task;
|
|
1264
|
+
} & {
|
|
1265
|
+
ChangeProductQuantity: Task;
|
|
1263
1266
|
} & {
|
|
1264
1267
|
ProceedFromProductToCheckout: Task;
|
|
1265
1268
|
} & {
|
package/dist/index.d.ts
CHANGED
|
@@ -801,6 +801,7 @@ declare class CheckoutCart implements PageObject {
|
|
|
801
801
|
readonly stockReachedAlert: Locator;
|
|
802
802
|
readonly cartLineItemImages: Locator;
|
|
803
803
|
readonly unitPriceInfo: Locator;
|
|
804
|
+
readonly cartQuantityNumber: Locator;
|
|
804
805
|
constructor(page: Page);
|
|
805
806
|
url(): string;
|
|
806
807
|
}
|
|
@@ -1260,6 +1261,8 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
1260
1261
|
Register: Task;
|
|
1261
1262
|
} & {
|
|
1262
1263
|
AddProductToCart: Task;
|
|
1264
|
+
} & {
|
|
1265
|
+
ChangeProductQuantity: Task;
|
|
1263
1266
|
} & {
|
|
1264
1267
|
ProceedFromProductToCheckout: Task;
|
|
1265
1268
|
} & {
|
package/dist/index.mjs
CHANGED
|
@@ -2330,6 +2330,7 @@ class CheckoutCart {
|
|
|
2330
2330
|
__publicField$l(this, "stockReachedAlert");
|
|
2331
2331
|
__publicField$l(this, "cartLineItemImages");
|
|
2332
2332
|
__publicField$l(this, "unitPriceInfo");
|
|
2333
|
+
__publicField$l(this, "cartQuantityNumber");
|
|
2333
2334
|
this.headline = page.getByRole("heading", { name: "Shopping cart" });
|
|
2334
2335
|
this.goToCheckoutButton = page.getByRole("link", { name: "Go to checkout" });
|
|
2335
2336
|
this.enterDiscountInput = page.getByLabel("Discount code");
|
|
@@ -2338,6 +2339,7 @@ class CheckoutCart {
|
|
|
2338
2339
|
this.stockReachedAlert = page.getByText("only available 1 times");
|
|
2339
2340
|
this.cartLineItemImages = page.locator(".line-item-img-link");
|
|
2340
2341
|
this.unitPriceInfo = page.locator(".line-item-unit-price-value");
|
|
2342
|
+
this.cartQuantityNumber = page.getByLabel("Quantity", { exact: true });
|
|
2341
2343
|
}
|
|
2342
2344
|
url() {
|
|
2343
2345
|
return "checkout/cart";
|
|
@@ -3814,6 +3816,22 @@ const ProceedFromCartToCheckout = test$e.extend({
|
|
|
3814
3816
|
}
|
|
3815
3817
|
});
|
|
3816
3818
|
|
|
3819
|
+
const ChangeProductQuantity = test$e.extend({
|
|
3820
|
+
ChangeProductQuantity: async ({
|
|
3821
|
+
ShopCustomer,
|
|
3822
|
+
StorefrontCheckoutCart
|
|
3823
|
+
}, use) => {
|
|
3824
|
+
const task = (quantity) => {
|
|
3825
|
+
return async function ChangeProductQuantityOnCart() {
|
|
3826
|
+
await StorefrontCheckoutCart.cartQuantityNumber.fill(quantity);
|
|
3827
|
+
await StorefrontCheckoutCart.cartQuantityNumber.press("Enter");
|
|
3828
|
+
await ShopCustomer.expects(StorefrontCheckoutCart.cartQuantityNumber).toHaveValue(quantity);
|
|
3829
|
+
};
|
|
3830
|
+
};
|
|
3831
|
+
await use(task);
|
|
3832
|
+
}
|
|
3833
|
+
});
|
|
3834
|
+
|
|
3817
3835
|
const ConfirmTermsAndConditions = test$e.extend({
|
|
3818
3836
|
ConfirmTermsAndConditions: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
|
|
3819
3837
|
const task = () => {
|
|
@@ -3956,6 +3974,7 @@ const test$2 = mergeTests(
|
|
|
3956
3974
|
Logout,
|
|
3957
3975
|
Register,
|
|
3958
3976
|
AddProductToCart,
|
|
3977
|
+
ChangeProductQuantity,
|
|
3959
3978
|
ProceedFromProductToCheckout,
|
|
3960
3979
|
ProceedFromCartToCheckout,
|
|
3961
3980
|
ConfirmTermsAndConditions,
|