@shopware-ag/acceptance-test-suite 3.4.0 → 3.6.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 CHANGED
@@ -762,6 +762,7 @@ interface PageObject {
762
762
  declare class Home implements PageObject {
763
763
  readonly page: Page;
764
764
  readonly productImages: Locator;
765
+ readonly productListItems: Locator;
765
766
  constructor(page: Page);
766
767
  url(): string;
767
768
  }
@@ -772,6 +773,7 @@ declare class ProductDetail$1 implements PageObject {
772
773
  readonly quantitySelect: Locator;
773
774
  readonly productSingleImage: Locator;
774
775
  readonly productSinglePrice: Locator;
776
+ readonly productPriceRangesRow: Locator;
775
777
  readonly offCanvasCartTitle: Locator;
776
778
  readonly offCanvasCart: Locator;
777
779
  readonly offCanvasCartGoToCheckoutButton: Locator;
@@ -801,6 +803,7 @@ declare class CheckoutCart implements PageObject {
801
803
  readonly stockReachedAlert: Locator;
802
804
  readonly cartLineItemImages: Locator;
803
805
  readonly unitPriceInfo: Locator;
806
+ readonly cartQuantityNumber: Locator;
804
807
  constructor(page: Page);
805
808
  url(): string;
806
809
  }
@@ -1260,6 +1263,8 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
1260
1263
  Register: Task;
1261
1264
  } & {
1262
1265
  AddProductToCart: Task;
1266
+ } & {
1267
+ ChangeProductQuantity: Task;
1263
1268
  } & {
1264
1269
  ProceedFromProductToCheckout: Task;
1265
1270
  } & {
package/dist/index.d.ts CHANGED
@@ -762,6 +762,7 @@ interface PageObject {
762
762
  declare class Home implements PageObject {
763
763
  readonly page: Page;
764
764
  readonly productImages: Locator;
765
+ readonly productListItems: Locator;
765
766
  constructor(page: Page);
766
767
  url(): string;
767
768
  }
@@ -772,6 +773,7 @@ declare class ProductDetail$1 implements PageObject {
772
773
  readonly quantitySelect: Locator;
773
774
  readonly productSingleImage: Locator;
774
775
  readonly productSinglePrice: Locator;
776
+ readonly productPriceRangesRow: Locator;
775
777
  readonly offCanvasCartTitle: Locator;
776
778
  readonly offCanvasCart: Locator;
777
779
  readonly offCanvasCartGoToCheckoutButton: Locator;
@@ -801,6 +803,7 @@ declare class CheckoutCart implements PageObject {
801
803
  readonly stockReachedAlert: Locator;
802
804
  readonly cartLineItemImages: Locator;
803
805
  readonly unitPriceInfo: Locator;
806
+ readonly cartQuantityNumber: Locator;
804
807
  constructor(page: Page);
805
808
  url(): string;
806
809
  }
@@ -1260,6 +1263,8 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
1260
1263
  Register: Task;
1261
1264
  } & {
1262
1265
  AddProductToCart: Task;
1266
+ } & {
1267
+ ChangeProductQuantity: Task;
1263
1268
  } & {
1264
1269
  ProceedFromProductToCheckout: Task;
1265
1270
  } & {
package/dist/index.mjs CHANGED
@@ -2246,7 +2246,9 @@ class Home {
2246
2246
  constructor(page) {
2247
2247
  this.page = page;
2248
2248
  __publicField$o(this, "productImages");
2249
+ __publicField$o(this, "productListItems");
2249
2250
  this.productImages = page.locator(".product-image-link");
2251
+ this.productListItems = page.getByRole("listitem");
2250
2252
  }
2251
2253
  url() {
2252
2254
  return "./";
@@ -2266,6 +2268,7 @@ let ProductDetail$1 = class ProductDetail {
2266
2268
  __publicField$n(this, "quantitySelect");
2267
2269
  __publicField$n(this, "productSingleImage");
2268
2270
  __publicField$n(this, "productSinglePrice");
2271
+ __publicField$n(this, "productPriceRangesRow");
2269
2272
  __publicField$n(this, "offCanvasCartTitle");
2270
2273
  __publicField$n(this, "offCanvasCart");
2271
2274
  __publicField$n(this, "offCanvasCartGoToCheckoutButton");
@@ -2276,6 +2279,7 @@ let ProductDetail$1 = class ProductDetail {
2276
2279
  this.quantitySelect = page.getByLabel("Quantity", { exact: true });
2277
2280
  this.productSingleImage = page.locator(".gallery-slider-single-image");
2278
2281
  this.productSinglePrice = page.locator(".product-detail-price");
2282
+ this.productPriceRangesRow = page.locator(".product-block-prices-row > th");
2279
2283
  this.offCanvas = page.locator("offcanvas-body");
2280
2284
  this.offCanvasCartTitle = page.getByText("Shopping cart", { exact: true });
2281
2285
  this.offCanvasCart = page.getByRole("dialog");
@@ -2330,6 +2334,7 @@ class CheckoutCart {
2330
2334
  __publicField$l(this, "stockReachedAlert");
2331
2335
  __publicField$l(this, "cartLineItemImages");
2332
2336
  __publicField$l(this, "unitPriceInfo");
2337
+ __publicField$l(this, "cartQuantityNumber");
2333
2338
  this.headline = page.getByRole("heading", { name: "Shopping cart" });
2334
2339
  this.goToCheckoutButton = page.getByRole("link", { name: "Go to checkout" });
2335
2340
  this.enterDiscountInput = page.getByLabel("Discount code");
@@ -2338,6 +2343,7 @@ class CheckoutCart {
2338
2343
  this.stockReachedAlert = page.getByText("only available 1 times");
2339
2344
  this.cartLineItemImages = page.locator(".line-item-img-link");
2340
2345
  this.unitPriceInfo = page.locator(".line-item-unit-price-value");
2346
+ this.cartQuantityNumber = page.getByLabel("Quantity", { exact: true });
2341
2347
  }
2342
2348
  url() {
2343
2349
  return "checkout/cart";
@@ -3814,6 +3820,22 @@ const ProceedFromCartToCheckout = test$e.extend({
3814
3820
  }
3815
3821
  });
3816
3822
 
3823
+ const ChangeProductQuantity = test$e.extend({
3824
+ ChangeProductQuantity: async ({
3825
+ ShopCustomer,
3826
+ StorefrontCheckoutCart
3827
+ }, use) => {
3828
+ const task = (quantity) => {
3829
+ return async function ChangeProductQuantityOnCart() {
3830
+ await StorefrontCheckoutCart.cartQuantityNumber.fill(quantity);
3831
+ await StorefrontCheckoutCart.cartQuantityNumber.press("Enter");
3832
+ await ShopCustomer.expects(StorefrontCheckoutCart.cartQuantityNumber).toHaveValue(quantity);
3833
+ };
3834
+ };
3835
+ await use(task);
3836
+ }
3837
+ });
3838
+
3817
3839
  const ConfirmTermsAndConditions = test$e.extend({
3818
3840
  ConfirmTermsAndConditions: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
3819
3841
  const task = () => {
@@ -3956,6 +3978,7 @@ const test$2 = mergeTests(
3956
3978
  Logout,
3957
3979
  Register,
3958
3980
  AddProductToCart,
3981
+ ChangeProductQuantity,
3959
3982
  ProceedFromProductToCheckout,
3960
3983
  ProceedFromCartToCheckout,
3961
3984
  ConfirmTermsAndConditions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "3.4.0",
3
+ "version": "3.6.0",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",