@shopware-ag/acceptance-test-suite 1.4.0 → 2.0.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
@@ -196,6 +196,9 @@ function extractIdFromUrl(url) {
196
196
  const segments = url.split("/");
197
197
  return segments.length > 0 ? segments[segments.length - 1] : null;
198
198
  }
199
+ const setOrderStatus = async (orderId, orderStatus, adminApiContext) => {
200
+ return await adminApiContext.post(`./_action/order/${orderId}/state/${orderStatus}`);
201
+ };
199
202
 
200
203
  const test$a = test$c.extend({
201
204
  SalesChannelBaseConfig: [
@@ -417,16 +420,16 @@ const test$a = test$c.extend({
417
420
  ]
418
421
  });
419
422
 
420
- var __defProp$o = Object.defineProperty;
421
- var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
422
- var __publicField$o = (obj, key, value) => {
423
- __defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
423
+ var __defProp$r = Object.defineProperty;
424
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
425
+ var __publicField$r = (obj, key, value) => {
426
+ __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
424
427
  return value;
425
428
  };
426
429
  const _AdminApiContext = class _AdminApiContext {
427
430
  constructor(context, options) {
428
- __publicField$o(this, "context");
429
- __publicField$o(this, "options");
431
+ __publicField$r(this, "context");
432
+ __publicField$r(this, "options");
430
433
  this.context = context;
431
434
  this.options = options;
432
435
  }
@@ -518,7 +521,7 @@ const _AdminApiContext = class _AdminApiContext {
518
521
  return this.context.head(url, options);
519
522
  }
520
523
  };
521
- __publicField$o(_AdminApiContext, "defaultOptions", {
524
+ __publicField$r(_AdminApiContext, "defaultOptions", {
522
525
  app_url: process.env["APP_URL"],
523
526
  client_id: process.env["SHOPWARE_ACCESS_KEY_ID"],
524
527
  client_secret: process.env["SHOPWARE_SECRET_ACCESS_KEY"],
@@ -528,16 +531,16 @@ __publicField$o(_AdminApiContext, "defaultOptions", {
528
531
  });
529
532
  let AdminApiContext = _AdminApiContext;
530
533
 
531
- var __defProp$n = Object.defineProperty;
532
- var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
533
- var __publicField$n = (obj, key, value) => {
534
- __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
534
+ var __defProp$q = Object.defineProperty;
535
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
536
+ var __publicField$q = (obj, key, value) => {
537
+ __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
535
538
  return value;
536
539
  };
537
540
  const _StoreApiContext = class _StoreApiContext {
538
541
  constructor(context, options) {
539
- __publicField$n(this, "context");
540
- __publicField$n(this, "options");
542
+ __publicField$q(this, "context");
543
+ __publicField$q(this, "options");
541
544
  this.context = context;
542
545
  this.options = options;
543
546
  }
@@ -596,7 +599,7 @@ const _StoreApiContext = class _StoreApiContext {
596
599
  return this.context.head(url, options);
597
600
  }
598
601
  };
599
- __publicField$n(_StoreApiContext, "defaultOptions", {
602
+ __publicField$q(_StoreApiContext, "defaultOptions", {
600
603
  app_url: process.env["APP_URL"],
601
604
  ignoreHTTPSErrors: true
602
605
  });
@@ -688,17 +691,17 @@ const test$8 = test$c.extend({
688
691
  }
689
692
  });
690
693
 
691
- var __defProp$m = Object.defineProperty;
692
- var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
693
- var __publicField$m = (obj, key, value) => {
694
- __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
694
+ var __defProp$p = Object.defineProperty;
695
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
696
+ var __publicField$p = (obj, key, value) => {
697
+ __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
695
698
  return value;
696
699
  };
697
700
  class Actor {
698
701
  constructor(name, page) {
699
- __publicField$m(this, "page");
700
- __publicField$m(this, "name");
701
- __publicField$m(this, "expects", expect);
702
+ __publicField$p(this, "page");
703
+ __publicField$p(this, "name");
704
+ __publicField$p(this, "expects", expect);
702
705
  this.name = name;
703
706
  this.page = page;
704
707
  }
@@ -706,10 +709,10 @@ class Actor {
706
709
  const stepTitle = `${this.name} attempts to ${this.camelCaseToLowerCase(task.name)}`;
707
710
  await test$c.step(stepTitle, async () => await task());
708
711
  }
709
- async goesTo(pageObject) {
710
- const stepTitle = `${this.name} navigates to ${this.camelCaseToLowerCase(pageObject.constructor.name)}`;
712
+ async goesTo(url) {
713
+ const stepTitle = `${this.name} navigates to "${url}"`;
711
714
  await test$c.step(stepTitle, async () => {
712
- await pageObject.goTo();
715
+ await this.page.goto(url);
713
716
  await this.page.addStyleTag({
714
717
  content: `
715
718
  .sf-toolbar {
@@ -738,16 +741,16 @@ const test$7 = test$c.extend({
738
741
  }
739
742
  });
740
743
 
741
- var __defProp$l = Object.defineProperty;
742
- var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
743
- var __publicField$l = (obj, key, value) => {
744
- __defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
744
+ var __defProp$o = Object.defineProperty;
745
+ var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
746
+ var __publicField$o = (obj, key, value) => {
747
+ __defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
745
748
  return value;
746
749
  };
747
750
  class IdProvider {
748
751
  constructor(workerIndex, seed) {
749
- __publicField$l(this, "workerIndex");
750
- __publicField$l(this, "seed");
752
+ __publicField$o(this, "workerIndex");
753
+ __publicField$o(this, "seed");
751
754
  this.workerIndex = workerIndex;
752
755
  this.seed = seed;
753
756
  }
@@ -787,103 +790,98 @@ const test$6 = test$c.extend({
787
790
  ]
788
791
  });
789
792
 
790
- var __defProp$k = Object.defineProperty;
791
- var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
792
- var __publicField$k = (obj, key, value) => {
793
- __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
793
+ var __defProp$n = Object.defineProperty;
794
+ var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
795
+ var __publicField$n = (obj, key, value) => {
796
+ __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
794
797
  return value;
795
798
  };
796
799
  class Home {
797
800
  constructor(page) {
798
801
  this.page = page;
799
- __publicField$k(this, "productImages");
802
+ __publicField$n(this, "productImages");
800
803
  this.productImages = page.locator(".product-image-link");
801
804
  }
802
- async goTo() {
803
- await this.page.goto("./");
805
+ url() {
806
+ return "/";
804
807
  }
805
808
  }
806
809
 
807
- var __defProp$j = Object.defineProperty;
808
- var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
809
- var __publicField$j = (obj, key, value) => {
810
- __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
810
+ var __defProp$m = Object.defineProperty;
811
+ var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
812
+ var __publicField$m = (obj, key, value) => {
813
+ __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
811
814
  return value;
812
815
  };
813
816
  let ProductDetail$1 = class ProductDetail {
814
- constructor(page, productData) {
817
+ constructor(page) {
815
818
  this.page = page;
816
- this.productData = productData;
817
- __publicField$j(this, "addToCartButton");
818
- __publicField$j(this, "offCanvasCartTitle");
819
- __publicField$j(this, "offCanvasCart");
820
- __publicField$j(this, "offCanvasCartGoToCheckoutButton");
821
- __publicField$j(this, "productSingleImage");
822
- __publicField$j(this, "offCanvasLineItemImages");
823
- __publicField$j(this, "quantitySelect");
824
- __publicField$j(this, "offCanvasSummaryTotalPrice");
825
- __publicField$j(this, "offCanvas");
819
+ __publicField$m(this, "addToCartButton");
820
+ __publicField$m(this, "quantitySelect");
821
+ __publicField$m(this, "productSingleImage");
822
+ __publicField$m(this, "offCanvasCartTitle");
823
+ __publicField$m(this, "offCanvasCart");
824
+ __publicField$m(this, "offCanvasCartGoToCheckoutButton");
825
+ __publicField$m(this, "offCanvasLineItemImages");
826
+ __publicField$m(this, "offCanvasSummaryTotalPrice");
827
+ __publicField$m(this, "offCanvas");
826
828
  this.addToCartButton = page.getByRole("button", { name: "Add to shopping cart" });
829
+ this.quantitySelect = page.getByLabel("Quantity", { exact: true });
830
+ this.productSingleImage = page.locator(".gallery-slider-single-image");
831
+ this.offCanvas = page.locator("offcanvas-body");
827
832
  this.offCanvasCartTitle = page.getByText("Shopping cart", { exact: true });
828
833
  this.offCanvasCart = page.getByRole("dialog");
829
834
  this.offCanvasCartGoToCheckoutButton = page.getByRole("link", { name: "Go to checkout" });
830
835
  this.offCanvasLineItemImages = page.locator(".line-item-img-link");
831
- this.quantitySelect = page.getByLabel("Quantity", { exact: true });
832
- this.offCanvas = page.locator("offcanvas-body");
833
836
  this.offCanvasSummaryTotalPrice = page.locator(".offcanvas-summary").locator('dt:has-text("Subtotal") + dd');
834
- this.productSingleImage = page.locator(".gallery-slider-single-image");
835
837
  }
836
- async goTo(productData = this.productData) {
838
+ url(productData) {
837
839
  let namePath = "";
838
840
  if (productData.translated && productData.translated.name) {
839
841
  namePath = productData.translated.name.replaceAll("_", "-");
840
842
  }
841
- const url = `${namePath}/${productData.productNumber}`;
842
- await this.page.goto(url);
843
+ return `${namePath}/${productData.productNumber}`;
843
844
  }
844
845
  };
845
846
 
846
- var __defProp$i = Object.defineProperty;
847
- var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
848
- var __publicField$i = (obj, key, value) => {
849
- __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
847
+ var __defProp$l = Object.defineProperty;
848
+ var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
849
+ var __publicField$l = (obj, key, value) => {
850
+ __defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
850
851
  return value;
851
852
  };
852
853
  class Category {
853
- constructor(page, CategoryData) {
854
+ constructor(page) {
854
855
  this.page = page;
855
- __publicField$i(this, "categoryData");
856
- __publicField$i(this, "sortingSelect");
857
- __publicField$i(this, "firstProductBuyButton");
858
- __publicField$i(this, "noProductsFoundAlert");
859
- this.categoryData = CategoryData;
856
+ __publicField$l(this, "sortingSelect");
857
+ __publicField$l(this, "firstProductBuyButton");
858
+ __publicField$l(this, "noProductsFoundAlert");
860
859
  this.sortingSelect = page.getByLabel("Sorting");
861
860
  this.firstProductBuyButton = page.getByRole("button", { name: "Add to shopping cart" }).first();
862
861
  this.noProductsFoundAlert = page.getByText("No products found.");
863
862
  }
864
- async goTo() {
865
- const url = `${this.categoryData.name}`;
866
- await this.page.goto(url);
863
+ url(categoryName) {
864
+ return `${categoryName}`;
867
865
  }
868
866
  }
869
867
 
870
- var __defProp$h = Object.defineProperty;
871
- var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
872
- var __publicField$h = (obj, key, value) => {
873
- __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
868
+ var __defProp$k = Object.defineProperty;
869
+ var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
870
+ var __publicField$k = (obj, key, value) => {
871
+ __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
874
872
  return value;
875
873
  };
876
874
  class CheckoutCart {
877
875
  constructor(page) {
878
876
  this.page = page;
879
- __publicField$h(this, "headline");
880
- __publicField$h(this, "goToCheckoutButton");
881
- __publicField$h(this, "enterDiscountInput");
882
- __publicField$h(this, "grandTotalPrice");
883
- __publicField$h(this, "emptyCartAlert");
884
- __publicField$h(this, "stockReachedAlert");
885
- __publicField$h(this, "cartLineItemImages");
886
- __publicField$h(this, "unitPriceInfo");
877
+ __publicField$k(this, "headline");
878
+ __publicField$k(this, "goToCheckoutButton");
879
+ __publicField$k(this, "enterDiscountInput");
880
+ __publicField$k(this, "grandTotalPrice");
881
+ __publicField$k(this, "emptyCartAlert");
882
+ __publicField$k(this, "stockReachedAlert");
883
+ __publicField$k(this, "cartLineItemImages");
884
+ __publicField$k(this, "unitPriceInfo");
887
885
  this.headline = page.getByRole("heading", { name: "Shopping cart" });
888
886
  this.goToCheckoutButton = page.getByRole("link", { name: "Go to checkout" });
889
887
  this.enterDiscountInput = page.getByLabel("Discount code");
@@ -893,40 +891,40 @@ class CheckoutCart {
893
891
  this.cartLineItemImages = page.locator(".line-item-img-link");
894
892
  this.unitPriceInfo = page.locator(".line-item-unit-price-value");
895
893
  }
896
- async goTo() {
897
- await this.page.goto("checkout/cart");
894
+ url() {
895
+ return "checkout/cart";
898
896
  }
899
897
  }
900
898
 
901
- var __defProp$g = Object.defineProperty;
902
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
903
- var __publicField$g = (obj, key, value) => {
904
- __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
899
+ var __defProp$j = Object.defineProperty;
900
+ var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
901
+ var __publicField$j = (obj, key, value) => {
902
+ __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
905
903
  return value;
906
904
  };
907
905
  class CheckoutConfirm {
908
906
  constructor(page) {
909
907
  this.page = page;
910
- __publicField$g(this, "headline");
911
- __publicField$g(this, "termsAndConditionsCheckbox");
912
- __publicField$g(this, "immediateAccessToDigitalProductCheckbox");
913
- __publicField$g(this, "grandTotalPrice");
914
- __publicField$g(this, "submitOrderButton");
908
+ __publicField$j(this, "headline");
909
+ __publicField$j(this, "termsAndConditionsCheckbox");
910
+ __publicField$j(this, "immediateAccessToDigitalProductCheckbox");
911
+ __publicField$j(this, "grandTotalPrice");
912
+ __publicField$j(this, "submitOrderButton");
915
913
  /**
916
914
  * Payment options
917
915
  */
918
- __publicField$g(this, "paymentCashOnDelivery");
919
- __publicField$g(this, "paymentPaidInAdvance");
920
- __publicField$g(this, "paymentInvoice");
916
+ __publicField$j(this, "paymentCashOnDelivery");
917
+ __publicField$j(this, "paymentPaidInAdvance");
918
+ __publicField$j(this, "paymentInvoice");
921
919
  /**
922
920
  * Shipping options
923
921
  */
924
- __publicField$g(this, "shippingStandard");
925
- __publicField$g(this, "shippingExpress");
922
+ __publicField$j(this, "shippingStandard");
923
+ __publicField$j(this, "shippingExpress");
926
924
  /**
927
925
  * Product details
928
926
  */
929
- __publicField$g(this, "cartLineItemImages");
927
+ __publicField$j(this, "cartLineItemImages");
930
928
  this.headline = page.getByRole("heading", { name: "Complete order" });
931
929
  this.termsAndConditionsCheckbox = page.getByLabel("I have read and accepted the general terms and conditions.");
932
930
  this.immediateAccessToDigitalProductCheckbox = page.getByLabel("I want immediate access to the digital content and I acknowledge that thereby I waive my right to cancel.");
@@ -939,32 +937,32 @@ class CheckoutConfirm {
939
937
  this.shippingExpress = page.getByLabel("Express");
940
938
  this.cartLineItemImages = page.locator(".line-item-img-link");
941
939
  }
942
- async goTo() {
943
- await this.page.goto("checkout/confirm");
940
+ url() {
941
+ return "checkout/confirm";
944
942
  }
945
943
  }
946
944
 
947
- var __defProp$f = Object.defineProperty;
948
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
949
- var __publicField$f = (obj, key, value) => {
950
- __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
945
+ var __defProp$i = Object.defineProperty;
946
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
947
+ var __publicField$i = (obj, key, value) => {
948
+ __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
951
949
  return value;
952
950
  };
953
951
  class CheckoutFinish {
954
952
  constructor(page) {
955
953
  this.page = page;
956
- __publicField$f(this, "headline");
957
- __publicField$f(this, "orderNumberText");
958
- __publicField$f(this, "grandTotalPrice");
959
- __publicField$f(this, "cartLineItemImages");
960
- __publicField$f(this, "orderNumberRegex", /Your order number: #(\d+)/);
954
+ __publicField$i(this, "headline");
955
+ __publicField$i(this, "orderNumberText");
956
+ __publicField$i(this, "grandTotalPrice");
957
+ __publicField$i(this, "cartLineItemImages");
958
+ __publicField$i(this, "orderNumberRegex", /Your order number: #(\d+)/);
961
959
  this.headline = page.getByRole("heading", { name: "Thank you for your order" });
962
960
  this.orderNumberText = page.getByText(this.orderNumberRegex);
963
961
  this.grandTotalPrice = page.locator('dt:has-text("Grand total") + dd');
964
962
  this.cartLineItemImages = page.locator(".line-item-img-link");
965
963
  }
966
- async goTo() {
967
- console.error("The checkout finish page should only be navigated to via checkout action.");
964
+ url() {
965
+ return "checkout/finish";
968
966
  }
969
967
  async getOrderNumber() {
970
968
  const orderNumberText = await this.orderNumberText.textContent();
@@ -985,39 +983,39 @@ class CheckoutFinish {
985
983
  }
986
984
  }
987
985
 
988
- var __defProp$e = Object.defineProperty;
989
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
990
- var __publicField$e = (obj, key, value) => {
991
- __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
986
+ var __defProp$h = Object.defineProperty;
987
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
988
+ var __publicField$h = (obj, key, value) => {
989
+ __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
992
990
  return value;
993
991
  };
994
992
  class CheckoutRegister {
995
993
  constructor(page) {
996
994
  this.page = page;
997
- __publicField$e(this, "cartLineItemImages");
995
+ __publicField$h(this, "cartLineItemImages");
998
996
  this.cartLineItemImages = page.locator(".line-item-img-link");
999
997
  }
1000
- async goTo() {
1001
- await this.page.goto("checkout/register");
998
+ url() {
999
+ return "checkout/register";
1002
1000
  }
1003
1001
  }
1004
1002
 
1005
- var __defProp$d = Object.defineProperty;
1006
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1007
- var __publicField$d = (obj, key, value) => {
1008
- __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
1003
+ var __defProp$g = Object.defineProperty;
1004
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1005
+ var __publicField$g = (obj, key, value) => {
1006
+ __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
1009
1007
  return value;
1010
1008
  };
1011
1009
  class Account {
1012
1010
  constructor(page) {
1013
1011
  this.page = page;
1014
- __publicField$d(this, "headline");
1015
- __publicField$d(this, "personalDataCardTitle");
1016
- __publicField$d(this, "paymentMethodCardTitle");
1017
- __publicField$d(this, "billingAddressCardTitle");
1018
- __publicField$d(this, "shippingAddressCardTitle");
1019
- __publicField$d(this, "newsletterCheckbox");
1020
- __publicField$d(this, "newsletterRegistrationSuccessMessage");
1012
+ __publicField$g(this, "headline");
1013
+ __publicField$g(this, "personalDataCardTitle");
1014
+ __publicField$g(this, "paymentMethodCardTitle");
1015
+ __publicField$g(this, "billingAddressCardTitle");
1016
+ __publicField$g(this, "shippingAddressCardTitle");
1017
+ __publicField$g(this, "newsletterCheckbox");
1018
+ __publicField$g(this, "newsletterRegistrationSuccessMessage");
1021
1019
  this.headline = page.getByRole("heading", { name: "Overview" });
1022
1020
  this.personalDataCardTitle = page.getByRole("heading", { name: "Personal data" });
1023
1021
  this.paymentMethodCardTitle = page.getByRole("heading", { name: "Default payment method" });
@@ -1026,36 +1024,36 @@ class Account {
1026
1024
  this.newsletterCheckbox = page.getByLabel("Yes, I would like to");
1027
1025
  this.newsletterRegistrationSuccessMessage = page.getByText("You have successfully subscribed to the newsletter.");
1028
1026
  }
1029
- async goTo() {
1030
- await this.page.goto("account");
1027
+ url() {
1028
+ return "account";
1031
1029
  }
1032
1030
  }
1033
1031
 
1034
- var __defProp$c = Object.defineProperty;
1035
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1036
- var __publicField$c = (obj, key, value) => {
1037
- __defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
1032
+ var __defProp$f = Object.defineProperty;
1033
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1034
+ var __publicField$f = (obj, key, value) => {
1035
+ __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
1038
1036
  return value;
1039
1037
  };
1040
1038
  class AccountLogin {
1041
1039
  constructor(page) {
1042
1040
  this.page = page;
1043
- __publicField$c(this, "emailInput");
1044
- __publicField$c(this, "passwordInput");
1045
- __publicField$c(this, "loginButton");
1046
- __publicField$c(this, "logoutLink");
1047
- __publicField$c(this, "successAlert");
1041
+ __publicField$f(this, "emailInput");
1042
+ __publicField$f(this, "passwordInput");
1043
+ __publicField$f(this, "loginButton");
1044
+ __publicField$f(this, "logoutLink");
1045
+ __publicField$f(this, "successAlert");
1048
1046
  // Inputs for registration
1049
- __publicField$c(this, "personalFormArea");
1050
- __publicField$c(this, "billingAddressFormArea");
1051
- __publicField$c(this, "firstNameInput");
1052
- __publicField$c(this, "lastNameInput");
1053
- __publicField$c(this, "registerEmailInput");
1054
- __publicField$c(this, "registerPasswordInput");
1055
- __publicField$c(this, "streetAddressInput");
1056
- __publicField$c(this, "cityInput");
1057
- __publicField$c(this, "countryInput");
1058
- __publicField$c(this, "registerButton");
1047
+ __publicField$f(this, "personalFormArea");
1048
+ __publicField$f(this, "billingAddressFormArea");
1049
+ __publicField$f(this, "firstNameInput");
1050
+ __publicField$f(this, "lastNameInput");
1051
+ __publicField$f(this, "registerEmailInput");
1052
+ __publicField$f(this, "registerPasswordInput");
1053
+ __publicField$f(this, "streetAddressInput");
1054
+ __publicField$f(this, "cityInput");
1055
+ __publicField$f(this, "countryInput");
1056
+ __publicField$f(this, "registerButton");
1059
1057
  this.emailInput = page.getByLabel("Your email address");
1060
1058
  this.passwordInput = page.getByLabel("Your password");
1061
1059
  this.loginButton = page.getByRole("button", { name: "Log in" });
@@ -1073,34 +1071,34 @@ class AccountLogin {
1073
1071
  this.logoutLink = page.getByRole("link", { name: "Log out" });
1074
1072
  this.successAlert = page.getByText("Successfully logged out.");
1075
1073
  }
1076
- async goTo() {
1077
- await this.page.goto("account/login");
1074
+ url() {
1075
+ return "account/login";
1078
1076
  }
1079
1077
  }
1080
1078
 
1081
- var __defProp$b = Object.defineProperty;
1082
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1083
- var __publicField$b = (obj, key, value) => {
1084
- __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
1079
+ var __defProp$e = Object.defineProperty;
1080
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1081
+ var __publicField$e = (obj, key, value) => {
1082
+ __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
1085
1083
  return value;
1086
1084
  };
1087
1085
  class AccountProfile {
1088
1086
  constructor(page) {
1089
1087
  this.page = page;
1090
- __publicField$b(this, "salutationSelect");
1091
- __publicField$b(this, "firstNameInput");
1092
- __publicField$b(this, "lastNameInput");
1093
- __publicField$b(this, "saveProfileButton");
1094
- __publicField$b(this, "changeEmailButton");
1095
- __publicField$b(this, "emailAddressInput");
1096
- __publicField$b(this, "emailAddressConfirmInput");
1097
- __publicField$b(this, "emailConfirmPasswordInput");
1098
- __publicField$b(this, "saveEmailAddressButton");
1099
- __publicField$b(this, "changePasswordButton");
1100
- __publicField$b(this, "newPasswordInput");
1101
- __publicField$b(this, "newPasswordConfirmInput");
1102
- __publicField$b(this, "currentPasswordInput");
1103
- __publicField$b(this, "saveNewPasswordButton");
1088
+ __publicField$e(this, "salutationSelect");
1089
+ __publicField$e(this, "firstNameInput");
1090
+ __publicField$e(this, "lastNameInput");
1091
+ __publicField$e(this, "saveProfileButton");
1092
+ __publicField$e(this, "changeEmailButton");
1093
+ __publicField$e(this, "emailAddressInput");
1094
+ __publicField$e(this, "emailAddressConfirmInput");
1095
+ __publicField$e(this, "emailConfirmPasswordInput");
1096
+ __publicField$e(this, "saveEmailAddressButton");
1097
+ __publicField$e(this, "changePasswordButton");
1098
+ __publicField$e(this, "newPasswordInput");
1099
+ __publicField$e(this, "newPasswordConfirmInput");
1100
+ __publicField$e(this, "currentPasswordInput");
1101
+ __publicField$e(this, "saveNewPasswordButton");
1104
1102
  this.salutationSelect = page.getByLabel("Salutation");
1105
1103
  this.firstNameInput = page.getByPlaceholder("Enter first name...");
1106
1104
  this.lastNameInput = page.getByPlaceholder("Enter last name...");
@@ -1116,113 +1114,113 @@ class AccountProfile {
1116
1114
  this.currentPasswordInput = page.getByPlaceholder("Enter current password...");
1117
1115
  this.saveNewPasswordButton = page.locator("#profilePasswordForm").getByRole("button", { name: "Save changes" });
1118
1116
  }
1119
- async goTo() {
1120
- await this.page.goto("account/profile");
1117
+ url() {
1118
+ return "account/profile";
1121
1119
  }
1122
1120
  }
1123
1121
 
1124
- var __defProp$a = Object.defineProperty;
1125
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1126
- var __publicField$a = (obj, key, value) => {
1127
- __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
1122
+ var __defProp$d = Object.defineProperty;
1123
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1124
+ var __publicField$d = (obj, key, value) => {
1125
+ __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
1128
1126
  return value;
1129
1127
  };
1130
1128
  class AccountOrder {
1131
1129
  constructor(page) {
1132
1130
  this.page = page;
1133
- __publicField$a(this, "cartLineItemImages");
1134
- __publicField$a(this, "orderExpandButton");
1135
- __publicField$a(this, "digitalProductDownloadButton");
1131
+ __publicField$d(this, "cartLineItemImages");
1132
+ __publicField$d(this, "orderExpandButton");
1133
+ __publicField$d(this, "digitalProductDownloadButton");
1136
1134
  this.orderExpandButton = page.getByRole("button", { name: "Expand" }).first();
1137
1135
  this.cartLineItemImages = page.locator(".line-item-img-link");
1138
1136
  this.digitalProductDownloadButton = page.getByRole("link", { name: "Download" }).first();
1139
1137
  }
1140
- async goTo() {
1141
- await this.page.goto("account/order");
1138
+ url() {
1139
+ return "account/order";
1142
1140
  }
1143
1141
  }
1144
1142
 
1145
- var __defProp$9 = Object.defineProperty;
1146
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1147
- var __publicField$9 = (obj, key, value) => {
1148
- __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
1143
+ var __defProp$c = Object.defineProperty;
1144
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1145
+ var __publicField$c = (obj, key, value) => {
1146
+ __defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
1149
1147
  return value;
1150
1148
  };
1151
1149
  class AccountAddresses {
1152
1150
  constructor(page) {
1153
1151
  this.page = page;
1154
- __publicField$9(this, "addNewAddressButton");
1155
- __publicField$9(this, "editBillingAddressButton");
1156
- __publicField$9(this, "editShippingAddressButton");
1157
- __publicField$9(this, "useDefaultBillingAddressButton");
1158
- __publicField$9(this, "useDefaultShippingAddressButton");
1152
+ __publicField$c(this, "addNewAddressButton");
1153
+ __publicField$c(this, "editBillingAddressButton");
1154
+ __publicField$c(this, "editShippingAddressButton");
1155
+ __publicField$c(this, "useDefaultBillingAddressButton");
1156
+ __publicField$c(this, "useDefaultShippingAddressButton");
1159
1157
  this.addNewAddressButton = page.getByRole("link", { name: "Add new address" });
1160
1158
  this.editBillingAddressButton = page.getByRole("link", { name: "Edit address" }).first();
1161
1159
  this.editShippingAddressButton = page.getByRole("link", { name: "Edit address" }).nth(1);
1162
1160
  this.useDefaultBillingAddressButton = page.getByRole("button", { name: "Use as default billing address" });
1163
1161
  this.useDefaultShippingAddressButton = page.getByRole("button", { name: "Use as default shipping address" });
1164
1162
  }
1165
- async goTo() {
1166
- await this.page.goto("account/address");
1163
+ url() {
1164
+ return "account/address";
1167
1165
  }
1168
1166
  }
1169
1167
 
1170
- var __defProp$8 = Object.defineProperty;
1171
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1172
- var __publicField$8 = (obj, key, value) => {
1173
- __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
1168
+ var __defProp$b = Object.defineProperty;
1169
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1170
+ var __publicField$b = (obj, key, value) => {
1171
+ __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
1174
1172
  return value;
1175
1173
  };
1176
1174
  class AccountPayment {
1177
1175
  constructor(page) {
1178
1176
  this.page = page;
1179
- __publicField$8(this, "cashOnDeliveryOption");
1180
- __publicField$8(this, "paidInAdvanceOption");
1181
- __publicField$8(this, "invoiceOption");
1182
- __publicField$8(this, "changeDefaultPaymentButton");
1177
+ __publicField$b(this, "cashOnDeliveryOption");
1178
+ __publicField$b(this, "paidInAdvanceOption");
1179
+ __publicField$b(this, "invoiceOption");
1180
+ __publicField$b(this, "changeDefaultPaymentButton");
1183
1181
  this.cashOnDeliveryOption = page.getByLabel("Cash on delivery");
1184
1182
  this.paidInAdvanceOption = page.getByLabel("Paid in advance");
1185
1183
  this.invoiceOption = page.getByLabel("Invoice");
1186
1184
  this.changeDefaultPaymentButton = page.getByRole("button", { name: "Change" });
1187
1185
  }
1188
- async goTo() {
1189
- await this.page.goto("account/payment");
1186
+ url() {
1187
+ return "account/payment";
1190
1188
  }
1191
1189
  }
1192
1190
 
1193
- var __defProp$7 = Object.defineProperty;
1194
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1195
- var __publicField$7 = (obj, key, value) => {
1196
- __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
1191
+ var __defProp$a = Object.defineProperty;
1192
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1193
+ var __publicField$a = (obj, key, value) => {
1194
+ __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
1197
1195
  return value;
1198
1196
  };
1199
1197
  class Search {
1200
1198
  constructor(page) {
1201
1199
  this.page = page;
1202
- __publicField$7(this, "productImages");
1200
+ __publicField$a(this, "headline");
1201
+ __publicField$a(this, "productImages");
1202
+ this.headline = page.locator("h1.search-headline");
1203
1203
  this.productImages = page.locator(".product-image-link");
1204
1204
  }
1205
- async goTo() {
1206
- const url = `search?search`;
1207
- await this.page.goto(url);
1205
+ url(searchTerm) {
1206
+ return `search?search=${searchTerm}`;
1208
1207
  }
1209
1208
  }
1210
1209
 
1211
- var __defProp$6 = Object.defineProperty;
1212
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1213
- var __publicField$6 = (obj, key, value) => {
1214
- __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
1210
+ var __defProp$9 = Object.defineProperty;
1211
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1212
+ var __publicField$9 = (obj, key, value) => {
1213
+ __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
1215
1214
  return value;
1216
1215
  };
1217
1216
  class SearchSuggest {
1218
1217
  constructor(page) {
1219
1218
  this.page = page;
1220
- __publicField$6(this, "searchSuggestLineItemImages");
1219
+ __publicField$9(this, "searchSuggestLineItemImages");
1221
1220
  this.searchSuggestLineItemImages = page.locator(".search-suggest-product-image-container");
1222
1221
  }
1223
- async goTo() {
1224
- const url = `suggest?search`;
1225
- await this.page.goto(url);
1222
+ url(searchTerm) {
1223
+ return `suggest?search=${searchTerm}`;
1226
1224
  }
1227
1225
  }
1228
1226
 
@@ -1247,11 +1245,11 @@ const test$5 = test$c.extend({
1247
1245
  StorefrontHome: async ({ StorefrontPage }, use) => {
1248
1246
  await use(new Home(StorefrontPage));
1249
1247
  },
1250
- StorefrontProductDetail: async ({ StorefrontPage, ProductData }, use) => {
1251
- await use(new ProductDetail$1(StorefrontPage, ProductData));
1248
+ StorefrontProductDetail: async ({ StorefrontPage }, use) => {
1249
+ await use(new ProductDetail$1(StorefrontPage));
1252
1250
  },
1253
- StorefrontCategory: async ({ StorefrontPage, CategoryData }, use) => {
1254
- await use(new Category(StorefrontPage, CategoryData));
1251
+ StorefrontCategory: async ({ StorefrontPage }, use) => {
1252
+ await use(new Category(StorefrontPage));
1255
1253
  },
1256
1254
  StorefrontCheckoutCart: async ({ StorefrontPage }, use) => {
1257
1255
  await use(new CheckoutCart(StorefrontPage));
@@ -1291,53 +1289,51 @@ const test$5 = test$c.extend({
1291
1289
  }
1292
1290
  });
1293
1291
 
1294
- var __defProp$5 = Object.defineProperty;
1295
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1296
- var __publicField$5 = (obj, key, value) => {
1297
- __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
1292
+ var __defProp$8 = Object.defineProperty;
1293
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1294
+ var __publicField$8 = (obj, key, value) => {
1295
+ __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
1298
1296
  return value;
1299
1297
  };
1300
1298
  class ProductDetail {
1301
- constructor(page, productData) {
1299
+ constructor(page) {
1302
1300
  this.page = page;
1303
1301
  /**
1304
1302
  * Save interactions
1305
1303
  */
1306
- __publicField$5(this, "savePhysicalProductButton");
1307
- __publicField$5(this, "saveButtonLoadingSpinner");
1308
- __publicField$5(this, "saveButtonCheckMark");
1304
+ __publicField$8(this, "savePhysicalProductButton");
1305
+ __publicField$8(this, "saveButtonLoadingSpinner");
1306
+ __publicField$8(this, "saveButtonCheckMark");
1309
1307
  /**
1310
1308
  * Media Upload interactions
1311
1309
  */
1312
- __publicField$5(this, "uploadMediaButton");
1313
- __publicField$5(this, "coverImage");
1314
- __publicField$5(this, "productImage");
1310
+ __publicField$8(this, "uploadMediaButton");
1311
+ __publicField$8(this, "coverImage");
1312
+ __publicField$8(this, "productImage");
1315
1313
  /**
1316
1314
  * Tabs
1317
1315
  */
1318
- __publicField$5(this, "variantsTabLink");
1316
+ __publicField$8(this, "variantsTabLink");
1319
1317
  /**
1320
1318
  * Variants Generation
1321
1319
  */
1322
- __publicField$5(this, "generateVariantsButton");
1323
- __publicField$5(this, "variantsModal");
1324
- __publicField$5(this, "variantsModalHeadline");
1325
- __publicField$5(this, "variantsNextButton");
1326
- __publicField$5(this, "variantsSaveButton");
1320
+ __publicField$8(this, "generateVariantsButton");
1321
+ __publicField$8(this, "variantsModal");
1322
+ __publicField$8(this, "variantsModalHeadline");
1323
+ __publicField$8(this, "variantsNextButton");
1324
+ __publicField$8(this, "variantsSaveButton");
1327
1325
  /**
1328
1326
  * Property Selection
1329
1327
  */
1330
- __publicField$5(this, "propertyGroupColor");
1331
- __publicField$5(this, "propertyGroupSize");
1332
- __publicField$5(this, "propertyOptionGrid");
1333
- __publicField$5(this, "propertyOptionColorBlue");
1334
- __publicField$5(this, "propertyOptionColorRed");
1335
- __publicField$5(this, "propertyOptionColorGreen");
1336
- __publicField$5(this, "propertyOptionSizeSmall");
1337
- __publicField$5(this, "propertyOptionSizeMedium");
1338
- __publicField$5(this, "propertyOptionSizeLarge");
1339
- __publicField$5(this, "productData");
1340
- this.productData = productData;
1328
+ __publicField$8(this, "propertyGroupColor");
1329
+ __publicField$8(this, "propertyGroupSize");
1330
+ __publicField$8(this, "propertyOptionGrid");
1331
+ __publicField$8(this, "propertyOptionColorBlue");
1332
+ __publicField$8(this, "propertyOptionColorRed");
1333
+ __publicField$8(this, "propertyOptionColorGreen");
1334
+ __publicField$8(this, "propertyOptionSizeSmall");
1335
+ __publicField$8(this, "propertyOptionSizeMedium");
1336
+ __publicField$8(this, "propertyOptionSizeLarge");
1341
1337
  this.savePhysicalProductButton = page.getByRole("button", { name: "Save" });
1342
1338
  this.saveButtonCheckMark = page.locator(".icon--regular-checkmark-xs");
1343
1339
  this.saveButtonLoadingSpinner = page.locator("sw-loader");
@@ -1360,107 +1356,100 @@ class ProductDetail {
1360
1356
  this.propertyOptionSizeMedium = this.propertyOptionGrid.getByLabel("Medium");
1361
1357
  this.propertyOptionSizeLarge = this.propertyOptionGrid.getByLabel("Large");
1362
1358
  }
1363
- async goTo() {
1364
- await this.page.goto(`#/sw/product/detail/${this.productData.id}/base`);
1365
- }
1366
- getProductId() {
1367
- return this.productData.id;
1359
+ url(productId) {
1360
+ return `#/sw/product/detail/${productId}/base`;
1368
1361
  }
1369
1362
  }
1370
1363
 
1371
- var __defProp$4 = Object.defineProperty;
1372
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1373
- var __publicField$4 = (obj, key, value) => {
1374
- __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
1364
+ var __defProp$7 = Object.defineProperty;
1365
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1366
+ var __publicField$7 = (obj, key, value) => {
1367
+ __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
1375
1368
  return value;
1376
1369
  };
1377
1370
  class OrderDetail {
1378
- constructor(page, orderData) {
1371
+ constructor(page) {
1379
1372
  this.page = page;
1380
- __publicField$4(this, "dataGridContextButton");
1381
- __publicField$4(this, "orderTag");
1382
- __publicField$4(this, "orderData");
1383
- this.orderData = orderData;
1373
+ __publicField$7(this, "saveButton");
1374
+ __publicField$7(this, "dataGridContextButton");
1375
+ __publicField$7(this, "orderTag");
1376
+ this.saveButton = page.locator(".sw-order-detail__smart-bar-save-button");
1384
1377
  this.dataGridContextButton = page.locator(".sw-data-grid__actions-menu").and(page.getByRole("button"));
1385
1378
  this.orderTag = page.locator(".sw-select-selection-list__item");
1386
1379
  }
1387
- async goTo() {
1388
- await this.page.goto(`#/sw/order/detail/${this.orderData.id}/general`);
1380
+ url(orderId) {
1381
+ return `#/sw/order/detail/${orderId}/general`;
1389
1382
  }
1390
1383
  }
1391
1384
 
1392
- var __defProp$3 = Object.defineProperty;
1393
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1394
- var __publicField$3 = (obj, key, value) => {
1395
- __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
1385
+ var __defProp$6 = Object.defineProperty;
1386
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1387
+ var __publicField$6 = (obj, key, value) => {
1388
+ __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
1396
1389
  return value;
1397
1390
  };
1398
1391
  class CustomerDetail {
1399
- constructor(page, customer) {
1392
+ constructor(page) {
1400
1393
  this.page = page;
1401
- __publicField$3(this, "customerId");
1402
- __publicField$3(this, "customer");
1403
- __publicField$3(this, "editButton");
1404
- __publicField$3(this, "generalTab");
1405
- __publicField$3(this, "accountCard");
1406
- this.customerId = customer.id;
1407
- this.customer = customer;
1394
+ __publicField$6(this, "editButton");
1395
+ __publicField$6(this, "generalTab");
1396
+ __publicField$6(this, "accountCard");
1408
1397
  this.editButton = page.getByRole("button", { name: "Edit" });
1409
1398
  this.generalTab = page.getByRole("link", { name: "General" });
1410
1399
  this.accountCard = page.locator(".sw-customer-card");
1411
1400
  }
1412
- async goTo() {
1413
- await this.page.goto(`#/sw/customer/detail/${this.customerId}/base`);
1401
+ url(customerId) {
1402
+ return `#/sw/customer/detail/${customerId}/base`;
1414
1403
  }
1415
1404
  }
1416
1405
 
1417
- var __defProp$2 = Object.defineProperty;
1418
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1419
- var __publicField$2 = (obj, key, value) => {
1420
- __defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
1406
+ var __defProp$5 = Object.defineProperty;
1407
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1408
+ var __publicField$5 = (obj, key, value) => {
1409
+ __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
1421
1410
  return value;
1422
1411
  };
1423
1412
  class FirstRunWizard {
1424
1413
  constructor(page) {
1425
1414
  this.page = page;
1426
- __publicField$2(this, "nextButton");
1427
- __publicField$2(this, "configureLaterButton");
1428
- __publicField$2(this, "skipButton");
1429
- __publicField$2(this, "finishButton");
1430
- __publicField$2(this, "backButton");
1431
- __publicField$2(this, "smtpServerButton");
1432
- __publicField$2(this, "dataImportHeader");
1433
- __publicField$2(this, "installLanguagePackButton");
1434
- __publicField$2(this, "installDemoDataButton");
1435
- __publicField$2(this, "installMigrationAssistantButton");
1436
- __publicField$2(this, "defaultValuesHeader");
1437
- __publicField$2(this, "mailerConfigurationHeader");
1438
- __publicField$2(this, "payPalSetupHeader");
1439
- __publicField$2(this, "extensionsHeader");
1440
- __publicField$2(this, "shopwareAccountHeader");
1441
- __publicField$2(this, "shopwareStoreHeader");
1442
- __publicField$2(this, "doneHeader");
1443
- __publicField$2(this, "frwSuccessText");
1444
- __publicField$2(this, "welcomeText");
1445
- __publicField$2(this, "pluginCardInfo");
1446
- __publicField$2(this, "dataImportCard");
1447
- __publicField$2(this, "salesChannelSelectionList");
1448
- __publicField$2(this, "salesChannelSelectionMultiSelect");
1449
- __publicField$2(this, "smtpServerTitle");
1450
- __publicField$2(this, "smtpServerFields");
1451
- __publicField$2(this, "payPalPaymethods");
1452
- __publicField$2(this, "payPalInfoCard");
1453
- __publicField$2(this, "emailAddressInputField");
1454
- __publicField$2(this, "passwordInputField");
1455
- __publicField$2(this, "forgotPasswordLink");
1456
- __publicField$2(this, "extensionStoreHeading");
1457
- __publicField$2(this, "documentationLink");
1458
- __publicField$2(this, "forumLink");
1459
- __publicField$2(this, "roadmapLink");
1460
- __publicField$2(this, "germanRegionSelector");
1461
- __publicField$2(this, "toolsSelector");
1462
- __publicField$2(this, "recommendationHeader");
1463
- __publicField$2(this, "toolsRecommendedPlugin");
1415
+ __publicField$5(this, "nextButton");
1416
+ __publicField$5(this, "configureLaterButton");
1417
+ __publicField$5(this, "skipButton");
1418
+ __publicField$5(this, "finishButton");
1419
+ __publicField$5(this, "backButton");
1420
+ __publicField$5(this, "smtpServerButton");
1421
+ __publicField$5(this, "dataImportHeader");
1422
+ __publicField$5(this, "installLanguagePackButton");
1423
+ __publicField$5(this, "installDemoDataButton");
1424
+ __publicField$5(this, "installMigrationAssistantButton");
1425
+ __publicField$5(this, "defaultValuesHeader");
1426
+ __publicField$5(this, "mailerConfigurationHeader");
1427
+ __publicField$5(this, "payPalSetupHeader");
1428
+ __publicField$5(this, "extensionsHeader");
1429
+ __publicField$5(this, "shopwareAccountHeader");
1430
+ __publicField$5(this, "shopwareStoreHeader");
1431
+ __publicField$5(this, "doneHeader");
1432
+ __publicField$5(this, "frwSuccessText");
1433
+ __publicField$5(this, "welcomeText");
1434
+ __publicField$5(this, "pluginCardInfo");
1435
+ __publicField$5(this, "dataImportCard");
1436
+ __publicField$5(this, "salesChannelSelectionList");
1437
+ __publicField$5(this, "salesChannelSelectionMultiSelect");
1438
+ __publicField$5(this, "smtpServerTitle");
1439
+ __publicField$5(this, "smtpServerFields");
1440
+ __publicField$5(this, "payPalPaymethods");
1441
+ __publicField$5(this, "payPalInfoCard");
1442
+ __publicField$5(this, "emailAddressInputField");
1443
+ __publicField$5(this, "passwordInputField");
1444
+ __publicField$5(this, "forgotPasswordLink");
1445
+ __publicField$5(this, "extensionStoreHeading");
1446
+ __publicField$5(this, "documentationLink");
1447
+ __publicField$5(this, "forumLink");
1448
+ __publicField$5(this, "roadmapLink");
1449
+ __publicField$5(this, "germanRegionSelector");
1450
+ __publicField$5(this, "toolsSelector");
1451
+ __publicField$5(this, "recommendationHeader");
1452
+ __publicField$5(this, "toolsRecommendedPlugin");
1464
1453
  this.nextButton = page.getByText("Next", { exact: true });
1465
1454
  this.configureLaterButton = page.getByText("Configure later", { exact: true });
1466
1455
  this.skipButton = page.getByText("Skip", { exact: true });
@@ -1500,47 +1489,49 @@ class FirstRunWizard {
1500
1489
  this.forumLink = page.locator('[href*="https://forum.shopware.com/"]');
1501
1490
  this.roadmapLink = page.locator('[href*="https://www.shopware.com/en/roadmap/"]');
1502
1491
  }
1503
- async goTo() {
1504
- await this.page.goto(`#/sw/first/run/wizard/index/`);
1492
+ url() {
1493
+ return "#/sw/first/run/wizard/index/";
1505
1494
  }
1506
1495
  }
1507
1496
 
1508
- var __defProp$1 = Object.defineProperty;
1509
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1510
- var __publicField$1 = (obj, key, value) => {
1511
- __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
1497
+ var __defProp$4 = Object.defineProperty;
1498
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1499
+ var __publicField$4 = (obj, key, value) => {
1500
+ __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
1512
1501
  return value;
1513
1502
  };
1514
1503
  class FlowBuilderCreate {
1515
1504
  constructor(page) {
1516
1505
  this.page = page;
1517
- __publicField$1(this, "saveButton");
1518
- __publicField$1(this, "header");
1506
+ __publicField$4(this, "saveButton");
1507
+ __publicField$4(this, "header");
1519
1508
  this.saveButton = page.locator(".sw-flow-detail__save");
1520
1509
  this.header = page.locator("h2");
1521
1510
  }
1522
- async goTo() {
1523
- await this.page.goto(`#/sw/flow/create/general`);
1511
+ url() {
1512
+ return "#/sw/flow/create/general";
1524
1513
  }
1525
1514
  }
1526
1515
 
1527
- var __defProp = Object.defineProperty;
1528
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1529
- var __publicField = (obj, key, value) => {
1530
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1516
+ var __defProp$3 = Object.defineProperty;
1517
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1518
+ var __publicField$3 = (obj, key, value) => {
1519
+ __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
1531
1520
  return value;
1532
1521
  };
1533
1522
  class FlowBuilderListing {
1534
1523
  constructor(page) {
1535
1524
  this.page = page;
1536
- __publicField(this, "firstFlowName");
1537
- __publicField(this, "firstFlowContextButton");
1538
- __publicField(this, "flowContextMenu");
1539
- __publicField(this, "contextMenuDownload");
1540
- __publicField(this, "flowDownloadModal");
1541
- __publicField(this, "downloadFlowButton");
1542
- __publicField(this, "successAlert");
1543
- __publicField(this, "successAlertMessage");
1525
+ __publicField$3(this, "createFlowButton");
1526
+ __publicField$3(this, "firstFlowName");
1527
+ __publicField$3(this, "firstFlowContextButton");
1528
+ __publicField$3(this, "flowContextMenu");
1529
+ __publicField$3(this, "contextMenuDownload");
1530
+ __publicField$3(this, "flowDownloadModal");
1531
+ __publicField$3(this, "downloadFlowButton");
1532
+ __publicField$3(this, "successAlert");
1533
+ __publicField$3(this, "successAlertMessage");
1534
+ this.createFlowButton = page.locator(".sw-flow-list__create");
1544
1535
  this.firstFlowName = page.locator(".sw-data-grid__cell--name a").first();
1545
1536
  this.firstFlowContextButton = page.locator(".sw-data-grid__actions-menu").first();
1546
1537
  this.flowContextMenu = page.locator(".sw-context-menu__content");
@@ -1550,8 +1541,85 @@ class FlowBuilderListing {
1550
1541
  this.successAlert = page.locator(".sw-alert__body");
1551
1542
  this.successAlertMessage = page.locator(".sw-alert__message");
1552
1543
  }
1553
- async goTo() {
1554
- await this.page.goto(`#/sw/flow/index/`);
1544
+ url() {
1545
+ return "#/sw/flow/index/";
1546
+ }
1547
+ }
1548
+
1549
+ var __defProp$2 = Object.defineProperty;
1550
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1551
+ var __publicField$2 = (obj, key, value) => {
1552
+ __defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
1553
+ return value;
1554
+ };
1555
+ class FlowBuilderDetail {
1556
+ constructor(page) {
1557
+ this.page = page;
1558
+ __publicField$2(this, "saveButton");
1559
+ __publicField$2(this, "generalTab");
1560
+ __publicField$2(this, "flowTab");
1561
+ this.saveButton = page.locator(".sw-flow-detail__save");
1562
+ this.generalTab = page.locator(".sw-flow-detail__tab-general");
1563
+ this.flowTab = page.locator(".sw-flow-detail__tab-flow");
1564
+ }
1565
+ url(flowId, tabName = "general") {
1566
+ return `#/sw/flow/detail/${flowId}/${tabName}`;
1567
+ }
1568
+ }
1569
+
1570
+ var __defProp$1 = Object.defineProperty;
1571
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1572
+ var __publicField$1 = (obj, key, value) => {
1573
+ __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
1574
+ return value;
1575
+ };
1576
+ class DataSharing {
1577
+ constructor(page) {
1578
+ this.page = page;
1579
+ __publicField$1(this, "dataConsentHeadline");
1580
+ __publicField$1(this, "dataSharingSuccessMessageLabel");
1581
+ __publicField$1(this, "dataSharingAgreeButton");
1582
+ __publicField$1(this, "dataSharingDisableButton");
1583
+ __publicField$1(this, "dataSharingTermsAgreementLabel");
1584
+ this.dataConsentHeadline = page.locator("h3.sw-usage-data-consent-banner__content-headline");
1585
+ this.dataSharingAgreeButton = page.getByRole("button", { name: "Agree" });
1586
+ this.dataSharingDisableButton = page.getByRole("button", { name: "Disable data sharing" });
1587
+ this.dataSharingSuccessMessageLabel = page.getByText("You are sharing data with us", { exact: true });
1588
+ this.dataSharingTermsAgreementLabel = page.getByText('By clicking "Agree", you confirm that you are authorized to enter into this agreement on behalf of your company.');
1589
+ }
1590
+ url() {
1591
+ return "#/sw/settings/usage/data/index/general";
1592
+ }
1593
+ }
1594
+
1595
+ var __defProp = Object.defineProperty;
1596
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1597
+ var __publicField = (obj, key, value) => {
1598
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1599
+ return value;
1600
+ };
1601
+ class Dashboard {
1602
+ constructor(page) {
1603
+ this.page = page;
1604
+ __publicField(this, "welcomeHeadline");
1605
+ __publicField(this, "dataSharingConsentBanner");
1606
+ __publicField(this, "dataSharingAgreeButton");
1607
+ __publicField(this, "dataSharingNotAtTheMomentButton");
1608
+ __publicField(this, "dataSharingTermsAgreementLabel");
1609
+ __publicField(this, "dataSharingSettingsLink");
1610
+ __publicField(this, "dataSharingAcceptMessageText");
1611
+ __publicField(this, "dataSharingNotAtTheMomentMessageText");
1612
+ this.welcomeHeadline = page.locator("h1.sw-dashboard-index__welcome-title");
1613
+ this.dataSharingConsentBanner = page.locator(".sw-usage-data-consent-banner");
1614
+ this.dataSharingAgreeButton = page.getByRole("button", { name: "Agree" });
1615
+ this.dataSharingNotAtTheMomentButton = page.getByRole("button", { name: "Not at the moment" });
1616
+ this.dataSharingSettingsLink = page.locator(".sw-usage-data-consent-banner-reject-accept-message").getByRole("link");
1617
+ this.dataSharingAcceptMessageText = page.getByText("Thank you for your participation!");
1618
+ this.dataSharingNotAtTheMomentMessageText = page.getByText("You can at any time enter into the agreement and thus contribute to and profit from the constant evolution of our services");
1619
+ this.dataSharingTermsAgreementLabel = page.getByText('By clicking "Agree", you confirm that you are authorized to enter into this agreement on behalf of your company.');
1620
+ }
1621
+ url() {
1622
+ return "#/sw/dashboard/index";
1555
1623
  }
1556
1624
  }
1557
1625
 
@@ -1561,17 +1629,20 @@ const AdminPageObjects = {
1561
1629
  CustomerDetail,
1562
1630
  FirstRunWizard,
1563
1631
  FlowBuilderCreate,
1564
- FlowBuilderListing
1632
+ FlowBuilderListing,
1633
+ FlowBuilderDetail,
1634
+ Dashboard,
1635
+ DataSharing
1565
1636
  };
1566
1637
  const test$4 = test$c.extend({
1567
- AdminProductDetail: async ({ AdminPage, ProductData }, use) => {
1568
- await use(new ProductDetail(AdminPage, ProductData));
1638
+ AdminProductDetail: async ({ AdminPage }, use) => {
1639
+ await use(new ProductDetail(AdminPage));
1569
1640
  },
1570
- AdminOrderDetail: async ({ AdminPage, OrderData }, use) => {
1571
- await use(new OrderDetail(AdminPage, OrderData));
1641
+ AdminOrderDetail: async ({ AdminPage }, use) => {
1642
+ await use(new OrderDetail(AdminPage));
1572
1643
  },
1573
- AdminCustomerDetail: async ({ AdminPage, DefaultSalesChannel }, use) => {
1574
- await use(new CustomerDetail(AdminPage, DefaultSalesChannel.customer));
1644
+ AdminCustomerDetail: async ({ AdminPage }, use) => {
1645
+ await use(new CustomerDetail(AdminPage));
1575
1646
  },
1576
1647
  AdminFirstRunWizard: async ({ AdminPage }, use) => {
1577
1648
  await use(new FirstRunWizard(AdminPage));
@@ -1581,6 +1652,15 @@ const test$4 = test$c.extend({
1581
1652
  },
1582
1653
  AdminFlowBuilderListing: async ({ AdminPage }, use) => {
1583
1654
  await use(new FlowBuilderListing(AdminPage));
1655
+ },
1656
+ AdminFlowBuilderDetail: async ({ AdminPage }, use) => {
1657
+ await use(new FlowBuilderDetail(AdminPage));
1658
+ },
1659
+ AdminDataSharing: async ({ AdminPage }, use) => {
1660
+ await use(new DataSharing(AdminPage));
1661
+ },
1662
+ AdminDashboard: async ({ AdminPage }, use) => {
1663
+ await use(new Dashboard(AdminPage));
1584
1664
  }
1585
1665
  });
1586
1666
 
@@ -2176,7 +2256,7 @@ const Login = test$c.extend({
2176
2256
  const task = () => {
2177
2257
  return async function Login2() {
2178
2258
  const { customer } = DefaultSalesChannel;
2179
- await ShopCustomer.goesTo(StorefrontAccountLogin);
2259
+ await ShopCustomer.goesTo(StorefrontAccountLogin.url());
2180
2260
  await StorefrontAccountLogin.emailInput.fill(customer.email);
2181
2261
  await StorefrontAccountLogin.passwordInput.fill(customer.password);
2182
2262
  await StorefrontAccountLogin.loginButton.click();
@@ -2191,7 +2271,7 @@ const Logout = test$c.extend({
2191
2271
  Logout: async ({ ShopCustomer, StorefrontAccountLogin }, use) => {
2192
2272
  const task = () => {
2193
2273
  return async function Logout2() {
2194
- await ShopCustomer.goesTo(StorefrontAccountLogin);
2274
+ await ShopCustomer.goesTo(StorefrontAccountLogin.url());
2195
2275
  await ShopCustomer.expects(StorefrontAccountLogin.loginButton).not.toBeVisible();
2196
2276
  await StorefrontAccountLogin.logoutLink.click();
2197
2277
  await ShopCustomer.expects(StorefrontAccountLogin.successAlert).toBeVisible();
@@ -2456,4 +2536,4 @@ const test = mergeTests(
2456
2536
  test$1
2457
2537
  );
2458
2538
 
2459
- export { AdminPageObjects, StorefrontPageObjects, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, test };
2539
+ export { AdminPageObjects, StorefrontPageObjects, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, setOrderStatus, test };