@shopware-ag/acceptance-test-suite 3.3.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 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
  }
@@ -880,6 +881,7 @@ declare class AccountLogin implements PageObject {
880
881
  readonly streetAddressInput: Locator;
881
882
  readonly cityInput: Locator;
882
883
  readonly countryInput: Locator;
884
+ readonly postalCodeInput: Locator;
883
885
  readonly registerButton: Locator;
884
886
  constructor(page: Page);
885
887
  url(): string;
@@ -1259,6 +1261,8 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
1259
1261
  Register: Task;
1260
1262
  } & {
1261
1263
  AddProductToCart: Task;
1264
+ } & {
1265
+ ChangeProductQuantity: Task;
1262
1266
  } & {
1263
1267
  ProceedFromProductToCheckout: Task;
1264
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
  }
@@ -880,6 +881,7 @@ declare class AccountLogin implements PageObject {
880
881
  readonly streetAddressInput: Locator;
881
882
  readonly cityInput: Locator;
882
883
  readonly countryInput: Locator;
884
+ readonly postalCodeInput: Locator;
883
885
  readonly registerButton: Locator;
884
886
  constructor(page: Page);
885
887
  url(): string;
@@ -1259,6 +1261,8 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
1259
1261
  Register: Task;
1260
1262
  } & {
1261
1263
  AddProductToCart: Task;
1264
+ } & {
1265
+ ChangeProductQuantity: Task;
1262
1266
  } & {
1263
1267
  ProceedFromProductToCheckout: Task;
1264
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";
@@ -2501,6 +2503,7 @@ class AccountLogin {
2501
2503
  __publicField$g(this, "streetAddressInput");
2502
2504
  __publicField$g(this, "cityInput");
2503
2505
  __publicField$g(this, "countryInput");
2506
+ __publicField$g(this, "postalCodeInput");
2504
2507
  __publicField$g(this, "registerButton");
2505
2508
  this.emailInput = page.getByLabel("Your email address");
2506
2509
  this.passwordInput = page.getByLabel("Your password");
@@ -2515,6 +2518,7 @@ class AccountLogin {
2515
2518
  this.streetAddressInput = this.billingAddressFormArea.getByLabel("Street address*");
2516
2519
  this.cityInput = this.billingAddressFormArea.getByLabel("City*");
2517
2520
  this.countryInput = this.billingAddressFormArea.getByLabel("Country*");
2521
+ this.postalCodeInput = this.billingAddressFormArea.getByLabel("Postal code*");
2518
2522
  this.registerButton = page.getByRole("button", { name: "Continue" });
2519
2523
  this.logoutLink = page.getByRole("link", { name: "Log out" });
2520
2524
  this.successAlert = page.getByText("Successfully logged out.");
@@ -3734,7 +3738,8 @@ const Register = test$e.extend({
3734
3738
  password: "shopware",
3735
3739
  street: "Ebbinghof 10",
3736
3740
  city: "Sch\xF6ppingen",
3737
- country: "Germany"
3741
+ country: "Germany",
3742
+ postalCode: "48624"
3738
3743
  };
3739
3744
  const task = (email) => {
3740
3745
  return async function Register2() {
@@ -3746,6 +3751,7 @@ const Register = test$e.extend({
3746
3751
  await StorefrontAccountLogin.streetAddressInput.fill(registrationData.street);
3747
3752
  await StorefrontAccountLogin.cityInput.fill(registrationData.city);
3748
3753
  await StorefrontAccountLogin.countryInput.selectOption(registrationData.country);
3754
+ await StorefrontAccountLogin.postalCodeInput.fill(registrationData.postalCode);
3749
3755
  await StorefrontAccountLogin.registerButton.click();
3750
3756
  };
3751
3757
  };
@@ -3810,6 +3816,22 @@ const ProceedFromCartToCheckout = test$e.extend({
3810
3816
  }
3811
3817
  });
3812
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
+
3813
3835
  const ConfirmTermsAndConditions = test$e.extend({
3814
3836
  ConfirmTermsAndConditions: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
3815
3837
  const task = () => {
@@ -3952,6 +3974,7 @@ const test$2 = mergeTests(
3952
3974
  Logout,
3953
3975
  Register,
3954
3976
  AddProductToCart,
3977
+ ChangeProductQuantity,
3955
3978
  ProceedFromProductToCheckout,
3956
3979
  ProceedFromCartToCheckout,
3957
3980
  ConfirmTermsAndConditions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "3.3.0",
3
+ "version": "3.5.0",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",