@shopware-ag/acceptance-test-suite 5.3.0 → 5.4.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.mjs CHANGED
@@ -385,16 +385,16 @@ const test$c = test$e.extend({
385
385
  ]
386
386
  });
387
387
 
388
- var __defProp$I = Object.defineProperty;
389
- var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
390
- var __publicField$I = (obj, key, value) => {
391
- __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
388
+ var __defProp$M = Object.defineProperty;
389
+ var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
390
+ var __publicField$M = (obj, key, value) => {
391
+ __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
392
392
  return value;
393
393
  };
394
394
  const _AdminApiContext = class _AdminApiContext {
395
395
  constructor(context, options) {
396
- __publicField$I(this, "context");
397
- __publicField$I(this, "options");
396
+ __publicField$M(this, "context");
397
+ __publicField$M(this, "options");
398
398
  this.context = context;
399
399
  this.options = options;
400
400
  }
@@ -486,7 +486,7 @@ const _AdminApiContext = class _AdminApiContext {
486
486
  return this.context.head(url, options);
487
487
  }
488
488
  };
489
- __publicField$I(_AdminApiContext, "defaultOptions", {
489
+ __publicField$M(_AdminApiContext, "defaultOptions", {
490
490
  app_url: process.env["APP_URL"],
491
491
  client_id: process.env["SHOPWARE_ACCESS_KEY_ID"],
492
492
  client_secret: process.env["SHOPWARE_SECRET_ACCESS_KEY"],
@@ -496,16 +496,16 @@ __publicField$I(_AdminApiContext, "defaultOptions", {
496
496
  });
497
497
  let AdminApiContext = _AdminApiContext;
498
498
 
499
- var __defProp$H = Object.defineProperty;
500
- var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
501
- var __publicField$H = (obj, key, value) => {
502
- __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
499
+ var __defProp$L = Object.defineProperty;
500
+ var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
501
+ var __publicField$L = (obj, key, value) => {
502
+ __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
503
503
  return value;
504
504
  };
505
505
  const _StoreApiContext = class _StoreApiContext {
506
506
  constructor(context, options) {
507
- __publicField$H(this, "context");
508
- __publicField$H(this, "options");
507
+ __publicField$L(this, "context");
508
+ __publicField$L(this, "options");
509
509
  this.context = context;
510
510
  this.options = options;
511
511
  }
@@ -564,21 +564,21 @@ const _StoreApiContext = class _StoreApiContext {
564
564
  return this.context.head(url, options);
565
565
  }
566
566
  };
567
- __publicField$H(_StoreApiContext, "defaultOptions", {
567
+ __publicField$L(_StoreApiContext, "defaultOptions", {
568
568
  app_url: process.env["APP_URL"],
569
569
  ignoreHTTPSErrors: true
570
570
  });
571
571
  let StoreApiContext = _StoreApiContext;
572
572
 
573
- var __defProp$G = Object.defineProperty;
574
- var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
575
- var __publicField$G = (obj, key, value) => {
576
- __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
573
+ var __defProp$K = Object.defineProperty;
574
+ var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
575
+ var __publicField$K = (obj, key, value) => {
576
+ __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
577
577
  return value;
578
578
  };
579
579
  class MailpitApiContext {
580
580
  constructor(context) {
581
- __publicField$G(this, "context");
581
+ __publicField$K(this, "context");
582
582
  this.context = context;
583
583
  }
584
584
  /**
@@ -875,17 +875,17 @@ const test$a = test$e.extend({
875
875
  }
876
876
  });
877
877
 
878
- var __defProp$F = Object.defineProperty;
879
- var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
880
- var __publicField$F = (obj, key, value) => {
881
- __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
878
+ var __defProp$J = Object.defineProperty;
879
+ var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
880
+ var __publicField$J = (obj, key, value) => {
881
+ __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
882
882
  return value;
883
883
  };
884
884
  class Actor {
885
885
  constructor(name, page) {
886
- __publicField$F(this, "page");
887
- __publicField$F(this, "name");
888
- __publicField$F(this, "expects", expect);
886
+ __publicField$J(this, "page");
887
+ __publicField$J(this, "name");
888
+ __publicField$J(this, "expects", expect);
889
889
  this.name = name;
890
890
  this.page = page;
891
891
  }
@@ -934,31 +934,31 @@ function createRandomImage(width = 800, height = 600) {
934
934
  return new Image(width, height, buffer);
935
935
  }
936
936
 
937
- var __defProp$E = Object.defineProperty;
938
- var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
939
- var __publicField$E = (obj, key, value) => {
940
- __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
937
+ var __defProp$I = Object.defineProperty;
938
+ var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
939
+ var __publicField$I = (obj, key, value) => {
940
+ __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
941
941
  return value;
942
942
  };
943
943
  class TestDataService {
944
944
  constructor(AdminApiClient, IdProvider, options) {
945
- __publicField$E(this, "AdminApiClient");
946
- __publicField$E(this, "IdProvider");
947
- __publicField$E(this, "namePrefix", "Test-");
948
- __publicField$E(this, "nameSuffix", "");
949
- __publicField$E(this, "defaultSalesChannel");
950
- __publicField$E(this, "defaultTaxId");
951
- __publicField$E(this, "defaultCurrencyId");
952
- __publicField$E(this, "defaultCategoryId");
953
- __publicField$E(this, "defaultLanguageId");
954
- __publicField$E(this, "defaultCountryId");
955
- __publicField$E(this, "defaultCustomerGroupId");
945
+ __publicField$I(this, "AdminApiClient");
946
+ __publicField$I(this, "IdProvider");
947
+ __publicField$I(this, "namePrefix", "Test-");
948
+ __publicField$I(this, "nameSuffix", "");
949
+ __publicField$I(this, "defaultSalesChannel");
950
+ __publicField$I(this, "defaultTaxId");
951
+ __publicField$I(this, "defaultCurrencyId");
952
+ __publicField$I(this, "defaultCategoryId");
953
+ __publicField$I(this, "defaultLanguageId");
954
+ __publicField$I(this, "defaultCountryId");
955
+ __publicField$I(this, "defaultCustomerGroupId");
956
956
  /**
957
957
  * Configures if an automated cleanup of the data should be executed.
958
958
  *
959
959
  * @private
960
960
  */
961
- __publicField$E(this, "shouldCleanUp", true);
961
+ __publicField$I(this, "shouldCleanUp", true);
962
962
  /**
963
963
  * Configuration of higher priority entities for the cleanup operation.
964
964
  * These entities will be deleted before others.
@@ -966,19 +966,19 @@ class TestDataService {
966
966
  *
967
967
  * @private
968
968
  */
969
- __publicField$E(this, "highPriorityEntities", ["order", "product", "landing_page"]);
969
+ __publicField$I(this, "highPriorityEntities", ["order", "product", "landing_page"]);
970
970
  /**
971
971
  * A registry of all created records.
972
972
  *
973
973
  * @private
974
974
  */
975
- __publicField$E(this, "createdRecords", []);
975
+ __publicField$I(this, "createdRecords", []);
976
976
  /**
977
977
  * Function that generates combinations from n number of arrays
978
978
  * with m number of elements in them.
979
979
  * @param array
980
980
  */
981
- __publicField$E(this, "combineAll", (array) => {
981
+ __publicField$I(this, "combineAll", (array) => {
982
982
  const result = [];
983
983
  const max = array.length - 1;
984
984
  const helper = (tmpArray, i) => {
@@ -1504,6 +1504,21 @@ class TestDataService {
1504
1504
  this.addCreatedRecord("currency", currency.id);
1505
1505
  return currency;
1506
1506
  }
1507
+ /**
1508
+ * Creates a random customer group
1509
+ *
1510
+ * @param overrides - Specific data overrides that will be applied to the customer group data struct.
1511
+ */
1512
+ async createCustomerGroup(overrides = {}) {
1513
+ const basicCustomerGroup = this.getBasicCustomerGroupStruct(overrides);
1514
+ const response = await this.AdminApiClient.post("customer-group?_response=detail", {
1515
+ data: basicCustomerGroup
1516
+ });
1517
+ expect(response.ok()).toBeTruthy();
1518
+ const { data: customerGroup } = await response.json();
1519
+ this.addCreatedRecord("customer_group", customerGroup.id);
1520
+ return customerGroup;
1521
+ }
1507
1522
  /**
1508
1523
  * Assigns a media resource as the download of a digital product.
1509
1524
  *
@@ -2595,6 +2610,25 @@ class TestDataService {
2595
2610
  };
2596
2611
  return Object.assign({}, basicCmsPage, overrides);
2597
2612
  }
2613
+ getBasicCustomerGroupStruct(overrides = {}) {
2614
+ const customerGroupUuid = this.IdProvider.getIdPair().uuid;
2615
+ const customerGroupName = `${this.namePrefix}CustomerGroup-${customerGroupUuid}${this.nameSuffix}`;
2616
+ const basicCustomerGroup = {
2617
+ id: customerGroupUuid,
2618
+ name: customerGroupName,
2619
+ displayGross: true,
2620
+ registrationActive: true,
2621
+ registrationTitle: customerGroupName,
2622
+ registrationIntroduction: `${customerGroupName}-Introduction`,
2623
+ registrationSeoMetaDescription: `${customerGroupName}-SEO-Description`,
2624
+ registrationOnlyCompanyRegistration: false,
2625
+ customFields: {},
2626
+ registrationSalesChannels: [{
2627
+ id: this.defaultSalesChannel.id
2628
+ }]
2629
+ };
2630
+ return Object.assign({}, basicCustomerGroup, overrides);
2631
+ }
2598
2632
  }
2599
2633
 
2600
2634
  const test$8 = test$e.extend({
@@ -2613,16 +2647,16 @@ const test$8 = test$e.extend({
2613
2647
  }
2614
2648
  });
2615
2649
 
2616
- var __defProp$D = Object.defineProperty;
2617
- var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2618
- var __publicField$D = (obj, key, value) => {
2619
- __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
2650
+ var __defProp$H = Object.defineProperty;
2651
+ var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2652
+ var __publicField$H = (obj, key, value) => {
2653
+ __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
2620
2654
  return value;
2621
2655
  };
2622
2656
  class IdProvider {
2623
2657
  constructor(workerIndex, seed) {
2624
- __publicField$D(this, "workerIndex");
2625
- __publicField$D(this, "seed");
2658
+ __publicField$H(this, "workerIndex");
2659
+ __publicField$H(this, "seed");
2626
2660
  this.workerIndex = workerIndex;
2627
2661
  this.seed = seed;
2628
2662
  }
@@ -2696,19 +2730,19 @@ const test$7 = test$e.extend({
2696
2730
  ]
2697
2731
  });
2698
2732
 
2699
- var __defProp$C = Object.defineProperty;
2700
- var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2701
- var __publicField$C = (obj, key, value) => {
2702
- __defNormalProp$C(obj, typeof key !== "symbol" ? key + "" : key, value);
2733
+ var __defProp$G = Object.defineProperty;
2734
+ var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2735
+ var __publicField$G = (obj, key, value) => {
2736
+ __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
2703
2737
  return value;
2704
2738
  };
2705
2739
  class Home {
2706
2740
  constructor(page) {
2707
2741
  this.page = page;
2708
- __publicField$C(this, "productImages");
2709
- __publicField$C(this, "productListItems");
2710
- __publicField$C(this, "languagesDropdown");
2711
- __publicField$C(this, "currenciesDropdown");
2742
+ __publicField$G(this, "productImages");
2743
+ __publicField$G(this, "productListItems");
2744
+ __publicField$G(this, "languagesDropdown");
2745
+ __publicField$G(this, "currenciesDropdown");
2712
2746
  this.productImages = page.locator(".product-image-link");
2713
2747
  this.productListItems = page.getByRole("listitem");
2714
2748
  this.languagesDropdown = page.getByLabel("Shop settings").locator(".languages-menu");
@@ -2742,26 +2776,26 @@ class Home {
2742
2776
  }
2743
2777
  }
2744
2778
 
2745
- var __defProp$B = Object.defineProperty;
2746
- var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2747
- var __publicField$B = (obj, key, value) => {
2748
- __defNormalProp$B(obj, typeof key !== "symbol" ? key + "" : key, value);
2779
+ var __defProp$F = Object.defineProperty;
2780
+ var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2781
+ var __publicField$F = (obj, key, value) => {
2782
+ __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
2749
2783
  return value;
2750
2784
  };
2751
2785
  let ProductDetail$1 = class ProductDetail {
2752
2786
  constructor(page) {
2753
2787
  this.page = page;
2754
- __publicField$B(this, "addToCartButton");
2755
- __publicField$B(this, "quantitySelect");
2756
- __publicField$B(this, "productSingleImage");
2757
- __publicField$B(this, "productSinglePrice");
2758
- __publicField$B(this, "productPriceRangesRow");
2759
- __publicField$B(this, "offCanvasCartTitle");
2760
- __publicField$B(this, "offCanvasCart");
2761
- __publicField$B(this, "offCanvasCartGoToCheckoutButton");
2762
- __publicField$B(this, "offCanvasLineItemImages");
2763
- __publicField$B(this, "offCanvasSummaryTotalPrice");
2764
- __publicField$B(this, "offCanvas");
2788
+ __publicField$F(this, "addToCartButton");
2789
+ __publicField$F(this, "quantitySelect");
2790
+ __publicField$F(this, "productSingleImage");
2791
+ __publicField$F(this, "productSinglePrice");
2792
+ __publicField$F(this, "productPriceRangesRow");
2793
+ __publicField$F(this, "offCanvasCartTitle");
2794
+ __publicField$F(this, "offCanvasCart");
2795
+ __publicField$F(this, "offCanvasCartGoToCheckoutButton");
2796
+ __publicField$F(this, "offCanvasLineItemImages");
2797
+ __publicField$F(this, "offCanvasSummaryTotalPrice");
2798
+ __publicField$F(this, "offCanvas");
2765
2799
  this.addToCartButton = page.getByRole("button", { name: "Add to shopping cart" });
2766
2800
  this.quantitySelect = page.getByLabel("Quantity", { exact: true });
2767
2801
  this.productSingleImage = page.locator(".gallery-slider-single-image");
@@ -2783,18 +2817,18 @@ let ProductDetail$1 = class ProductDetail {
2783
2817
  }
2784
2818
  };
2785
2819
 
2786
- var __defProp$A = Object.defineProperty;
2787
- var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2788
- var __publicField$A = (obj, key, value) => {
2789
- __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
2820
+ var __defProp$E = Object.defineProperty;
2821
+ var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2822
+ var __publicField$E = (obj, key, value) => {
2823
+ __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
2790
2824
  return value;
2791
2825
  };
2792
2826
  class Category {
2793
2827
  constructor(page) {
2794
2828
  this.page = page;
2795
- __publicField$A(this, "sortingSelect");
2796
- __publicField$A(this, "firstProductBuyButton");
2797
- __publicField$A(this, "noProductsFoundAlert");
2829
+ __publicField$E(this, "sortingSelect");
2830
+ __publicField$E(this, "firstProductBuyButton");
2831
+ __publicField$E(this, "noProductsFoundAlert");
2798
2832
  this.sortingSelect = page.getByLabel("Sorting");
2799
2833
  this.firstProductBuyButton = page.getByRole("button", { name: "Add to shopping cart" }).first();
2800
2834
  this.noProductsFoundAlert = page.getByText("No products found.");
@@ -2804,24 +2838,24 @@ class Category {
2804
2838
  }
2805
2839
  }
2806
2840
 
2807
- var __defProp$z = Object.defineProperty;
2808
- var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2809
- var __publicField$z = (obj, key, value) => {
2810
- __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
2841
+ var __defProp$D = Object.defineProperty;
2842
+ var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2843
+ var __publicField$D = (obj, key, value) => {
2844
+ __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
2811
2845
  return value;
2812
2846
  };
2813
2847
  class CheckoutCart {
2814
2848
  constructor(page) {
2815
2849
  this.page = page;
2816
- __publicField$z(this, "headline");
2817
- __publicField$z(this, "goToCheckoutButton");
2818
- __publicField$z(this, "enterPromoInput");
2819
- __publicField$z(this, "grandTotalPrice");
2820
- __publicField$z(this, "emptyCartAlert");
2821
- __publicField$z(this, "stockReachedAlert");
2822
- __publicField$z(this, "cartLineItemImages");
2823
- __publicField$z(this, "unitPriceInfo");
2824
- __publicField$z(this, "cartQuantityNumber");
2850
+ __publicField$D(this, "headline");
2851
+ __publicField$D(this, "goToCheckoutButton");
2852
+ __publicField$D(this, "enterPromoInput");
2853
+ __publicField$D(this, "grandTotalPrice");
2854
+ __publicField$D(this, "emptyCartAlert");
2855
+ __publicField$D(this, "stockReachedAlert");
2856
+ __publicField$D(this, "cartLineItemImages");
2857
+ __publicField$D(this, "unitPriceInfo");
2858
+ __publicField$D(this, "cartQuantityNumber");
2825
2859
  this.headline = page.getByRole("heading", { name: "Shopping cart" });
2826
2860
  this.goToCheckoutButton = page.getByRole("link", { name: "Go to checkout" });
2827
2861
  this.enterPromoInput = page.getByLabel("Promo code");
@@ -2862,25 +2896,25 @@ class CheckoutCart {
2862
2896
  }
2863
2897
  }
2864
2898
 
2865
- var __defProp$y = Object.defineProperty;
2866
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2867
- var __publicField$y = (obj, key, value) => {
2868
- __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
2899
+ var __defProp$C = Object.defineProperty;
2900
+ var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2901
+ var __publicField$C = (obj, key, value) => {
2902
+ __defNormalProp$C(obj, typeof key !== "symbol" ? key + "" : key, value);
2869
2903
  return value;
2870
2904
  };
2871
2905
  class OffCanvasCart {
2872
2906
  constructor(page) {
2873
2907
  this.page = page;
2874
- __publicField$y(this, "headline");
2875
- __publicField$y(this, "itemCount");
2876
- __publicField$y(this, "goToCheckoutButton");
2877
- __publicField$y(this, "goToCartButton");
2878
- __publicField$y(this, "continueShoppingButton");
2879
- __publicField$y(this, "enterPromoInput");
2880
- __publicField$y(this, "submitDiscountButton");
2881
- __publicField$y(this, "subTotalPrice");
2882
- __publicField$y(this, "shippingCosts");
2883
- __publicField$y(this, "cartQuantityNumber");
2908
+ __publicField$C(this, "headline");
2909
+ __publicField$C(this, "itemCount");
2910
+ __publicField$C(this, "goToCheckoutButton");
2911
+ __publicField$C(this, "goToCartButton");
2912
+ __publicField$C(this, "continueShoppingButton");
2913
+ __publicField$C(this, "enterPromoInput");
2914
+ __publicField$C(this, "submitDiscountButton");
2915
+ __publicField$C(this, "subTotalPrice");
2916
+ __publicField$C(this, "shippingCosts");
2917
+ __publicField$C(this, "cartQuantityNumber");
2884
2918
  this.headline = page.getByRole("heading", { name: "Shopping cart" });
2885
2919
  this.itemCount = page.locator(".offcanvas-cart-header-count");
2886
2920
  this.goToCheckoutButton = page.getByRole("link", { name: "Go to checkout" });
@@ -2922,36 +2956,36 @@ class OffCanvasCart {
2922
2956
  }
2923
2957
  }
2924
2958
 
2925
- var __defProp$x = Object.defineProperty;
2926
- var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2927
- var __publicField$x = (obj, key, value) => {
2928
- __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
2959
+ var __defProp$B = Object.defineProperty;
2960
+ var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2961
+ var __publicField$B = (obj, key, value) => {
2962
+ __defNormalProp$B(obj, typeof key !== "symbol" ? key + "" : key, value);
2929
2963
  return value;
2930
2964
  };
2931
2965
  class CheckoutConfirm {
2932
2966
  constructor(page) {
2933
2967
  this.page = page;
2934
- __publicField$x(this, "headline");
2935
- __publicField$x(this, "termsAndConditionsCheckbox");
2936
- __publicField$x(this, "immediateAccessToDigitalProductCheckbox");
2937
- __publicField$x(this, "grandTotalPrice");
2938
- __publicField$x(this, "taxPrice");
2939
- __publicField$x(this, "submitOrderButton");
2968
+ __publicField$B(this, "headline");
2969
+ __publicField$B(this, "termsAndConditionsCheckbox");
2970
+ __publicField$B(this, "immediateAccessToDigitalProductCheckbox");
2971
+ __publicField$B(this, "grandTotalPrice");
2972
+ __publicField$B(this, "taxPrice");
2973
+ __publicField$B(this, "submitOrderButton");
2940
2974
  /**
2941
2975
  * Payment options
2942
2976
  */
2943
- __publicField$x(this, "paymentCashOnDelivery");
2944
- __publicField$x(this, "paymentPaidInAdvance");
2945
- __publicField$x(this, "paymentInvoice");
2977
+ __publicField$B(this, "paymentCashOnDelivery");
2978
+ __publicField$B(this, "paymentPaidInAdvance");
2979
+ __publicField$B(this, "paymentInvoice");
2946
2980
  /**
2947
2981
  * Shipping options
2948
2982
  */
2949
- __publicField$x(this, "shippingStandard");
2950
- __publicField$x(this, "shippingExpress");
2983
+ __publicField$B(this, "shippingStandard");
2984
+ __publicField$B(this, "shippingExpress");
2951
2985
  /**
2952
2986
  * Product details
2953
2987
  */
2954
- __publicField$x(this, "cartLineItemImages");
2988
+ __publicField$B(this, "cartLineItemImages");
2955
2989
  this.headline = page.getByRole("heading", { name: "Complete order" });
2956
2990
  this.termsAndConditionsCheckbox = page.getByLabel("I have read and accepted the general terms and conditions.");
2957
2991
  this.immediateAccessToDigitalProductCheckbox = page.getByLabel("I want immediate access to the digital content and I acknowledge that thereby I waive my right to cancel.");
@@ -2970,21 +3004,21 @@ class CheckoutConfirm {
2970
3004
  }
2971
3005
  }
2972
3006
 
2973
- var __defProp$w = Object.defineProperty;
2974
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2975
- var __publicField$w = (obj, key, value) => {
2976
- __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
3007
+ var __defProp$A = Object.defineProperty;
3008
+ var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3009
+ var __publicField$A = (obj, key, value) => {
3010
+ __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
2977
3011
  return value;
2978
3012
  };
2979
3013
  class CheckoutFinish {
2980
3014
  constructor(page) {
2981
3015
  this.page = page;
2982
- __publicField$w(this, "headline");
2983
- __publicField$w(this, "orderNumberText");
2984
- __publicField$w(this, "grandTotalPrice");
2985
- __publicField$w(this, "taxPrice");
2986
- __publicField$w(this, "cartLineItemImages");
2987
- __publicField$w(this, "orderNumberRegex", /Your order number: #(\d+)/);
3016
+ __publicField$A(this, "headline");
3017
+ __publicField$A(this, "orderNumberText");
3018
+ __publicField$A(this, "grandTotalPrice");
3019
+ __publicField$A(this, "taxPrice");
3020
+ __publicField$A(this, "cartLineItemImages");
3021
+ __publicField$A(this, "orderNumberRegex", /Your order number: #(\d+)/);
2988
3022
  this.headline = page.getByRole("heading", { name: "Thank you for your order" });
2989
3023
  this.orderNumberText = page.getByText(this.orderNumberRegex);
2990
3024
  this.grandTotalPrice = page.locator('dt:has-text("Grand total") + dd');
@@ -3013,16 +3047,16 @@ class CheckoutFinish {
3013
3047
  }
3014
3048
  }
3015
3049
 
3016
- var __defProp$v = Object.defineProperty;
3017
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3018
- var __publicField$v = (obj, key, value) => {
3019
- __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
3050
+ var __defProp$z = Object.defineProperty;
3051
+ var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3052
+ var __publicField$z = (obj, key, value) => {
3053
+ __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
3020
3054
  return value;
3021
3055
  };
3022
3056
  class CheckoutRegister {
3023
3057
  constructor(page) {
3024
3058
  this.page = page;
3025
- __publicField$v(this, "cartLineItemImages");
3059
+ __publicField$z(this, "cartLineItemImages");
3026
3060
  this.cartLineItemImages = page.locator(".line-item-img-link");
3027
3061
  }
3028
3062
  url() {
@@ -3030,22 +3064,23 @@ class CheckoutRegister {
3030
3064
  }
3031
3065
  }
3032
3066
 
3033
- var __defProp$u = Object.defineProperty;
3034
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3035
- var __publicField$u = (obj, key, value) => {
3036
- __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
3067
+ var __defProp$y = Object.defineProperty;
3068
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3069
+ var __publicField$y = (obj, key, value) => {
3070
+ __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
3037
3071
  return value;
3038
3072
  };
3039
3073
  class Account {
3040
3074
  constructor(page) {
3041
3075
  this.page = page;
3042
- __publicField$u(this, "headline");
3043
- __publicField$u(this, "personalDataCardTitle");
3044
- __publicField$u(this, "paymentMethodCardTitle");
3045
- __publicField$u(this, "billingAddressCardTitle");
3046
- __publicField$u(this, "shippingAddressCardTitle");
3047
- __publicField$u(this, "newsletterCheckbox");
3048
- __publicField$u(this, "newsletterRegistrationSuccessMessage");
3076
+ __publicField$y(this, "headline");
3077
+ __publicField$y(this, "personalDataCardTitle");
3078
+ __publicField$y(this, "paymentMethodCardTitle");
3079
+ __publicField$y(this, "billingAddressCardTitle");
3080
+ __publicField$y(this, "shippingAddressCardTitle");
3081
+ __publicField$y(this, "newsletterCheckbox");
3082
+ __publicField$y(this, "newsletterRegistrationSuccessMessage");
3083
+ __publicField$y(this, "customerGroupRequestMessage");
3049
3084
  this.headline = page.getByRole("heading", { name: "Overview" });
3050
3085
  this.personalDataCardTitle = page.getByRole("heading", { name: "Personal data" });
3051
3086
  this.paymentMethodCardTitle = page.getByRole("heading", { name: "Default payment method" });
@@ -3053,38 +3088,45 @@ class Account {
3053
3088
  this.shippingAddressCardTitle = page.getByRole("heading", { name: "Default shipping address" });
3054
3089
  this.newsletterCheckbox = page.getByLabel("Yes, I would like to");
3055
3090
  this.newsletterRegistrationSuccessMessage = page.getByText("You have successfully subscribed to the newsletter.");
3091
+ this.customerGroupRequestMessage = page.locator(".alert-content");
3092
+ }
3093
+ async getCustomerGroupAlert(customerGroup) {
3094
+ return this.customerGroupRequestMessage.getByText(`Access to customer group "${customerGroup}" requested.`);
3056
3095
  }
3057
3096
  url() {
3058
3097
  return "account";
3059
3098
  }
3060
3099
  }
3061
3100
 
3062
- var __defProp$t = Object.defineProperty;
3063
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3064
- var __publicField$t = (obj, key, value) => {
3065
- __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
3101
+ var __defProp$x = Object.defineProperty;
3102
+ var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3103
+ var __publicField$x = (obj, key, value) => {
3104
+ __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
3066
3105
  return value;
3067
3106
  };
3068
3107
  class AccountLogin {
3069
3108
  constructor(page) {
3070
3109
  this.page = page;
3071
- __publicField$t(this, "emailInput");
3072
- __publicField$t(this, "passwordInput");
3073
- __publicField$t(this, "loginButton");
3074
- __publicField$t(this, "logoutLink");
3075
- __publicField$t(this, "successAlert");
3110
+ __publicField$x(this, "emailInput");
3111
+ __publicField$x(this, "passwordInput");
3112
+ __publicField$x(this, "loginButton");
3113
+ __publicField$x(this, "logoutLink");
3114
+ __publicField$x(this, "successAlert");
3076
3115
  // Inputs for registration
3077
- __publicField$t(this, "personalFormArea");
3078
- __publicField$t(this, "billingAddressFormArea");
3079
- __publicField$t(this, "firstNameInput");
3080
- __publicField$t(this, "lastNameInput");
3081
- __publicField$t(this, "registerEmailInput");
3082
- __publicField$t(this, "registerPasswordInput");
3083
- __publicField$t(this, "streetAddressInput");
3084
- __publicField$t(this, "cityInput");
3085
- __publicField$t(this, "countryInput");
3086
- __publicField$t(this, "postalCodeInput");
3087
- __publicField$t(this, "registerButton");
3116
+ __publicField$x(this, "personalFormArea");
3117
+ __publicField$x(this, "billingAddressFormArea");
3118
+ __publicField$x(this, "firstNameInput");
3119
+ __publicField$x(this, "lastNameInput");
3120
+ __publicField$x(this, "companyInput");
3121
+ __publicField$x(this, "departmentInput");
3122
+ __publicField$x(this, "vatRegNoInput");
3123
+ __publicField$x(this, "registerEmailInput");
3124
+ __publicField$x(this, "registerPasswordInput");
3125
+ __publicField$x(this, "streetAddressInput");
3126
+ __publicField$x(this, "cityInput");
3127
+ __publicField$x(this, "countryInput");
3128
+ __publicField$x(this, "postalCodeInput");
3129
+ __publicField$x(this, "registerButton");
3088
3130
  this.emailInput = page.getByLabel("Your email address");
3089
3131
  this.passwordInput = page.getByLabel("Your password");
3090
3132
  this.loginButton = page.getByRole("button", { name: "Log in" });
@@ -3093,6 +3135,9 @@ class AccountLogin {
3093
3135
  this.billingAddressFormArea = page.locator(".register-billing");
3094
3136
  this.firstNameInput = this.personalFormArea.getByLabel("First name*");
3095
3137
  this.lastNameInput = this.personalFormArea.getByLabel("Last name*");
3138
+ this.companyInput = this.personalFormArea.getByPlaceholder("Enter company...");
3139
+ this.departmentInput = this.personalFormArea.getByPlaceholder("Enter department...");
3140
+ this.vatRegNoInput = this.personalFormArea.getByPlaceholder("VAT Reg.No.");
3096
3141
  this.registerEmailInput = this.personalFormArea.getByLabel("Email address*");
3097
3142
  this.registerPasswordInput = this.personalFormArea.getByLabel("Password*");
3098
3143
  this.streetAddressInput = this.billingAddressFormArea.getByLabel("Street address*");
@@ -3108,29 +3153,29 @@ class AccountLogin {
3108
3153
  }
3109
3154
  }
3110
3155
 
3111
- var __defProp$s = Object.defineProperty;
3112
- var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3113
- var __publicField$s = (obj, key, value) => {
3114
- __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
3156
+ var __defProp$w = Object.defineProperty;
3157
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3158
+ var __publicField$w = (obj, key, value) => {
3159
+ __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
3115
3160
  return value;
3116
3161
  };
3117
3162
  class AccountProfile {
3118
3163
  constructor(page) {
3119
3164
  this.page = page;
3120
- __publicField$s(this, "salutationSelect");
3121
- __publicField$s(this, "firstNameInput");
3122
- __publicField$s(this, "lastNameInput");
3123
- __publicField$s(this, "saveProfileButton");
3124
- __publicField$s(this, "changeEmailButton");
3125
- __publicField$s(this, "emailAddressInput");
3126
- __publicField$s(this, "emailAddressConfirmInput");
3127
- __publicField$s(this, "emailConfirmPasswordInput");
3128
- __publicField$s(this, "saveEmailAddressButton");
3129
- __publicField$s(this, "changePasswordButton");
3130
- __publicField$s(this, "newPasswordInput");
3131
- __publicField$s(this, "newPasswordConfirmInput");
3132
- __publicField$s(this, "currentPasswordInput");
3133
- __publicField$s(this, "saveNewPasswordButton");
3165
+ __publicField$w(this, "salutationSelect");
3166
+ __publicField$w(this, "firstNameInput");
3167
+ __publicField$w(this, "lastNameInput");
3168
+ __publicField$w(this, "saveProfileButton");
3169
+ __publicField$w(this, "changeEmailButton");
3170
+ __publicField$w(this, "emailAddressInput");
3171
+ __publicField$w(this, "emailAddressConfirmInput");
3172
+ __publicField$w(this, "emailConfirmPasswordInput");
3173
+ __publicField$w(this, "saveEmailAddressButton");
3174
+ __publicField$w(this, "changePasswordButton");
3175
+ __publicField$w(this, "newPasswordInput");
3176
+ __publicField$w(this, "newPasswordConfirmInput");
3177
+ __publicField$w(this, "currentPasswordInput");
3178
+ __publicField$w(this, "saveNewPasswordButton");
3134
3179
  this.salutationSelect = page.getByLabel("Salutation");
3135
3180
  this.firstNameInput = page.getByPlaceholder("Enter first name...");
3136
3181
  this.lastNameInput = page.getByPlaceholder("Enter last name...");
@@ -3151,18 +3196,18 @@ class AccountProfile {
3151
3196
  }
3152
3197
  }
3153
3198
 
3154
- var __defProp$r = Object.defineProperty;
3155
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3156
- var __publicField$r = (obj, key, value) => {
3157
- __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
3199
+ var __defProp$v = Object.defineProperty;
3200
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3201
+ var __publicField$v = (obj, key, value) => {
3202
+ __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
3158
3203
  return value;
3159
3204
  };
3160
3205
  class AccountOrder {
3161
3206
  constructor(page) {
3162
3207
  this.page = page;
3163
- __publicField$r(this, "cartLineItemImages");
3164
- __publicField$r(this, "orderExpandButton");
3165
- __publicField$r(this, "digitalProductDownloadButton");
3208
+ __publicField$v(this, "cartLineItemImages");
3209
+ __publicField$v(this, "orderExpandButton");
3210
+ __publicField$v(this, "digitalProductDownloadButton");
3166
3211
  this.orderExpandButton = page.getByRole("button", { name: /Expand|Show details/ }).first();
3167
3212
  this.cartLineItemImages = page.locator(".line-item-img-link");
3168
3213
  this.digitalProductDownloadButton = page.getByRole("link", { name: "Download" }).first();
@@ -3172,20 +3217,20 @@ class AccountOrder {
3172
3217
  }
3173
3218
  }
3174
3219
 
3175
- var __defProp$q = Object.defineProperty;
3176
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3177
- var __publicField$q = (obj, key, value) => {
3178
- __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
3220
+ var __defProp$u = Object.defineProperty;
3221
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3222
+ var __publicField$u = (obj, key, value) => {
3223
+ __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
3179
3224
  return value;
3180
3225
  };
3181
3226
  class AccountAddresses {
3182
3227
  constructor(page) {
3183
3228
  this.page = page;
3184
- __publicField$q(this, "addNewAddressButton");
3185
- __publicField$q(this, "editBillingAddressButton");
3186
- __publicField$q(this, "editShippingAddressButton");
3187
- __publicField$q(this, "useDefaultBillingAddressButton");
3188
- __publicField$q(this, "useDefaultShippingAddressButton");
3229
+ __publicField$u(this, "addNewAddressButton");
3230
+ __publicField$u(this, "editBillingAddressButton");
3231
+ __publicField$u(this, "editShippingAddressButton");
3232
+ __publicField$u(this, "useDefaultBillingAddressButton");
3233
+ __publicField$u(this, "useDefaultShippingAddressButton");
3189
3234
  this.addNewAddressButton = page.getByRole("link", { name: /Add (new )?address/ });
3190
3235
  this.editBillingAddressButton = page.getByRole("link", { name: "Edit address" }).first();
3191
3236
  this.editShippingAddressButton = page.getByRole("link", { name: "Edit address" }).nth(1);
@@ -3197,19 +3242,19 @@ class AccountAddresses {
3197
3242
  }
3198
3243
  }
3199
3244
 
3200
- var __defProp$p = Object.defineProperty;
3201
- var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3202
- var __publicField$p = (obj, key, value) => {
3203
- __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
3245
+ var __defProp$t = Object.defineProperty;
3246
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3247
+ var __publicField$t = (obj, key, value) => {
3248
+ __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
3204
3249
  return value;
3205
3250
  };
3206
3251
  class AccountPayment {
3207
3252
  constructor(page) {
3208
3253
  this.page = page;
3209
- __publicField$p(this, "cashOnDeliveryOption");
3210
- __publicField$p(this, "paidInAdvanceOption");
3211
- __publicField$p(this, "invoiceOption");
3212
- __publicField$p(this, "changeDefaultPaymentButton");
3254
+ __publicField$t(this, "cashOnDeliveryOption");
3255
+ __publicField$t(this, "paidInAdvanceOption");
3256
+ __publicField$t(this, "invoiceOption");
3257
+ __publicField$t(this, "changeDefaultPaymentButton");
3213
3258
  this.cashOnDeliveryOption = page.getByLabel("Cash on delivery");
3214
3259
  this.paidInAdvanceOption = page.getByLabel("Paid in advance");
3215
3260
  this.invoiceOption = page.getByLabel("Invoice");
@@ -3220,17 +3265,17 @@ class AccountPayment {
3220
3265
  }
3221
3266
  }
3222
3267
 
3223
- var __defProp$o = Object.defineProperty;
3224
- var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3225
- var __publicField$o = (obj, key, value) => {
3226
- __defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
3268
+ var __defProp$s = Object.defineProperty;
3269
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3270
+ var __publicField$s = (obj, key, value) => {
3271
+ __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
3227
3272
  return value;
3228
3273
  };
3229
3274
  class Search {
3230
3275
  constructor(page) {
3231
3276
  this.page = page;
3232
- __publicField$o(this, "headline");
3233
- __publicField$o(this, "productImages");
3277
+ __publicField$s(this, "headline");
3278
+ __publicField$s(this, "productImages");
3234
3279
  this.headline = page.locator("h1.search-headline");
3235
3280
  this.productImages = page.locator(".product-image-link");
3236
3281
  }
@@ -3239,16 +3284,16 @@ class Search {
3239
3284
  }
3240
3285
  }
3241
3286
 
3242
- var __defProp$n = Object.defineProperty;
3243
- var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3244
- var __publicField$n = (obj, key, value) => {
3245
- __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
3287
+ var __defProp$r = Object.defineProperty;
3288
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3289
+ var __publicField$r = (obj, key, value) => {
3290
+ __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
3246
3291
  return value;
3247
3292
  };
3248
3293
  class SearchSuggest {
3249
3294
  constructor(page) {
3250
3295
  this.page = page;
3251
- __publicField$n(this, "searchSuggestLineItemImages");
3296
+ __publicField$r(this, "searchSuggestLineItemImages");
3252
3297
  this.searchSuggestLineItemImages = page.locator(".search-suggest-product-image-container");
3253
3298
  }
3254
3299
  url(searchTerm) {
@@ -3256,6 +3301,16 @@ class SearchSuggest {
3256
3301
  }
3257
3302
  }
3258
3303
 
3304
+ class CustomRegister extends AccountLogin {
3305
+ constructor(page) {
3306
+ super(page);
3307
+ this.page = page;
3308
+ }
3309
+ url(customCustomerGroupName) {
3310
+ return `${customCustomerGroupName?.replace(/\s+/g, "-") ?? ""}`;
3311
+ }
3312
+ }
3313
+
3259
3314
  const StorefrontPageObjects = {
3260
3315
  Home,
3261
3316
  ProductDetail: ProductDetail$1,
@@ -3272,7 +3327,8 @@ const StorefrontPageObjects = {
3272
3327
  AccountAddresses,
3273
3328
  AccountPayment,
3274
3329
  Search,
3275
- SearchSuggest
3330
+ SearchSuggest,
3331
+ CustomRegister
3276
3332
  };
3277
3333
  const test$6 = test$e.extend({
3278
3334
  StorefrontHome: async ({ StorefrontPage }, use) => {
@@ -3322,13 +3378,16 @@ const test$6 = test$e.extend({
3322
3378
  },
3323
3379
  StorefrontSearchSuggest: async ({ StorefrontPage }, use) => {
3324
3380
  await use(new SearchSuggest(StorefrontPage));
3381
+ },
3382
+ StorefrontCustomRegister: async ({ StorefrontPage }, use) => {
3383
+ await use(new CustomRegister(StorefrontPage));
3325
3384
  }
3326
3385
  });
3327
3386
 
3328
- var __defProp$m = Object.defineProperty;
3329
- var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3330
- var __publicField$m = (obj, key, value) => {
3331
- __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
3387
+ var __defProp$q = Object.defineProperty;
3388
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3389
+ var __publicField$q = (obj, key, value) => {
3390
+ __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
3332
3391
  return value;
3333
3392
  };
3334
3393
  class ProductDetail {
@@ -3337,44 +3396,44 @@ class ProductDetail {
3337
3396
  /**
3338
3397
  * Save interactions
3339
3398
  */
3340
- __publicField$m(this, "savePhysicalProductButton");
3341
- __publicField$m(this, "saveButtonLoadingSpinner");
3342
- __publicField$m(this, "saveButtonCheckMark");
3399
+ __publicField$q(this, "savePhysicalProductButton");
3400
+ __publicField$q(this, "saveButtonLoadingSpinner");
3401
+ __publicField$q(this, "saveButtonCheckMark");
3343
3402
  /**
3344
3403
  * Media Upload interactions
3345
3404
  */
3346
- __publicField$m(this, "uploadMediaButton");
3347
- __publicField$m(this, "coverImage");
3348
- __publicField$m(this, "productImage");
3405
+ __publicField$q(this, "uploadMediaButton");
3406
+ __publicField$q(this, "coverImage");
3407
+ __publicField$q(this, "productImage");
3349
3408
  /**
3350
3409
  * Tabs
3351
3410
  */
3352
- __publicField$m(this, "variantsTabLink");
3353
- __publicField$m(this, "specificationsTabLink");
3411
+ __publicField$q(this, "variantsTabLink");
3412
+ __publicField$q(this, "specificationsTabLink");
3354
3413
  /**
3355
3414
  * Variants Generation
3356
3415
  */
3357
- __publicField$m(this, "generateVariantsButton");
3358
- __publicField$m(this, "variantsModal");
3359
- __publicField$m(this, "variantsModalHeadline");
3360
- __publicField$m(this, "variantsNextButton");
3361
- __publicField$m(this, "variantsSaveButton");
3416
+ __publicField$q(this, "generateVariantsButton");
3417
+ __publicField$q(this, "variantsModal");
3418
+ __publicField$q(this, "variantsModalHeadline");
3419
+ __publicField$q(this, "variantsNextButton");
3420
+ __publicField$q(this, "variantsSaveButton");
3362
3421
  /**
3363
3422
  * Property Selection
3364
3423
  */
3365
- __publicField$m(this, "propertyGroupColor");
3366
- __publicField$m(this, "propertyGroupSize");
3367
- __publicField$m(this, "propertyOptionGrid");
3368
- __publicField$m(this, "propertyOptionColorBlue");
3369
- __publicField$m(this, "propertyOptionColorRed");
3370
- __publicField$m(this, "propertyOptionColorGreen");
3371
- __publicField$m(this, "propertyOptionSizeSmall");
3372
- __publicField$m(this, "propertyOptionSizeMedium");
3373
- __publicField$m(this, "propertyOptionSizeLarge");
3424
+ __publicField$q(this, "propertyGroupColor");
3425
+ __publicField$q(this, "propertyGroupSize");
3426
+ __publicField$q(this, "propertyOptionGrid");
3427
+ __publicField$q(this, "propertyOptionColorBlue");
3428
+ __publicField$q(this, "propertyOptionColorRed");
3429
+ __publicField$q(this, "propertyOptionColorGreen");
3430
+ __publicField$q(this, "propertyOptionSizeSmall");
3431
+ __publicField$q(this, "propertyOptionSizeMedium");
3432
+ __publicField$q(this, "propertyOptionSizeLarge");
3374
3433
  /**
3375
3434
  * Cards
3376
3435
  */
3377
- __publicField$m(this, "customFieldCard");
3436
+ __publicField$q(this, "customFieldCard");
3378
3437
  this.savePhysicalProductButton = page.getByRole("button", { name: "Save" });
3379
3438
  this.saveButtonCheckMark = page.locator(".icon--regular-checkmark-xs");
3380
3439
  this.saveButtonLoadingSpinner = page.locator("sw-loader");
@@ -3413,18 +3472,18 @@ class ProductDetail {
3413
3472
  }
3414
3473
  }
3415
3474
 
3416
- var __defProp$l = Object.defineProperty;
3417
- var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3418
- var __publicField$l = (obj, key, value) => {
3419
- __defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
3475
+ var __defProp$p = Object.defineProperty;
3476
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3477
+ var __publicField$p = (obj, key, value) => {
3478
+ __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
3420
3479
  return value;
3421
3480
  };
3422
3481
  class OrderDetail {
3423
3482
  constructor(page) {
3424
3483
  this.page = page;
3425
- __publicField$l(this, "saveButton");
3426
- __publicField$l(this, "dataGridContextButton");
3427
- __publicField$l(this, "orderTag");
3484
+ __publicField$p(this, "saveButton");
3485
+ __publicField$p(this, "dataGridContextButton");
3486
+ __publicField$p(this, "orderTag");
3428
3487
  this.saveButton = page.locator(".sw-order-detail__smart-bar-save-button");
3429
3488
  this.dataGridContextButton = page.locator(".sw-data-grid__actions-menu").and(page.getByRole("button"));
3430
3489
  this.orderTag = page.locator(".sw-select-selection-list__item");
@@ -3434,27 +3493,71 @@ class OrderDetail {
3434
3493
  }
3435
3494
  }
3436
3495
 
3437
- var __defProp$k = Object.defineProperty;
3438
- var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3439
- var __publicField$k = (obj, key, value) => {
3440
- __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
3496
+ var __defProp$o = Object.defineProperty;
3497
+ var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3498
+ var __publicField$o = (obj, key, value) => {
3499
+ __defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
3500
+ return value;
3501
+ };
3502
+ class CustomerListing {
3503
+ constructor(page) {
3504
+ this.page = page;
3505
+ __publicField$o(this, "headline");
3506
+ __publicField$o(this, "addCustomerButton");
3507
+ this.headline = page.getByRole("heading", { name: "Customers" });
3508
+ this.addCustomerButton = page.locator(".sw-customer-list__button-create");
3509
+ }
3510
+ async getCustomerByEmail(customerEmail) {
3511
+ const customer = this.page.getByRole("row").filter({ hasText: customerEmail });
3512
+ const customerName = customer.locator(".sw-data-grid__cell--firstName a");
3513
+ const customerStreet = customer.locator(".sw-data-grid__cell--defaultBillingAddress-street");
3514
+ const customerPostalCode = customer.locator(".sw-data-grid__cell--defaultBillingAddress-zipcode");
3515
+ const customerCity = customer.locator(".sw-data-grid__cell--defaultBillingAddress-city");
3516
+ const customerNumber = customer.locator(".sw-data-grid__cell--customerNumber");
3517
+ const customerGroup = customer.locator(".sw-data-grid__cell--group");
3518
+ const customerEmailAddress = customer.locator(".sw-data-grid__cell--email");
3519
+ return {
3520
+ customerName,
3521
+ customerStreet,
3522
+ customerPostalCode,
3523
+ customerCity,
3524
+ customerNumber,
3525
+ customerGroup,
3526
+ customerEmailAddress
3527
+ };
3528
+ }
3529
+ url() {
3530
+ return "#/sw/customer/index";
3531
+ }
3532
+ }
3533
+
3534
+ var __defProp$n = Object.defineProperty;
3535
+ var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3536
+ var __publicField$n = (obj, key, value) => {
3537
+ __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
3441
3538
  return value;
3442
3539
  };
3443
3540
  class CustomerDetail {
3444
3541
  constructor(page) {
3445
3542
  this.page = page;
3446
- __publicField$k(this, "editButton");
3447
- __publicField$k(this, "generalTab");
3448
- __publicField$k(this, "accountCard");
3449
- __publicField$k(this, "customFieldCard");
3450
- __publicField$k(this, "customFieldSetTabs");
3451
- __publicField$k(this, "customFieldSetTabCustomContent");
3543
+ __publicField$n(this, "editButton");
3544
+ __publicField$n(this, "generalTab");
3545
+ __publicField$n(this, "accountCard");
3546
+ __publicField$n(this, "customFieldCard");
3547
+ __publicField$n(this, "customFieldSetTabs");
3548
+ __publicField$n(this, "customFieldSetTabCustomContent");
3549
+ __publicField$n(this, "customerGroupRequestMessage");
3550
+ __publicField$n(this, "customerGroupAcceptButton");
3551
+ __publicField$n(this, "customerGroupDeclineButton");
3452
3552
  this.editButton = page.getByRole("button", { name: "Edit" });
3453
3553
  this.generalTab = page.getByRole("link", { name: "General" });
3454
3554
  this.accountCard = page.locator(".sw-customer-card");
3455
3555
  this.customFieldCard = page.locator(".sw-card").getByText("Custom fields");
3456
3556
  this.customFieldSetTabs = this.customFieldCard.locator(".sw-tabs-item");
3457
3557
  this.customFieldSetTabCustomContent = this.customFieldCard.locator(".sw-tabs__custom-content");
3558
+ this.customerGroupRequestMessage = page.locator(".sw-alert__message");
3559
+ this.customerGroupAcceptButton = page.getByRole("button", { name: "Accept" });
3560
+ this.customerGroupDeclineButton = page.getByRole("button", { name: "Decline" });
3458
3561
  }
3459
3562
  async getCustomFieldSetCardContentByName(customFieldSetName) {
3460
3563
  const customFieldCard = this.page.locator(".sw-card").filter({ hasText: "Custom fields" });
@@ -3465,11 +3568,113 @@ class CustomerDetail {
3465
3568
  customFieldSetTabCustomContent
3466
3569
  };
3467
3570
  }
3571
+ async getCustomerGroupAlert(customerGroup) {
3572
+ return this.customerGroupRequestMessage.getByText(`Access to customer group "${customerGroup}" requested.`);
3573
+ }
3468
3574
  url(customerId) {
3469
3575
  return `#/sw/customer/detail/${customerId}/base`;
3470
3576
  }
3471
3577
  }
3472
3578
 
3579
+ var __defProp$m = Object.defineProperty;
3580
+ var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3581
+ var __publicField$m = (obj, key, value) => {
3582
+ __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
3583
+ return value;
3584
+ };
3585
+ class CustomerGroupListing {
3586
+ constructor(page) {
3587
+ this.page = page;
3588
+ __publicField$m(this, "headline");
3589
+ __publicField$m(this, "addCustomerGroupButton");
3590
+ this.headline = page.getByRole("heading", { name: "Customer groups" });
3591
+ this.addCustomerGroupButton = page.locator(".sw-settings-customer-group-list__create");
3592
+ }
3593
+ async getCustomerGroupByName(customerGroup) {
3594
+ const lineItem = this.page.getByRole("row").filter({ hasText: customerGroup });
3595
+ const customerGroupCheckbox = lineItem.locator(".sw-data-grid__cell--selection");
3596
+ const customerGroupName = lineItem.locator(".sw-data-grid__cell--name");
3597
+ const customerGroupTaxDisplay = lineItem.locator(".sw-data-grid__cell--displayGross");
3598
+ const customerGroupActionButton = lineItem.locator(".sw-data-grid__actions-menu");
3599
+ return {
3600
+ customerGroupCheckbox,
3601
+ customerGroupName,
3602
+ customerGroupTaxDisplay,
3603
+ customerGroupActionButton
3604
+ };
3605
+ }
3606
+ url() {
3607
+ return "#/sw/settings/customer/group/index";
3608
+ }
3609
+ }
3610
+
3611
+ var __defProp$l = Object.defineProperty;
3612
+ var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3613
+ var __publicField$l = (obj, key, value) => {
3614
+ __defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
3615
+ return value;
3616
+ };
3617
+ class CustomerGroupCreate {
3618
+ constructor(page) {
3619
+ this.page = page;
3620
+ __publicField$l(this, "headline");
3621
+ __publicField$l(this, "saveButton");
3622
+ __publicField$l(this, "cancelButton");
3623
+ __publicField$l(this, "cardTitle");
3624
+ __publicField$l(this, "customerGroupNameField");
3625
+ __publicField$l(this, "customerGroupGrossTaxDisplay");
3626
+ __publicField$l(this, "customerGroupNetTaxDisplay");
3627
+ __publicField$l(this, "customSignupFormToggle");
3628
+ __publicField$l(this, "signupFormTitle");
3629
+ __publicField$l(this, "signupFormIntroduction");
3630
+ __publicField$l(this, "signupFormSeoDescription");
3631
+ __publicField$l(this, "signupFormCompanySignupToggle");
3632
+ __publicField$l(this, "customerGroupSaleschannelSelection");
3633
+ __publicField$l(this, "customerGroupSaleschannelResultList");
3634
+ this.headline = page.getByRole("heading", { name: "New customer group" });
3635
+ this.saveButton = page.getByRole("button", { name: "Save" });
3636
+ this.cancelButton = page.getByRole("button", { name: "Cancel" });
3637
+ this.cardTitle = page.getByRole("heading", { name: "Customer group" });
3638
+ this.customerGroupNameField = page.locator("#sw-field--customerGroup-name");
3639
+ this.customerGroupGrossTaxDisplay = page.locator("#sw-field--castedValue-0");
3640
+ this.customerGroupNetTaxDisplay = page.locator("#sw-field--castedValue-1");
3641
+ this.customSignupFormToggle = page.getByLabel("Custom signup form");
3642
+ this.signupFormTitle = page.locator("#sw-field--customerGroup-registrationTitle");
3643
+ this.signupFormIntroduction = page.locator(".sw-text-editor__content-editor");
3644
+ this.signupFormSeoDescription = page.locator("#sw-field--customerGroup-registrationSeoMetaDescription");
3645
+ this.signupFormCompanySignupToggle = page.getByLabel("Company signup form");
3646
+ this.customerGroupSaleschannelSelection = page.locator("input[class=sw-select-selection-list__input]");
3647
+ this.customerGroupSaleschannelResultList = page.locator(".sw-select-result-list__content");
3648
+ }
3649
+ url() {
3650
+ return "#/sw/settings/customer/group/create";
3651
+ }
3652
+ }
3653
+
3654
+ var __defProp$k = Object.defineProperty;
3655
+ var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3656
+ var __publicField$k = (obj, key, value) => {
3657
+ __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
3658
+ return value;
3659
+ };
3660
+ class CustomerGroupDetail extends CustomerGroupCreate {
3661
+ constructor(page) {
3662
+ super(page);
3663
+ this.page = page;
3664
+ __publicField$k(this, "headline");
3665
+ __publicField$k(this, "selectedSalesChannel");
3666
+ __publicField$k(this, "technicalUrl");
3667
+ __publicField$k(this, "saleschannelUrl");
3668
+ this.headline = page.locator(".smart-bar__header");
3669
+ this.selectedSalesChannel = page.locator(".sw-select-selection-list");
3670
+ this.technicalUrl = page.getByLabel("Technical URL");
3671
+ this.saleschannelUrl = page.getByLabel(/.*URL/).last();
3672
+ }
3673
+ url(customerGroupId) {
3674
+ return `#/sw/settings/customer/group/detail/${customerGroupId}`;
3675
+ }
3676
+ }
3677
+
3473
3678
  var __defProp$j = Object.defineProperty;
3474
3679
  var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3475
3680
  var __publicField$j = (obj, key, value) => {
@@ -4266,7 +4471,11 @@ class ManufacturerDetail extends ManufacturerCreate {
4266
4471
  const AdminPageObjects = {
4267
4472
  ProductDetail,
4268
4473
  OrderDetail,
4474
+ CustomerListing,
4269
4475
  CustomerDetail,
4476
+ CustomerGroupListing,
4477
+ CustomerGroupCreate,
4478
+ CustomerGroupDetail,
4270
4479
  FirstRunWizard,
4271
4480
  FlowBuilderCreate,
4272
4481
  FlowBuilderListing,
@@ -4294,9 +4503,21 @@ const test$5 = test$e.extend({
4294
4503
  AdminOrderDetail: async ({ AdminPage }, use) => {
4295
4504
  await use(new OrderDetail(AdminPage));
4296
4505
  },
4506
+ AdminCustomerListing: async ({ AdminPage }, use) => {
4507
+ await use(new CustomerListing(AdminPage));
4508
+ },
4297
4509
  AdminCustomerDetail: async ({ AdminPage }, use) => {
4298
4510
  await use(new CustomerDetail(AdminPage));
4299
4511
  },
4512
+ AdminCustomerGroupListing: async ({ AdminPage }, use) => {
4513
+ await use(new CustomerGroupListing(AdminPage));
4514
+ },
4515
+ AdminCustomerGroupCreate: async ({ AdminPage }, use) => {
4516
+ await use(new CustomerGroupCreate(AdminPage));
4517
+ },
4518
+ AdminCustomerGroupDetail: async ({ AdminPage }, use) => {
4519
+ await use(new CustomerGroupDetail(AdminPage));
4520
+ },
4300
4521
  AdminFirstRunWizard: async ({ AdminPage }, use) => {
4301
4522
  await use(new FirstRunWizard(AdminPage));
4302
4523
  },
@@ -4979,9 +5200,12 @@ const Register = test$e.extend({
4979
5200
  street: "Ebbinghof 10",
4980
5201
  city: "Sch\xF6ppingen",
4981
5202
  country: "Germany",
4982
- postalCode: "48624"
5203
+ postalCode: "48624",
5204
+ company: "shopware",
5205
+ department: "Operations",
5206
+ vatRegNo: "DE1234567890"
4983
5207
  };
4984
- const task = (email) => {
5208
+ const task = (email, isCommercial) => {
4985
5209
  return async function Register2() {
4986
5210
  registrationData.email = email;
4987
5211
  await StorefrontAccountLogin.firstNameInput.fill(registrationData.firstName);
@@ -4992,6 +5216,11 @@ const Register = test$e.extend({
4992
5216
  await StorefrontAccountLogin.cityInput.fill(registrationData.city);
4993
5217
  await StorefrontAccountLogin.countryInput.selectOption(registrationData.country);
4994
5218
  await StorefrontAccountLogin.postalCodeInput.fill(registrationData.postalCode);
5219
+ if (isCommercial) {
5220
+ await StorefrontAccountLogin.companyInput.fill(registrationData.company);
5221
+ await StorefrontAccountLogin.departmentInput.fill(registrationData.department);
5222
+ await StorefrontAccountLogin.vatRegNoInput.fill(registrationData.vatRegNo);
5223
+ }
4995
5224
  await StorefrontAccountLogin.registerButton.click();
4996
5225
  };
4997
5226
  };