@shopware-ag/acceptance-test-suite 5.3.0 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +104 -1
- package/dist/index.d.ts +104 -1
- package/dist/index.mjs +617 -273
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -385,16 +385,16 @@ const test$c = test$e.extend({
|
|
|
385
385
|
]
|
|
386
386
|
});
|
|
387
387
|
|
|
388
|
-
var __defProp$
|
|
389
|
-
var __defNormalProp$
|
|
390
|
-
var __publicField$
|
|
391
|
-
__defNormalProp$
|
|
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$
|
|
397
|
-
__publicField$
|
|
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$
|
|
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$
|
|
500
|
-
var __defNormalProp$
|
|
501
|
-
var __publicField$
|
|
502
|
-
__defNormalProp$
|
|
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$
|
|
508
|
-
__publicField$
|
|
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$
|
|
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$
|
|
574
|
-
var __defNormalProp$
|
|
575
|
-
var __publicField$
|
|
576
|
-
__defNormalProp$
|
|
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$
|
|
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$
|
|
879
|
-
var __defNormalProp$
|
|
880
|
-
var __publicField$
|
|
881
|
-
__defNormalProp$
|
|
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$
|
|
887
|
-
__publicField$
|
|
888
|
-
__publicField$
|
|
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$
|
|
938
|
-
var __defNormalProp$
|
|
939
|
-
var __publicField$
|
|
940
|
-
__defNormalProp$
|
|
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$
|
|
946
|
-
__publicField$
|
|
947
|
-
__publicField$
|
|
948
|
-
__publicField$
|
|
949
|
-
__publicField$
|
|
950
|
-
__publicField$
|
|
951
|
-
__publicField$
|
|
952
|
-
__publicField$
|
|
953
|
-
__publicField$
|
|
954
|
-
__publicField$
|
|
955
|
-
__publicField$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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,43 @@ 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
|
+
}
|
|
1522
|
+
/**
|
|
1523
|
+
* Creates a system config entry
|
|
1524
|
+
*
|
|
1525
|
+
* @param configurationKey - Config key for shop configurations.
|
|
1526
|
+
* @param configurationValue - Config value as object for shop configurations (see {@link https://shopware.stoplight.io/docs/admin-api/9174d032146f8-create-a-new-system-config-resources|AdminApi Stoplight}).
|
|
1527
|
+
* @param salesChannelId - Unique identity of sales channel.
|
|
1528
|
+
*/
|
|
1529
|
+
async createSystemConfigEntry(configurationKey, configurationValue = {}, salesChannelId = "") {
|
|
1530
|
+
const systemConfigStruct = {
|
|
1531
|
+
id: this.IdProvider.getIdPair().uuid,
|
|
1532
|
+
configurationKey,
|
|
1533
|
+
configurationValue,
|
|
1534
|
+
salesChannelId: salesChannelId || null
|
|
1535
|
+
};
|
|
1536
|
+
const response = await this.AdminApiClient.post("system-config?_response=detail", {
|
|
1537
|
+
data: systemConfigStruct
|
|
1538
|
+
});
|
|
1539
|
+
expect(response.ok()).toBeTruthy();
|
|
1540
|
+
const { data: systemConfigEntry } = await response.json();
|
|
1541
|
+
this.addCreatedRecord("system_config", systemConfigEntry.id);
|
|
1542
|
+
return systemConfigEntry;
|
|
1543
|
+
}
|
|
1507
1544
|
/**
|
|
1508
1545
|
* Assigns a media resource as the download of a digital product.
|
|
1509
1546
|
*
|
|
@@ -2595,6 +2632,25 @@ class TestDataService {
|
|
|
2595
2632
|
};
|
|
2596
2633
|
return Object.assign({}, basicCmsPage, overrides);
|
|
2597
2634
|
}
|
|
2635
|
+
getBasicCustomerGroupStruct(overrides = {}) {
|
|
2636
|
+
const customerGroupUuid = this.IdProvider.getIdPair().uuid;
|
|
2637
|
+
const customerGroupName = `${this.namePrefix}CustomerGroup-${customerGroupUuid}${this.nameSuffix}`;
|
|
2638
|
+
const basicCustomerGroup = {
|
|
2639
|
+
id: customerGroupUuid,
|
|
2640
|
+
name: customerGroupName,
|
|
2641
|
+
displayGross: true,
|
|
2642
|
+
registrationActive: true,
|
|
2643
|
+
registrationTitle: customerGroupName,
|
|
2644
|
+
registrationIntroduction: `${customerGroupName}-Introduction`,
|
|
2645
|
+
registrationSeoMetaDescription: `${customerGroupName}-SEO-Description`,
|
|
2646
|
+
registrationOnlyCompanyRegistration: false,
|
|
2647
|
+
customFields: {},
|
|
2648
|
+
registrationSalesChannels: [{
|
|
2649
|
+
id: this.defaultSalesChannel.id
|
|
2650
|
+
}]
|
|
2651
|
+
};
|
|
2652
|
+
return Object.assign({}, basicCustomerGroup, overrides);
|
|
2653
|
+
}
|
|
2598
2654
|
}
|
|
2599
2655
|
|
|
2600
2656
|
const test$8 = test$e.extend({
|
|
@@ -2613,16 +2669,16 @@ const test$8 = test$e.extend({
|
|
|
2613
2669
|
}
|
|
2614
2670
|
});
|
|
2615
2671
|
|
|
2616
|
-
var __defProp$
|
|
2617
|
-
var __defNormalProp$
|
|
2618
|
-
var __publicField$
|
|
2619
|
-
__defNormalProp$
|
|
2672
|
+
var __defProp$H = Object.defineProperty;
|
|
2673
|
+
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2674
|
+
var __publicField$H = (obj, key, value) => {
|
|
2675
|
+
__defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2620
2676
|
return value;
|
|
2621
2677
|
};
|
|
2622
2678
|
class IdProvider {
|
|
2623
2679
|
constructor(workerIndex, seed) {
|
|
2624
|
-
__publicField$
|
|
2625
|
-
__publicField$
|
|
2680
|
+
__publicField$H(this, "workerIndex");
|
|
2681
|
+
__publicField$H(this, "seed");
|
|
2626
2682
|
this.workerIndex = workerIndex;
|
|
2627
2683
|
this.seed = seed;
|
|
2628
2684
|
}
|
|
@@ -2696,19 +2752,19 @@ const test$7 = test$e.extend({
|
|
|
2696
2752
|
]
|
|
2697
2753
|
});
|
|
2698
2754
|
|
|
2699
|
-
var __defProp$
|
|
2700
|
-
var __defNormalProp$
|
|
2701
|
-
var __publicField$
|
|
2702
|
-
__defNormalProp$
|
|
2755
|
+
var __defProp$G = Object.defineProperty;
|
|
2756
|
+
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2757
|
+
var __publicField$G = (obj, key, value) => {
|
|
2758
|
+
__defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2703
2759
|
return value;
|
|
2704
2760
|
};
|
|
2705
2761
|
class Home {
|
|
2706
2762
|
constructor(page) {
|
|
2707
2763
|
this.page = page;
|
|
2708
|
-
__publicField$
|
|
2709
|
-
__publicField$
|
|
2710
|
-
__publicField$
|
|
2711
|
-
__publicField$
|
|
2764
|
+
__publicField$G(this, "productImages");
|
|
2765
|
+
__publicField$G(this, "productListItems");
|
|
2766
|
+
__publicField$G(this, "languagesDropdown");
|
|
2767
|
+
__publicField$G(this, "currenciesDropdown");
|
|
2712
2768
|
this.productImages = page.locator(".product-image-link");
|
|
2713
2769
|
this.productListItems = page.getByRole("listitem");
|
|
2714
2770
|
this.languagesDropdown = page.getByLabel("Shop settings").locator(".languages-menu");
|
|
@@ -2742,26 +2798,26 @@ class Home {
|
|
|
2742
2798
|
}
|
|
2743
2799
|
}
|
|
2744
2800
|
|
|
2745
|
-
var __defProp$
|
|
2746
|
-
var __defNormalProp$
|
|
2747
|
-
var __publicField$
|
|
2748
|
-
__defNormalProp$
|
|
2801
|
+
var __defProp$F = Object.defineProperty;
|
|
2802
|
+
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2803
|
+
var __publicField$F = (obj, key, value) => {
|
|
2804
|
+
__defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2749
2805
|
return value;
|
|
2750
2806
|
};
|
|
2751
2807
|
let ProductDetail$1 = class ProductDetail {
|
|
2752
2808
|
constructor(page) {
|
|
2753
2809
|
this.page = page;
|
|
2754
|
-
__publicField$
|
|
2755
|
-
__publicField$
|
|
2756
|
-
__publicField$
|
|
2757
|
-
__publicField$
|
|
2758
|
-
__publicField$
|
|
2759
|
-
__publicField$
|
|
2760
|
-
__publicField$
|
|
2761
|
-
__publicField$
|
|
2762
|
-
__publicField$
|
|
2763
|
-
__publicField$
|
|
2764
|
-
__publicField$
|
|
2810
|
+
__publicField$F(this, "addToCartButton");
|
|
2811
|
+
__publicField$F(this, "quantitySelect");
|
|
2812
|
+
__publicField$F(this, "productSingleImage");
|
|
2813
|
+
__publicField$F(this, "productSinglePrice");
|
|
2814
|
+
__publicField$F(this, "productPriceRangesRow");
|
|
2815
|
+
__publicField$F(this, "offCanvasCartTitle");
|
|
2816
|
+
__publicField$F(this, "offCanvasCart");
|
|
2817
|
+
__publicField$F(this, "offCanvasCartGoToCheckoutButton");
|
|
2818
|
+
__publicField$F(this, "offCanvasLineItemImages");
|
|
2819
|
+
__publicField$F(this, "offCanvasSummaryTotalPrice");
|
|
2820
|
+
__publicField$F(this, "offCanvas");
|
|
2765
2821
|
this.addToCartButton = page.getByRole("button", { name: "Add to shopping cart" });
|
|
2766
2822
|
this.quantitySelect = page.getByLabel("Quantity", { exact: true });
|
|
2767
2823
|
this.productSingleImage = page.locator(".gallery-slider-single-image");
|
|
@@ -2783,18 +2839,18 @@ let ProductDetail$1 = class ProductDetail {
|
|
|
2783
2839
|
}
|
|
2784
2840
|
};
|
|
2785
2841
|
|
|
2786
|
-
var __defProp$
|
|
2787
|
-
var __defNormalProp$
|
|
2788
|
-
var __publicField$
|
|
2789
|
-
__defNormalProp$
|
|
2842
|
+
var __defProp$E = Object.defineProperty;
|
|
2843
|
+
var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2844
|
+
var __publicField$E = (obj, key, value) => {
|
|
2845
|
+
__defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2790
2846
|
return value;
|
|
2791
2847
|
};
|
|
2792
2848
|
class Category {
|
|
2793
2849
|
constructor(page) {
|
|
2794
2850
|
this.page = page;
|
|
2795
|
-
__publicField$
|
|
2796
|
-
__publicField$
|
|
2797
|
-
__publicField$
|
|
2851
|
+
__publicField$E(this, "sortingSelect");
|
|
2852
|
+
__publicField$E(this, "firstProductBuyButton");
|
|
2853
|
+
__publicField$E(this, "noProductsFoundAlert");
|
|
2798
2854
|
this.sortingSelect = page.getByLabel("Sorting");
|
|
2799
2855
|
this.firstProductBuyButton = page.getByRole("button", { name: "Add to shopping cart" }).first();
|
|
2800
2856
|
this.noProductsFoundAlert = page.getByText("No products found.");
|
|
@@ -2804,24 +2860,24 @@ class Category {
|
|
|
2804
2860
|
}
|
|
2805
2861
|
}
|
|
2806
2862
|
|
|
2807
|
-
var __defProp$
|
|
2808
|
-
var __defNormalProp$
|
|
2809
|
-
var __publicField$
|
|
2810
|
-
__defNormalProp$
|
|
2863
|
+
var __defProp$D = Object.defineProperty;
|
|
2864
|
+
var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2865
|
+
var __publicField$D = (obj, key, value) => {
|
|
2866
|
+
__defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2811
2867
|
return value;
|
|
2812
2868
|
};
|
|
2813
2869
|
class CheckoutCart {
|
|
2814
2870
|
constructor(page) {
|
|
2815
2871
|
this.page = page;
|
|
2816
|
-
__publicField$
|
|
2817
|
-
__publicField$
|
|
2818
|
-
__publicField$
|
|
2819
|
-
__publicField$
|
|
2820
|
-
__publicField$
|
|
2821
|
-
__publicField$
|
|
2822
|
-
__publicField$
|
|
2823
|
-
__publicField$
|
|
2824
|
-
__publicField$
|
|
2872
|
+
__publicField$D(this, "headline");
|
|
2873
|
+
__publicField$D(this, "goToCheckoutButton");
|
|
2874
|
+
__publicField$D(this, "enterPromoInput");
|
|
2875
|
+
__publicField$D(this, "grandTotalPrice");
|
|
2876
|
+
__publicField$D(this, "emptyCartAlert");
|
|
2877
|
+
__publicField$D(this, "stockReachedAlert");
|
|
2878
|
+
__publicField$D(this, "cartLineItemImages");
|
|
2879
|
+
__publicField$D(this, "unitPriceInfo");
|
|
2880
|
+
__publicField$D(this, "cartQuantityNumber");
|
|
2825
2881
|
this.headline = page.getByRole("heading", { name: "Shopping cart" });
|
|
2826
2882
|
this.goToCheckoutButton = page.getByRole("link", { name: "Go to checkout" });
|
|
2827
2883
|
this.enterPromoInput = page.getByLabel("Promo code");
|
|
@@ -2862,25 +2918,25 @@ class CheckoutCart {
|
|
|
2862
2918
|
}
|
|
2863
2919
|
}
|
|
2864
2920
|
|
|
2865
|
-
var __defProp$
|
|
2866
|
-
var __defNormalProp$
|
|
2867
|
-
var __publicField$
|
|
2868
|
-
__defNormalProp$
|
|
2921
|
+
var __defProp$C = Object.defineProperty;
|
|
2922
|
+
var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2923
|
+
var __publicField$C = (obj, key, value) => {
|
|
2924
|
+
__defNormalProp$C(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2869
2925
|
return value;
|
|
2870
2926
|
};
|
|
2871
2927
|
class OffCanvasCart {
|
|
2872
2928
|
constructor(page) {
|
|
2873
2929
|
this.page = page;
|
|
2874
|
-
__publicField$
|
|
2875
|
-
__publicField$
|
|
2876
|
-
__publicField$
|
|
2877
|
-
__publicField$
|
|
2878
|
-
__publicField$
|
|
2879
|
-
__publicField$
|
|
2880
|
-
__publicField$
|
|
2881
|
-
__publicField$
|
|
2882
|
-
__publicField$
|
|
2883
|
-
__publicField$
|
|
2930
|
+
__publicField$C(this, "headline");
|
|
2931
|
+
__publicField$C(this, "itemCount");
|
|
2932
|
+
__publicField$C(this, "goToCheckoutButton");
|
|
2933
|
+
__publicField$C(this, "goToCartButton");
|
|
2934
|
+
__publicField$C(this, "continueShoppingButton");
|
|
2935
|
+
__publicField$C(this, "enterPromoInput");
|
|
2936
|
+
__publicField$C(this, "submitDiscountButton");
|
|
2937
|
+
__publicField$C(this, "subTotalPrice");
|
|
2938
|
+
__publicField$C(this, "shippingCosts");
|
|
2939
|
+
__publicField$C(this, "cartQuantityNumber");
|
|
2884
2940
|
this.headline = page.getByRole("heading", { name: "Shopping cart" });
|
|
2885
2941
|
this.itemCount = page.locator(".offcanvas-cart-header-count");
|
|
2886
2942
|
this.goToCheckoutButton = page.getByRole("link", { name: "Go to checkout" });
|
|
@@ -2922,36 +2978,36 @@ class OffCanvasCart {
|
|
|
2922
2978
|
}
|
|
2923
2979
|
}
|
|
2924
2980
|
|
|
2925
|
-
var __defProp$
|
|
2926
|
-
var __defNormalProp$
|
|
2927
|
-
var __publicField$
|
|
2928
|
-
__defNormalProp$
|
|
2981
|
+
var __defProp$B = Object.defineProperty;
|
|
2982
|
+
var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2983
|
+
var __publicField$B = (obj, key, value) => {
|
|
2984
|
+
__defNormalProp$B(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2929
2985
|
return value;
|
|
2930
2986
|
};
|
|
2931
2987
|
class CheckoutConfirm {
|
|
2932
2988
|
constructor(page) {
|
|
2933
2989
|
this.page = page;
|
|
2934
|
-
__publicField$
|
|
2935
|
-
__publicField$
|
|
2936
|
-
__publicField$
|
|
2937
|
-
__publicField$
|
|
2938
|
-
__publicField$
|
|
2939
|
-
__publicField$
|
|
2990
|
+
__publicField$B(this, "headline");
|
|
2991
|
+
__publicField$B(this, "termsAndConditionsCheckbox");
|
|
2992
|
+
__publicField$B(this, "immediateAccessToDigitalProductCheckbox");
|
|
2993
|
+
__publicField$B(this, "grandTotalPrice");
|
|
2994
|
+
__publicField$B(this, "taxPrice");
|
|
2995
|
+
__publicField$B(this, "submitOrderButton");
|
|
2940
2996
|
/**
|
|
2941
2997
|
* Payment options
|
|
2942
2998
|
*/
|
|
2943
|
-
__publicField$
|
|
2944
|
-
__publicField$
|
|
2945
|
-
__publicField$
|
|
2999
|
+
__publicField$B(this, "paymentCashOnDelivery");
|
|
3000
|
+
__publicField$B(this, "paymentPaidInAdvance");
|
|
3001
|
+
__publicField$B(this, "paymentInvoice");
|
|
2946
3002
|
/**
|
|
2947
3003
|
* Shipping options
|
|
2948
3004
|
*/
|
|
2949
|
-
__publicField$
|
|
2950
|
-
__publicField$
|
|
3005
|
+
__publicField$B(this, "shippingStandard");
|
|
3006
|
+
__publicField$B(this, "shippingExpress");
|
|
2951
3007
|
/**
|
|
2952
3008
|
* Product details
|
|
2953
3009
|
*/
|
|
2954
|
-
__publicField$
|
|
3010
|
+
__publicField$B(this, "cartLineItemImages");
|
|
2955
3011
|
this.headline = page.getByRole("heading", { name: "Complete order" });
|
|
2956
3012
|
this.termsAndConditionsCheckbox = page.getByLabel("I have read and accepted the general terms and conditions.");
|
|
2957
3013
|
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 +3026,21 @@ class CheckoutConfirm {
|
|
|
2970
3026
|
}
|
|
2971
3027
|
}
|
|
2972
3028
|
|
|
2973
|
-
var __defProp$
|
|
2974
|
-
var __defNormalProp$
|
|
2975
|
-
var __publicField$
|
|
2976
|
-
__defNormalProp$
|
|
3029
|
+
var __defProp$A = Object.defineProperty;
|
|
3030
|
+
var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3031
|
+
var __publicField$A = (obj, key, value) => {
|
|
3032
|
+
__defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2977
3033
|
return value;
|
|
2978
3034
|
};
|
|
2979
3035
|
class CheckoutFinish {
|
|
2980
3036
|
constructor(page) {
|
|
2981
3037
|
this.page = page;
|
|
2982
|
-
__publicField$
|
|
2983
|
-
__publicField$
|
|
2984
|
-
__publicField$
|
|
2985
|
-
__publicField$
|
|
2986
|
-
__publicField$
|
|
2987
|
-
__publicField$
|
|
3038
|
+
__publicField$A(this, "headline");
|
|
3039
|
+
__publicField$A(this, "orderNumberText");
|
|
3040
|
+
__publicField$A(this, "grandTotalPrice");
|
|
3041
|
+
__publicField$A(this, "taxPrice");
|
|
3042
|
+
__publicField$A(this, "cartLineItemImages");
|
|
3043
|
+
__publicField$A(this, "orderNumberRegex", /Your order number: #(\d+)/);
|
|
2988
3044
|
this.headline = page.getByRole("heading", { name: "Thank you for your order" });
|
|
2989
3045
|
this.orderNumberText = page.getByText(this.orderNumberRegex);
|
|
2990
3046
|
this.grandTotalPrice = page.locator('dt:has-text("Grand total") + dd');
|
|
@@ -3013,16 +3069,16 @@ class CheckoutFinish {
|
|
|
3013
3069
|
}
|
|
3014
3070
|
}
|
|
3015
3071
|
|
|
3016
|
-
var __defProp$
|
|
3017
|
-
var __defNormalProp$
|
|
3018
|
-
var __publicField$
|
|
3019
|
-
__defNormalProp$
|
|
3072
|
+
var __defProp$z = Object.defineProperty;
|
|
3073
|
+
var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3074
|
+
var __publicField$z = (obj, key, value) => {
|
|
3075
|
+
__defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3020
3076
|
return value;
|
|
3021
3077
|
};
|
|
3022
3078
|
class CheckoutRegister {
|
|
3023
3079
|
constructor(page) {
|
|
3024
3080
|
this.page = page;
|
|
3025
|
-
__publicField$
|
|
3081
|
+
__publicField$z(this, "cartLineItemImages");
|
|
3026
3082
|
this.cartLineItemImages = page.locator(".line-item-img-link");
|
|
3027
3083
|
}
|
|
3028
3084
|
url() {
|
|
@@ -3030,22 +3086,23 @@ class CheckoutRegister {
|
|
|
3030
3086
|
}
|
|
3031
3087
|
}
|
|
3032
3088
|
|
|
3033
|
-
var __defProp$
|
|
3034
|
-
var __defNormalProp$
|
|
3035
|
-
var __publicField$
|
|
3036
|
-
__defNormalProp$
|
|
3089
|
+
var __defProp$y = Object.defineProperty;
|
|
3090
|
+
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3091
|
+
var __publicField$y = (obj, key, value) => {
|
|
3092
|
+
__defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3037
3093
|
return value;
|
|
3038
3094
|
};
|
|
3039
3095
|
class Account {
|
|
3040
3096
|
constructor(page) {
|
|
3041
3097
|
this.page = page;
|
|
3042
|
-
__publicField$
|
|
3043
|
-
__publicField$
|
|
3044
|
-
__publicField$
|
|
3045
|
-
__publicField$
|
|
3046
|
-
__publicField$
|
|
3047
|
-
__publicField$
|
|
3048
|
-
__publicField$
|
|
3098
|
+
__publicField$y(this, "headline");
|
|
3099
|
+
__publicField$y(this, "personalDataCardTitle");
|
|
3100
|
+
__publicField$y(this, "paymentMethodCardTitle");
|
|
3101
|
+
__publicField$y(this, "billingAddressCardTitle");
|
|
3102
|
+
__publicField$y(this, "shippingAddressCardTitle");
|
|
3103
|
+
__publicField$y(this, "newsletterCheckbox");
|
|
3104
|
+
__publicField$y(this, "newsletterRegistrationSuccessMessage");
|
|
3105
|
+
__publicField$y(this, "customerGroupRequestMessage");
|
|
3049
3106
|
this.headline = page.getByRole("heading", { name: "Overview" });
|
|
3050
3107
|
this.personalDataCardTitle = page.getByRole("heading", { name: "Personal data" });
|
|
3051
3108
|
this.paymentMethodCardTitle = page.getByRole("heading", { name: "Default payment method" });
|
|
@@ -3053,38 +3110,45 @@ class Account {
|
|
|
3053
3110
|
this.shippingAddressCardTitle = page.getByRole("heading", { name: "Default shipping address" });
|
|
3054
3111
|
this.newsletterCheckbox = page.getByLabel("Yes, I would like to");
|
|
3055
3112
|
this.newsletterRegistrationSuccessMessage = page.getByText("You have successfully subscribed to the newsletter.");
|
|
3113
|
+
this.customerGroupRequestMessage = page.locator(".alert-content");
|
|
3114
|
+
}
|
|
3115
|
+
async getCustomerGroupAlert(customerGroup) {
|
|
3116
|
+
return this.customerGroupRequestMessage.getByText(`Access to customer group "${customerGroup}" requested.`);
|
|
3056
3117
|
}
|
|
3057
3118
|
url() {
|
|
3058
3119
|
return "account";
|
|
3059
3120
|
}
|
|
3060
3121
|
}
|
|
3061
3122
|
|
|
3062
|
-
var __defProp$
|
|
3063
|
-
var __defNormalProp$
|
|
3064
|
-
var __publicField$
|
|
3065
|
-
__defNormalProp$
|
|
3123
|
+
var __defProp$x = Object.defineProperty;
|
|
3124
|
+
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3125
|
+
var __publicField$x = (obj, key, value) => {
|
|
3126
|
+
__defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3066
3127
|
return value;
|
|
3067
3128
|
};
|
|
3068
3129
|
class AccountLogin {
|
|
3069
3130
|
constructor(page) {
|
|
3070
3131
|
this.page = page;
|
|
3071
|
-
__publicField$
|
|
3072
|
-
__publicField$
|
|
3073
|
-
__publicField$
|
|
3074
|
-
__publicField$
|
|
3075
|
-
__publicField$
|
|
3132
|
+
__publicField$x(this, "emailInput");
|
|
3133
|
+
__publicField$x(this, "passwordInput");
|
|
3134
|
+
__publicField$x(this, "loginButton");
|
|
3135
|
+
__publicField$x(this, "logoutLink");
|
|
3136
|
+
__publicField$x(this, "successAlert");
|
|
3076
3137
|
// Inputs for registration
|
|
3077
|
-
__publicField$
|
|
3078
|
-
__publicField$
|
|
3079
|
-
__publicField$
|
|
3080
|
-
__publicField$
|
|
3081
|
-
__publicField$
|
|
3082
|
-
__publicField$
|
|
3083
|
-
__publicField$
|
|
3084
|
-
__publicField$
|
|
3085
|
-
__publicField$
|
|
3086
|
-
__publicField$
|
|
3087
|
-
__publicField$
|
|
3138
|
+
__publicField$x(this, "personalFormArea");
|
|
3139
|
+
__publicField$x(this, "billingAddressFormArea");
|
|
3140
|
+
__publicField$x(this, "firstNameInput");
|
|
3141
|
+
__publicField$x(this, "lastNameInput");
|
|
3142
|
+
__publicField$x(this, "companyInput");
|
|
3143
|
+
__publicField$x(this, "departmentInput");
|
|
3144
|
+
__publicField$x(this, "vatRegNoInput");
|
|
3145
|
+
__publicField$x(this, "registerEmailInput");
|
|
3146
|
+
__publicField$x(this, "registerPasswordInput");
|
|
3147
|
+
__publicField$x(this, "streetAddressInput");
|
|
3148
|
+
__publicField$x(this, "cityInput");
|
|
3149
|
+
__publicField$x(this, "countryInput");
|
|
3150
|
+
__publicField$x(this, "postalCodeInput");
|
|
3151
|
+
__publicField$x(this, "registerButton");
|
|
3088
3152
|
this.emailInput = page.getByLabel("Your email address");
|
|
3089
3153
|
this.passwordInput = page.getByLabel("Your password");
|
|
3090
3154
|
this.loginButton = page.getByRole("button", { name: "Log in" });
|
|
@@ -3093,6 +3157,9 @@ class AccountLogin {
|
|
|
3093
3157
|
this.billingAddressFormArea = page.locator(".register-billing");
|
|
3094
3158
|
this.firstNameInput = this.personalFormArea.getByLabel("First name*");
|
|
3095
3159
|
this.lastNameInput = this.personalFormArea.getByLabel("Last name*");
|
|
3160
|
+
this.companyInput = this.personalFormArea.getByPlaceholder("Enter company...");
|
|
3161
|
+
this.departmentInput = this.personalFormArea.getByPlaceholder("Enter department...");
|
|
3162
|
+
this.vatRegNoInput = this.personalFormArea.getByPlaceholder("VAT Reg.No.");
|
|
3096
3163
|
this.registerEmailInput = this.personalFormArea.getByLabel("Email address*");
|
|
3097
3164
|
this.registerPasswordInput = this.personalFormArea.getByLabel("Password*");
|
|
3098
3165
|
this.streetAddressInput = this.billingAddressFormArea.getByLabel("Street address*");
|
|
@@ -3108,29 +3175,29 @@ class AccountLogin {
|
|
|
3108
3175
|
}
|
|
3109
3176
|
}
|
|
3110
3177
|
|
|
3111
|
-
var __defProp$
|
|
3112
|
-
var __defNormalProp$
|
|
3113
|
-
var __publicField$
|
|
3114
|
-
__defNormalProp$
|
|
3178
|
+
var __defProp$w = Object.defineProperty;
|
|
3179
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3180
|
+
var __publicField$w = (obj, key, value) => {
|
|
3181
|
+
__defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3115
3182
|
return value;
|
|
3116
3183
|
};
|
|
3117
3184
|
class AccountProfile {
|
|
3118
3185
|
constructor(page) {
|
|
3119
3186
|
this.page = page;
|
|
3120
|
-
__publicField$
|
|
3121
|
-
__publicField$
|
|
3122
|
-
__publicField$
|
|
3123
|
-
__publicField$
|
|
3124
|
-
__publicField$
|
|
3125
|
-
__publicField$
|
|
3126
|
-
__publicField$
|
|
3127
|
-
__publicField$
|
|
3128
|
-
__publicField$
|
|
3129
|
-
__publicField$
|
|
3130
|
-
__publicField$
|
|
3131
|
-
__publicField$
|
|
3132
|
-
__publicField$
|
|
3133
|
-
__publicField$
|
|
3187
|
+
__publicField$w(this, "salutationSelect");
|
|
3188
|
+
__publicField$w(this, "firstNameInput");
|
|
3189
|
+
__publicField$w(this, "lastNameInput");
|
|
3190
|
+
__publicField$w(this, "saveProfileButton");
|
|
3191
|
+
__publicField$w(this, "changeEmailButton");
|
|
3192
|
+
__publicField$w(this, "emailAddressInput");
|
|
3193
|
+
__publicField$w(this, "emailAddressConfirmInput");
|
|
3194
|
+
__publicField$w(this, "emailConfirmPasswordInput");
|
|
3195
|
+
__publicField$w(this, "saveEmailAddressButton");
|
|
3196
|
+
__publicField$w(this, "changePasswordButton");
|
|
3197
|
+
__publicField$w(this, "newPasswordInput");
|
|
3198
|
+
__publicField$w(this, "newPasswordConfirmInput");
|
|
3199
|
+
__publicField$w(this, "currentPasswordInput");
|
|
3200
|
+
__publicField$w(this, "saveNewPasswordButton");
|
|
3134
3201
|
this.salutationSelect = page.getByLabel("Salutation");
|
|
3135
3202
|
this.firstNameInput = page.getByPlaceholder("Enter first name...");
|
|
3136
3203
|
this.lastNameInput = page.getByPlaceholder("Enter last name...");
|
|
@@ -3151,41 +3218,80 @@ class AccountProfile {
|
|
|
3151
3218
|
}
|
|
3152
3219
|
}
|
|
3153
3220
|
|
|
3154
|
-
var __defProp$
|
|
3155
|
-
var __defNormalProp$
|
|
3156
|
-
var __publicField$
|
|
3157
|
-
__defNormalProp$
|
|
3221
|
+
var __defProp$v = Object.defineProperty;
|
|
3222
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3223
|
+
var __publicField$v = (obj, key, value) => {
|
|
3224
|
+
__defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3158
3225
|
return value;
|
|
3159
3226
|
};
|
|
3160
3227
|
class AccountOrder {
|
|
3161
3228
|
constructor(page) {
|
|
3162
3229
|
this.page = page;
|
|
3163
|
-
__publicField$
|
|
3164
|
-
__publicField$
|
|
3165
|
-
__publicField$
|
|
3230
|
+
__publicField$v(this, "cartLineItemImages");
|
|
3231
|
+
__publicField$v(this, "orderExpandButton");
|
|
3232
|
+
__publicField$v(this, "digitalProductDownloadButton");
|
|
3233
|
+
__publicField$v(this, "dialogOrderCancel");
|
|
3234
|
+
__publicField$v(this, "dialogOrderCancelButton");
|
|
3235
|
+
__publicField$v(this, "dialogBackButton");
|
|
3236
|
+
__publicField$v(this, "getViewSubscriptionLink", (orderNumber) => {
|
|
3237
|
+
const orderContainer = this.page.locator(".order-item-header", { hasText: `Order Number: ${orderNumber}` });
|
|
3238
|
+
return orderContainer.getByText("View Subscription");
|
|
3239
|
+
});
|
|
3166
3240
|
this.orderExpandButton = page.getByRole("button", { name: /Expand|Show details/ }).first();
|
|
3167
3241
|
this.cartLineItemImages = page.locator(".line-item-img-link");
|
|
3168
3242
|
this.digitalProductDownloadButton = page.getByRole("link", { name: "Download" }).first();
|
|
3243
|
+
this.dialogOrderCancel = page.getByRole("dialog", { name: "Cancel order" });
|
|
3244
|
+
this.dialogOrderCancelButton = this.dialogOrderCancel.getByRole("button", { name: "Cancel order" });
|
|
3245
|
+
this.dialogBackButton = this.dialogOrderCancel.getByRole("button", { name: "Back" });
|
|
3246
|
+
}
|
|
3247
|
+
async getOrderByOrderNumber(orderNumber) {
|
|
3248
|
+
const orderItem = this.page.getByRole("listitem").getByLabel(`Order number ${orderNumber}`);
|
|
3249
|
+
const orderStatus = orderItem.locator(".order-table-header-order-status");
|
|
3250
|
+
const orderHeading = orderItem.locator(".order-table-header-heading");
|
|
3251
|
+
const orderActionsButton = orderItem.getByLabel("Actions");
|
|
3252
|
+
const orderCancelButton = orderItem.getByRole("button", { name: "Cancel order" });
|
|
3253
|
+
const orderRepeatButton = orderItem.getByRole("button", { name: "Repeat order" });
|
|
3254
|
+
const orderChangePaymentMethodButton = orderItem.getByRole("link", { name: "Change payment method" });
|
|
3255
|
+
const orderShippingStatus = orderItem.locator(".order-table-body-value").nth(1);
|
|
3256
|
+
const orderPaymentStatus = orderItem.locator(".order-table-body-value").nth(2);
|
|
3257
|
+
const orderPaymentMethod = orderItem.locator(".order-table-body-value").nth(3);
|
|
3258
|
+
const orderShippingMethod = orderItem.locator(".order-table-body-value").nth(4);
|
|
3259
|
+
const orderDetailButton = orderItem.getByRole("button", { name: /Expand|Show details/ });
|
|
3260
|
+
const orderImage = orderItem.locator(".line-item-img-link");
|
|
3261
|
+
return {
|
|
3262
|
+
orderStatus,
|
|
3263
|
+
orderHeading,
|
|
3264
|
+
orderActionsButton,
|
|
3265
|
+
orderCancelButton,
|
|
3266
|
+
orderRepeatButton,
|
|
3267
|
+
orderChangePaymentMethodButton,
|
|
3268
|
+
orderShippingStatus,
|
|
3269
|
+
orderPaymentStatus,
|
|
3270
|
+
orderPaymentMethod,
|
|
3271
|
+
orderShippingMethod,
|
|
3272
|
+
orderDetailButton,
|
|
3273
|
+
orderImage
|
|
3274
|
+
};
|
|
3169
3275
|
}
|
|
3170
3276
|
url() {
|
|
3171
3277
|
return "account/order";
|
|
3172
3278
|
}
|
|
3173
3279
|
}
|
|
3174
3280
|
|
|
3175
|
-
var __defProp$
|
|
3176
|
-
var __defNormalProp$
|
|
3177
|
-
var __publicField$
|
|
3178
|
-
__defNormalProp$
|
|
3281
|
+
var __defProp$u = Object.defineProperty;
|
|
3282
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3283
|
+
var __publicField$u = (obj, key, value) => {
|
|
3284
|
+
__defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3179
3285
|
return value;
|
|
3180
3286
|
};
|
|
3181
3287
|
class AccountAddresses {
|
|
3182
3288
|
constructor(page) {
|
|
3183
3289
|
this.page = page;
|
|
3184
|
-
__publicField$
|
|
3185
|
-
__publicField$
|
|
3186
|
-
__publicField$
|
|
3187
|
-
__publicField$
|
|
3188
|
-
__publicField$
|
|
3290
|
+
__publicField$u(this, "addNewAddressButton");
|
|
3291
|
+
__publicField$u(this, "editBillingAddressButton");
|
|
3292
|
+
__publicField$u(this, "editShippingAddressButton");
|
|
3293
|
+
__publicField$u(this, "useDefaultBillingAddressButton");
|
|
3294
|
+
__publicField$u(this, "useDefaultShippingAddressButton");
|
|
3189
3295
|
this.addNewAddressButton = page.getByRole("link", { name: /Add (new )?address/ });
|
|
3190
3296
|
this.editBillingAddressButton = page.getByRole("link", { name: "Edit address" }).first();
|
|
3191
3297
|
this.editShippingAddressButton = page.getByRole("link", { name: "Edit address" }).nth(1);
|
|
@@ -3197,19 +3303,19 @@ class AccountAddresses {
|
|
|
3197
3303
|
}
|
|
3198
3304
|
}
|
|
3199
3305
|
|
|
3200
|
-
var __defProp$
|
|
3201
|
-
var __defNormalProp$
|
|
3202
|
-
var __publicField$
|
|
3203
|
-
__defNormalProp$
|
|
3306
|
+
var __defProp$t = Object.defineProperty;
|
|
3307
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3308
|
+
var __publicField$t = (obj, key, value) => {
|
|
3309
|
+
__defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3204
3310
|
return value;
|
|
3205
3311
|
};
|
|
3206
3312
|
class AccountPayment {
|
|
3207
3313
|
constructor(page) {
|
|
3208
3314
|
this.page = page;
|
|
3209
|
-
__publicField$
|
|
3210
|
-
__publicField$
|
|
3211
|
-
__publicField$
|
|
3212
|
-
__publicField$
|
|
3315
|
+
__publicField$t(this, "cashOnDeliveryOption");
|
|
3316
|
+
__publicField$t(this, "paidInAdvanceOption");
|
|
3317
|
+
__publicField$t(this, "invoiceOption");
|
|
3318
|
+
__publicField$t(this, "changeDefaultPaymentButton");
|
|
3213
3319
|
this.cashOnDeliveryOption = page.getByLabel("Cash on delivery");
|
|
3214
3320
|
this.paidInAdvanceOption = page.getByLabel("Paid in advance");
|
|
3215
3321
|
this.invoiceOption = page.getByLabel("Invoice");
|
|
@@ -3220,17 +3326,17 @@ class AccountPayment {
|
|
|
3220
3326
|
}
|
|
3221
3327
|
}
|
|
3222
3328
|
|
|
3223
|
-
var __defProp$
|
|
3224
|
-
var __defNormalProp$
|
|
3225
|
-
var __publicField$
|
|
3226
|
-
__defNormalProp$
|
|
3329
|
+
var __defProp$s = Object.defineProperty;
|
|
3330
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3331
|
+
var __publicField$s = (obj, key, value) => {
|
|
3332
|
+
__defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3227
3333
|
return value;
|
|
3228
3334
|
};
|
|
3229
3335
|
class Search {
|
|
3230
3336
|
constructor(page) {
|
|
3231
3337
|
this.page = page;
|
|
3232
|
-
__publicField$
|
|
3233
|
-
__publicField$
|
|
3338
|
+
__publicField$s(this, "headline");
|
|
3339
|
+
__publicField$s(this, "productImages");
|
|
3234
3340
|
this.headline = page.locator("h1.search-headline");
|
|
3235
3341
|
this.productImages = page.locator(".product-image-link");
|
|
3236
3342
|
}
|
|
@@ -3239,16 +3345,16 @@ class Search {
|
|
|
3239
3345
|
}
|
|
3240
3346
|
}
|
|
3241
3347
|
|
|
3242
|
-
var __defProp$
|
|
3243
|
-
var __defNormalProp$
|
|
3244
|
-
var __publicField$
|
|
3245
|
-
__defNormalProp$
|
|
3348
|
+
var __defProp$r = Object.defineProperty;
|
|
3349
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3350
|
+
var __publicField$r = (obj, key, value) => {
|
|
3351
|
+
__defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3246
3352
|
return value;
|
|
3247
3353
|
};
|
|
3248
3354
|
class SearchSuggest {
|
|
3249
3355
|
constructor(page) {
|
|
3250
3356
|
this.page = page;
|
|
3251
|
-
__publicField$
|
|
3357
|
+
__publicField$r(this, "searchSuggestLineItemImages");
|
|
3252
3358
|
this.searchSuggestLineItemImages = page.locator(".search-suggest-product-image-container");
|
|
3253
3359
|
}
|
|
3254
3360
|
url(searchTerm) {
|
|
@@ -3256,6 +3362,16 @@ class SearchSuggest {
|
|
|
3256
3362
|
}
|
|
3257
3363
|
}
|
|
3258
3364
|
|
|
3365
|
+
class CustomRegister extends AccountLogin {
|
|
3366
|
+
constructor(page) {
|
|
3367
|
+
super(page);
|
|
3368
|
+
this.page = page;
|
|
3369
|
+
}
|
|
3370
|
+
url(customCustomerGroupName) {
|
|
3371
|
+
return `${customCustomerGroupName?.replace(/\s+/g, "-") ?? ""}`;
|
|
3372
|
+
}
|
|
3373
|
+
}
|
|
3374
|
+
|
|
3259
3375
|
const StorefrontPageObjects = {
|
|
3260
3376
|
Home,
|
|
3261
3377
|
ProductDetail: ProductDetail$1,
|
|
@@ -3272,7 +3388,8 @@ const StorefrontPageObjects = {
|
|
|
3272
3388
|
AccountAddresses,
|
|
3273
3389
|
AccountPayment,
|
|
3274
3390
|
Search,
|
|
3275
|
-
SearchSuggest
|
|
3391
|
+
SearchSuggest,
|
|
3392
|
+
CustomRegister
|
|
3276
3393
|
};
|
|
3277
3394
|
const test$6 = test$e.extend({
|
|
3278
3395
|
StorefrontHome: async ({ StorefrontPage }, use) => {
|
|
@@ -3322,13 +3439,16 @@ const test$6 = test$e.extend({
|
|
|
3322
3439
|
},
|
|
3323
3440
|
StorefrontSearchSuggest: async ({ StorefrontPage }, use) => {
|
|
3324
3441
|
await use(new SearchSuggest(StorefrontPage));
|
|
3442
|
+
},
|
|
3443
|
+
StorefrontCustomRegister: async ({ StorefrontPage }, use) => {
|
|
3444
|
+
await use(new CustomRegister(StorefrontPage));
|
|
3325
3445
|
}
|
|
3326
3446
|
});
|
|
3327
3447
|
|
|
3328
|
-
var __defProp$
|
|
3329
|
-
var __defNormalProp$
|
|
3330
|
-
var __publicField$
|
|
3331
|
-
__defNormalProp$
|
|
3448
|
+
var __defProp$q = Object.defineProperty;
|
|
3449
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3450
|
+
var __publicField$q = (obj, key, value) => {
|
|
3451
|
+
__defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3332
3452
|
return value;
|
|
3333
3453
|
};
|
|
3334
3454
|
class ProductDetail {
|
|
@@ -3337,44 +3457,44 @@ class ProductDetail {
|
|
|
3337
3457
|
/**
|
|
3338
3458
|
* Save interactions
|
|
3339
3459
|
*/
|
|
3340
|
-
__publicField$
|
|
3341
|
-
__publicField$
|
|
3342
|
-
__publicField$
|
|
3460
|
+
__publicField$q(this, "savePhysicalProductButton");
|
|
3461
|
+
__publicField$q(this, "saveButtonLoadingSpinner");
|
|
3462
|
+
__publicField$q(this, "saveButtonCheckMark");
|
|
3343
3463
|
/**
|
|
3344
3464
|
* Media Upload interactions
|
|
3345
3465
|
*/
|
|
3346
|
-
__publicField$
|
|
3347
|
-
__publicField$
|
|
3348
|
-
__publicField$
|
|
3466
|
+
__publicField$q(this, "uploadMediaButton");
|
|
3467
|
+
__publicField$q(this, "coverImage");
|
|
3468
|
+
__publicField$q(this, "productImage");
|
|
3349
3469
|
/**
|
|
3350
3470
|
* Tabs
|
|
3351
3471
|
*/
|
|
3352
|
-
__publicField$
|
|
3353
|
-
__publicField$
|
|
3472
|
+
__publicField$q(this, "variantsTabLink");
|
|
3473
|
+
__publicField$q(this, "specificationsTabLink");
|
|
3354
3474
|
/**
|
|
3355
3475
|
* Variants Generation
|
|
3356
3476
|
*/
|
|
3357
|
-
__publicField$
|
|
3358
|
-
__publicField$
|
|
3359
|
-
__publicField$
|
|
3360
|
-
__publicField$
|
|
3361
|
-
__publicField$
|
|
3477
|
+
__publicField$q(this, "generateVariantsButton");
|
|
3478
|
+
__publicField$q(this, "variantsModal");
|
|
3479
|
+
__publicField$q(this, "variantsModalHeadline");
|
|
3480
|
+
__publicField$q(this, "variantsNextButton");
|
|
3481
|
+
__publicField$q(this, "variantsSaveButton");
|
|
3362
3482
|
/**
|
|
3363
3483
|
* Property Selection
|
|
3364
3484
|
*/
|
|
3365
|
-
__publicField$
|
|
3366
|
-
__publicField$
|
|
3367
|
-
__publicField$
|
|
3368
|
-
__publicField$
|
|
3369
|
-
__publicField$
|
|
3370
|
-
__publicField$
|
|
3371
|
-
__publicField$
|
|
3372
|
-
__publicField$
|
|
3373
|
-
__publicField$
|
|
3485
|
+
__publicField$q(this, "propertyGroupColor");
|
|
3486
|
+
__publicField$q(this, "propertyGroupSize");
|
|
3487
|
+
__publicField$q(this, "propertyOptionGrid");
|
|
3488
|
+
__publicField$q(this, "propertyOptionColorBlue");
|
|
3489
|
+
__publicField$q(this, "propertyOptionColorRed");
|
|
3490
|
+
__publicField$q(this, "propertyOptionColorGreen");
|
|
3491
|
+
__publicField$q(this, "propertyOptionSizeSmall");
|
|
3492
|
+
__publicField$q(this, "propertyOptionSizeMedium");
|
|
3493
|
+
__publicField$q(this, "propertyOptionSizeLarge");
|
|
3374
3494
|
/**
|
|
3375
3495
|
* Cards
|
|
3376
3496
|
*/
|
|
3377
|
-
__publicField$
|
|
3497
|
+
__publicField$q(this, "customFieldCard");
|
|
3378
3498
|
this.savePhysicalProductButton = page.getByRole("button", { name: "Save" });
|
|
3379
3499
|
this.saveButtonCheckMark = page.locator(".icon--regular-checkmark-xs");
|
|
3380
3500
|
this.saveButtonLoadingSpinner = page.locator("sw-loader");
|
|
@@ -3385,7 +3505,7 @@ class ProductDetail {
|
|
|
3385
3505
|
this.generateVariantsButton = page.getByRole("button", { name: "Generate variants" });
|
|
3386
3506
|
this.variantsModal = page.getByRole("dialog", { name: "Generate variants" });
|
|
3387
3507
|
this.variantsModalHeadline = this.variantsModal.getByRole("heading", { name: "Generate variants" });
|
|
3388
|
-
this.variantsNextButton = this.variantsModal.getByRole("button", { name: "Next" });
|
|
3508
|
+
this.variantsNextButton = this.variantsModal.getByRole("button", { name: "Next", exact: true });
|
|
3389
3509
|
this.variantsSaveButton = this.variantsModal.getByRole("button", { name: "Save variants" });
|
|
3390
3510
|
this.propertyGroupColor = this.variantsModal.getByText("Color").first();
|
|
3391
3511
|
this.propertyGroupSize = this.variantsModal.getByText("Size").first();
|
|
@@ -3413,18 +3533,18 @@ class ProductDetail {
|
|
|
3413
3533
|
}
|
|
3414
3534
|
}
|
|
3415
3535
|
|
|
3416
|
-
var __defProp$
|
|
3417
|
-
var __defNormalProp$
|
|
3418
|
-
var __publicField$
|
|
3419
|
-
__defNormalProp$
|
|
3536
|
+
var __defProp$p = Object.defineProperty;
|
|
3537
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3538
|
+
var __publicField$p = (obj, key, value) => {
|
|
3539
|
+
__defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3420
3540
|
return value;
|
|
3421
3541
|
};
|
|
3422
3542
|
class OrderDetail {
|
|
3423
3543
|
constructor(page) {
|
|
3424
3544
|
this.page = page;
|
|
3425
|
-
__publicField$
|
|
3426
|
-
__publicField$
|
|
3427
|
-
__publicField$
|
|
3545
|
+
__publicField$p(this, "saveButton");
|
|
3546
|
+
__publicField$p(this, "dataGridContextButton");
|
|
3547
|
+
__publicField$p(this, "orderTag");
|
|
3428
3548
|
this.saveButton = page.locator(".sw-order-detail__smart-bar-save-button");
|
|
3429
3549
|
this.dataGridContextButton = page.locator(".sw-data-grid__actions-menu").and(page.getByRole("button"));
|
|
3430
3550
|
this.orderTag = page.locator(".sw-select-selection-list__item");
|
|
@@ -3434,27 +3554,71 @@ class OrderDetail {
|
|
|
3434
3554
|
}
|
|
3435
3555
|
}
|
|
3436
3556
|
|
|
3437
|
-
var __defProp$
|
|
3438
|
-
var __defNormalProp$
|
|
3439
|
-
var __publicField$
|
|
3440
|
-
__defNormalProp$
|
|
3557
|
+
var __defProp$o = Object.defineProperty;
|
|
3558
|
+
var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3559
|
+
var __publicField$o = (obj, key, value) => {
|
|
3560
|
+
__defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3561
|
+
return value;
|
|
3562
|
+
};
|
|
3563
|
+
class CustomerListing {
|
|
3564
|
+
constructor(page) {
|
|
3565
|
+
this.page = page;
|
|
3566
|
+
__publicField$o(this, "headline");
|
|
3567
|
+
__publicField$o(this, "addCustomerButton");
|
|
3568
|
+
this.headline = page.getByRole("heading", { name: "Customers" });
|
|
3569
|
+
this.addCustomerButton = page.locator(".sw-customer-list__button-create");
|
|
3570
|
+
}
|
|
3571
|
+
async getCustomerByEmail(customerEmail) {
|
|
3572
|
+
const customer = this.page.getByRole("row").filter({ hasText: customerEmail });
|
|
3573
|
+
const customerName = customer.locator(".sw-data-grid__cell--firstName a");
|
|
3574
|
+
const customerStreet = customer.locator(".sw-data-grid__cell--defaultBillingAddress-street");
|
|
3575
|
+
const customerPostalCode = customer.locator(".sw-data-grid__cell--defaultBillingAddress-zipcode");
|
|
3576
|
+
const customerCity = customer.locator(".sw-data-grid__cell--defaultBillingAddress-city");
|
|
3577
|
+
const customerNumber = customer.locator(".sw-data-grid__cell--customerNumber");
|
|
3578
|
+
const customerGroup = customer.locator(".sw-data-grid__cell--group");
|
|
3579
|
+
const customerEmailAddress = customer.locator(".sw-data-grid__cell--email");
|
|
3580
|
+
return {
|
|
3581
|
+
customerName,
|
|
3582
|
+
customerStreet,
|
|
3583
|
+
customerPostalCode,
|
|
3584
|
+
customerCity,
|
|
3585
|
+
customerNumber,
|
|
3586
|
+
customerGroup,
|
|
3587
|
+
customerEmailAddress
|
|
3588
|
+
};
|
|
3589
|
+
}
|
|
3590
|
+
url() {
|
|
3591
|
+
return "#/sw/customer/index";
|
|
3592
|
+
}
|
|
3593
|
+
}
|
|
3594
|
+
|
|
3595
|
+
var __defProp$n = Object.defineProperty;
|
|
3596
|
+
var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3597
|
+
var __publicField$n = (obj, key, value) => {
|
|
3598
|
+
__defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3441
3599
|
return value;
|
|
3442
3600
|
};
|
|
3443
3601
|
class CustomerDetail {
|
|
3444
3602
|
constructor(page) {
|
|
3445
3603
|
this.page = page;
|
|
3446
|
-
__publicField$
|
|
3447
|
-
__publicField$
|
|
3448
|
-
__publicField$
|
|
3449
|
-
__publicField$
|
|
3450
|
-
__publicField$
|
|
3451
|
-
__publicField$
|
|
3604
|
+
__publicField$n(this, "editButton");
|
|
3605
|
+
__publicField$n(this, "generalTab");
|
|
3606
|
+
__publicField$n(this, "accountCard");
|
|
3607
|
+
__publicField$n(this, "customFieldCard");
|
|
3608
|
+
__publicField$n(this, "customFieldSetTabs");
|
|
3609
|
+
__publicField$n(this, "customFieldSetTabCustomContent");
|
|
3610
|
+
__publicField$n(this, "customerGroupRequestMessage");
|
|
3611
|
+
__publicField$n(this, "customerGroupAcceptButton");
|
|
3612
|
+
__publicField$n(this, "customerGroupDeclineButton");
|
|
3452
3613
|
this.editButton = page.getByRole("button", { name: "Edit" });
|
|
3453
3614
|
this.generalTab = page.getByRole("link", { name: "General" });
|
|
3454
3615
|
this.accountCard = page.locator(".sw-customer-card");
|
|
3455
3616
|
this.customFieldCard = page.locator(".sw-card").getByText("Custom fields");
|
|
3456
3617
|
this.customFieldSetTabs = this.customFieldCard.locator(".sw-tabs-item");
|
|
3457
3618
|
this.customFieldSetTabCustomContent = this.customFieldCard.locator(".sw-tabs__custom-content");
|
|
3619
|
+
this.customerGroupRequestMessage = page.locator(".sw-alert__message");
|
|
3620
|
+
this.customerGroupAcceptButton = page.getByRole("button", { name: "Accept" });
|
|
3621
|
+
this.customerGroupDeclineButton = page.getByRole("button", { name: "Decline" });
|
|
3458
3622
|
}
|
|
3459
3623
|
async getCustomFieldSetCardContentByName(customFieldSetName) {
|
|
3460
3624
|
const customFieldCard = this.page.locator(".sw-card").filter({ hasText: "Custom fields" });
|
|
@@ -3465,11 +3629,113 @@ class CustomerDetail {
|
|
|
3465
3629
|
customFieldSetTabCustomContent
|
|
3466
3630
|
};
|
|
3467
3631
|
}
|
|
3632
|
+
async getCustomerGroupAlert(customerGroup) {
|
|
3633
|
+
return this.customerGroupRequestMessage.getByText(`Access to customer group "${customerGroup}" requested.`);
|
|
3634
|
+
}
|
|
3468
3635
|
url(customerId) {
|
|
3469
3636
|
return `#/sw/customer/detail/${customerId}/base`;
|
|
3470
3637
|
}
|
|
3471
3638
|
}
|
|
3472
3639
|
|
|
3640
|
+
var __defProp$m = Object.defineProperty;
|
|
3641
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3642
|
+
var __publicField$m = (obj, key, value) => {
|
|
3643
|
+
__defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3644
|
+
return value;
|
|
3645
|
+
};
|
|
3646
|
+
class CustomerGroupListing {
|
|
3647
|
+
constructor(page) {
|
|
3648
|
+
this.page = page;
|
|
3649
|
+
__publicField$m(this, "headline");
|
|
3650
|
+
__publicField$m(this, "addCustomerGroupButton");
|
|
3651
|
+
this.headline = page.getByRole("heading", { name: "Customer groups" });
|
|
3652
|
+
this.addCustomerGroupButton = page.locator(".sw-settings-customer-group-list__create");
|
|
3653
|
+
}
|
|
3654
|
+
async getCustomerGroupByName(customerGroup) {
|
|
3655
|
+
const lineItem = this.page.getByRole("row").filter({ hasText: customerGroup });
|
|
3656
|
+
const customerGroupCheckbox = lineItem.locator(".sw-data-grid__cell--selection");
|
|
3657
|
+
const customerGroupName = lineItem.locator(".sw-data-grid__cell--name");
|
|
3658
|
+
const customerGroupTaxDisplay = lineItem.locator(".sw-data-grid__cell--displayGross");
|
|
3659
|
+
const customerGroupActionButton = lineItem.locator(".sw-data-grid__actions-menu");
|
|
3660
|
+
return {
|
|
3661
|
+
customerGroupCheckbox,
|
|
3662
|
+
customerGroupName,
|
|
3663
|
+
customerGroupTaxDisplay,
|
|
3664
|
+
customerGroupActionButton
|
|
3665
|
+
};
|
|
3666
|
+
}
|
|
3667
|
+
url() {
|
|
3668
|
+
return "#/sw/settings/customer/group/index";
|
|
3669
|
+
}
|
|
3670
|
+
}
|
|
3671
|
+
|
|
3672
|
+
var __defProp$l = Object.defineProperty;
|
|
3673
|
+
var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3674
|
+
var __publicField$l = (obj, key, value) => {
|
|
3675
|
+
__defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3676
|
+
return value;
|
|
3677
|
+
};
|
|
3678
|
+
class CustomerGroupCreate {
|
|
3679
|
+
constructor(page) {
|
|
3680
|
+
this.page = page;
|
|
3681
|
+
__publicField$l(this, "headline");
|
|
3682
|
+
__publicField$l(this, "saveButton");
|
|
3683
|
+
__publicField$l(this, "cancelButton");
|
|
3684
|
+
__publicField$l(this, "cardTitle");
|
|
3685
|
+
__publicField$l(this, "customerGroupNameField");
|
|
3686
|
+
__publicField$l(this, "customerGroupGrossTaxDisplay");
|
|
3687
|
+
__publicField$l(this, "customerGroupNetTaxDisplay");
|
|
3688
|
+
__publicField$l(this, "customSignupFormToggle");
|
|
3689
|
+
__publicField$l(this, "signupFormTitle");
|
|
3690
|
+
__publicField$l(this, "signupFormIntroduction");
|
|
3691
|
+
__publicField$l(this, "signupFormSeoDescription");
|
|
3692
|
+
__publicField$l(this, "signupFormCompanySignupToggle");
|
|
3693
|
+
__publicField$l(this, "customerGroupSaleschannelSelection");
|
|
3694
|
+
__publicField$l(this, "customerGroupSaleschannelResultList");
|
|
3695
|
+
this.headline = page.getByRole("heading", { name: "New customer group" });
|
|
3696
|
+
this.saveButton = page.getByRole("button", { name: "Save" });
|
|
3697
|
+
this.cancelButton = page.getByRole("button", { name: "Cancel" });
|
|
3698
|
+
this.cardTitle = page.getByRole("heading", { name: "Customer group" });
|
|
3699
|
+
this.customerGroupNameField = page.locator("#sw-field--customerGroup-name");
|
|
3700
|
+
this.customerGroupGrossTaxDisplay = page.locator("#sw-field--castedValue-0");
|
|
3701
|
+
this.customerGroupNetTaxDisplay = page.locator("#sw-field--castedValue-1");
|
|
3702
|
+
this.customSignupFormToggle = page.getByLabel("Custom signup form");
|
|
3703
|
+
this.signupFormTitle = page.locator("#sw-field--customerGroup-registrationTitle");
|
|
3704
|
+
this.signupFormIntroduction = page.locator(".sw-text-editor__content-editor");
|
|
3705
|
+
this.signupFormSeoDescription = page.locator("#sw-field--customerGroup-registrationSeoMetaDescription");
|
|
3706
|
+
this.signupFormCompanySignupToggle = page.getByLabel("Company signup form");
|
|
3707
|
+
this.customerGroupSaleschannelSelection = page.locator("input[class=sw-select-selection-list__input]");
|
|
3708
|
+
this.customerGroupSaleschannelResultList = page.locator(".sw-select-result-list__content");
|
|
3709
|
+
}
|
|
3710
|
+
url() {
|
|
3711
|
+
return "#/sw/settings/customer/group/create";
|
|
3712
|
+
}
|
|
3713
|
+
}
|
|
3714
|
+
|
|
3715
|
+
var __defProp$k = Object.defineProperty;
|
|
3716
|
+
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3717
|
+
var __publicField$k = (obj, key, value) => {
|
|
3718
|
+
__defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3719
|
+
return value;
|
|
3720
|
+
};
|
|
3721
|
+
class CustomerGroupDetail extends CustomerGroupCreate {
|
|
3722
|
+
constructor(page) {
|
|
3723
|
+
super(page);
|
|
3724
|
+
this.page = page;
|
|
3725
|
+
__publicField$k(this, "headline");
|
|
3726
|
+
__publicField$k(this, "selectedSalesChannel");
|
|
3727
|
+
__publicField$k(this, "technicalUrl");
|
|
3728
|
+
__publicField$k(this, "saleschannelUrl");
|
|
3729
|
+
this.headline = page.locator(".smart-bar__header");
|
|
3730
|
+
this.selectedSalesChannel = page.locator(".sw-select-selection-list");
|
|
3731
|
+
this.technicalUrl = page.getByLabel("Technical URL");
|
|
3732
|
+
this.saleschannelUrl = page.getByLabel(/.*URL/).last();
|
|
3733
|
+
}
|
|
3734
|
+
url(customerGroupId) {
|
|
3735
|
+
return `#/sw/settings/customer/group/detail/${customerGroupId}`;
|
|
3736
|
+
}
|
|
3737
|
+
}
|
|
3738
|
+
|
|
3473
3739
|
var __defProp$j = Object.defineProperty;
|
|
3474
3740
|
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3475
3741
|
var __publicField$j = (obj, key, value) => {
|
|
@@ -3881,6 +4147,7 @@ class Categories {
|
|
|
3881
4147
|
__publicField$a(this, "categoryMenuItemList");
|
|
3882
4148
|
__publicField$a(this, "createCategoryInput");
|
|
3883
4149
|
__publicField$a(this, "confirmCategoryCreationButton");
|
|
4150
|
+
__publicField$a(this, "confirmCategoryCancelButton");
|
|
3884
4151
|
__publicField$a(this, "categoryItems");
|
|
3885
4152
|
/**
|
|
3886
4153
|
* General
|
|
@@ -3891,6 +4158,7 @@ class Categories {
|
|
|
3891
4158
|
__publicField$a(this, "filtersResultPopoverItemList");
|
|
3892
4159
|
__publicField$a(this, "saveButton");
|
|
3893
4160
|
__publicField$a(this, "loadingSpinner");
|
|
4161
|
+
__publicField$a(this, "fadingBar");
|
|
3894
4162
|
/**
|
|
3895
4163
|
* Customisable link
|
|
3896
4164
|
*/
|
|
@@ -3912,7 +4180,8 @@ class Categories {
|
|
|
3912
4180
|
this.categoryMenuItemList = page.locator(".sw-context-button__menu-popover").locator(".sw-context-menu-item");
|
|
3913
4181
|
this.createCategoryInput = page.getByPlaceholder("Create category").getByRole("textbox");
|
|
3914
4182
|
this.confirmCategoryCreationButton = page.locator(".sw-confirm-field").locator(".sw-button--primary");
|
|
3915
|
-
this.categoryItems = this.categoryTree.locator(".
|
|
4183
|
+
this.categoryItems = this.categoryTree.locator(".tree-link");
|
|
4184
|
+
this.confirmCategoryCancelButton = page.locator(".sw-confirm-field").locator(".sw-confirm-field__button--cancel");
|
|
3916
4185
|
this.nameInput = page.getByLabel("Name");
|
|
3917
4186
|
this.activeCheckbox = page.getByRole("checkbox", { name: "Active" });
|
|
3918
4187
|
this.saveButton = page.getByRole("button", { name: "Save" });
|
|
@@ -3927,6 +4196,7 @@ class Categories {
|
|
|
3927
4196
|
this.filterResultPopoverTreeCheckboxItemList = this.popoverCategoryTree.locator(".sw-tree__content").locator(".sw-tree-item");
|
|
3928
4197
|
this.openInNewTabCheckbox = page.getByRole("checkbox", { name: "Open in new tab" });
|
|
3929
4198
|
this.loadingSpinner = page.locator(".sw-loader");
|
|
4199
|
+
this.fadingBar = page.locator(".fade-leave-active");
|
|
3930
4200
|
}
|
|
3931
4201
|
async getLandingPageByName(landingPageName) {
|
|
3932
4202
|
return this.landingPageItems.locator(`text="${landingPageName}"`);
|
|
@@ -4266,7 +4536,11 @@ class ManufacturerDetail extends ManufacturerCreate {
|
|
|
4266
4536
|
const AdminPageObjects = {
|
|
4267
4537
|
ProductDetail,
|
|
4268
4538
|
OrderDetail,
|
|
4539
|
+
CustomerListing,
|
|
4269
4540
|
CustomerDetail,
|
|
4541
|
+
CustomerGroupListing,
|
|
4542
|
+
CustomerGroupCreate,
|
|
4543
|
+
CustomerGroupDetail,
|
|
4270
4544
|
FirstRunWizard,
|
|
4271
4545
|
FlowBuilderCreate,
|
|
4272
4546
|
FlowBuilderListing,
|
|
@@ -4294,9 +4568,21 @@ const test$5 = test$e.extend({
|
|
|
4294
4568
|
AdminOrderDetail: async ({ AdminPage }, use) => {
|
|
4295
4569
|
await use(new OrderDetail(AdminPage));
|
|
4296
4570
|
},
|
|
4571
|
+
AdminCustomerListing: async ({ AdminPage }, use) => {
|
|
4572
|
+
await use(new CustomerListing(AdminPage));
|
|
4573
|
+
},
|
|
4297
4574
|
AdminCustomerDetail: async ({ AdminPage }, use) => {
|
|
4298
4575
|
await use(new CustomerDetail(AdminPage));
|
|
4299
4576
|
},
|
|
4577
|
+
AdminCustomerGroupListing: async ({ AdminPage }, use) => {
|
|
4578
|
+
await use(new CustomerGroupListing(AdminPage));
|
|
4579
|
+
},
|
|
4580
|
+
AdminCustomerGroupCreate: async ({ AdminPage }, use) => {
|
|
4581
|
+
await use(new CustomerGroupCreate(AdminPage));
|
|
4582
|
+
},
|
|
4583
|
+
AdminCustomerGroupDetail: async ({ AdminPage }, use) => {
|
|
4584
|
+
await use(new CustomerGroupDetail(AdminPage));
|
|
4585
|
+
},
|
|
4300
4586
|
AdminFirstRunWizard: async ({ AdminPage }, use) => {
|
|
4301
4587
|
await use(new FirstRunWizard(AdminPage));
|
|
4302
4588
|
},
|
|
@@ -4934,9 +5220,59 @@ const ExpectNotification = test$e.extend({
|
|
|
4934
5220
|
}
|
|
4935
5221
|
});
|
|
4936
5222
|
|
|
5223
|
+
const CreateLinkTypeCategory = test$e.extend({
|
|
5224
|
+
CreateLinkTypeCategory: async ({ AdminCategories, AdminCategoryDetail, TestDataService }, use) => {
|
|
5225
|
+
const task = (categoryData, categoryCustomizableLinkData) => {
|
|
5226
|
+
return async function CreateLinkTypeCategory2() {
|
|
5227
|
+
await AdminCategories.homeCategoryContextButton.click();
|
|
5228
|
+
await AdminCategories.categoryMenuItemList.filter({ hasText: "New category after" }).click();
|
|
5229
|
+
await AdminCategories.createCategoryInput.fill(categoryData.name);
|
|
5230
|
+
await AdminCategories.confirmCategoryCreationButton.click();
|
|
5231
|
+
await AdminCategories.fadingBar.first().waitFor({ state: "hidden" });
|
|
5232
|
+
await AdminCategories.confirmCategoryCancelButton.click();
|
|
5233
|
+
await AdminCategories.categoryItems.filter({ hasText: categoryData.name }).click();
|
|
5234
|
+
await AdminCategories.nameInput.fill(categoryData.name);
|
|
5235
|
+
await AdminCategories.activeCheckbox.setChecked(categoryData.status);
|
|
5236
|
+
await AdminCategories.categoryTypeSelectionList.click();
|
|
5237
|
+
await AdminCategories.filtersResultPopoverItemList.filter({ hasText: categoryData.categoryType }).click();
|
|
5238
|
+
await AdminCategories.linkTypeSelectionList.click();
|
|
5239
|
+
await AdminCategories.filtersResultPopoverItemList.filter({ hasText: categoryCustomizableLinkData.linkType }).click();
|
|
5240
|
+
await AdminCategories.entitySelectionList.click();
|
|
5241
|
+
await AdminCategories.filtersResultPopoverItemList.filter({ hasText: categoryCustomizableLinkData.entity }).click();
|
|
5242
|
+
let locator;
|
|
5243
|
+
switch (categoryCustomizableLinkData.entity) {
|
|
5244
|
+
case "Category":
|
|
5245
|
+
await AdminCategories.categorySelectionList.click();
|
|
5246
|
+
locator = await AdminCategories.getPopOverCategoryByName(categoryCustomizableLinkData.category);
|
|
5247
|
+
await locator.getByRole("checkbox").click();
|
|
5248
|
+
break;
|
|
5249
|
+
case "Product":
|
|
5250
|
+
await AdminCategories.productSelectionList.click();
|
|
5251
|
+
await AdminCategories.filtersResultPopoverItemList.filter({ hasText: categoryCustomizableLinkData.product }).click();
|
|
5252
|
+
break;
|
|
5253
|
+
case "Landing page":
|
|
5254
|
+
await AdminCategories.landingPageSelectionList.click();
|
|
5255
|
+
await AdminCategories.filtersResultPopoverItemList.filter({ hasText: categoryCustomizableLinkData.landingPage }).click();
|
|
5256
|
+
break;
|
|
5257
|
+
default:
|
|
5258
|
+
throw new Error("Entity type not found");
|
|
5259
|
+
}
|
|
5260
|
+
await AdminCategories.openInNewTabCheckbox.setChecked(categoryCustomizableLinkData.openInNewTab);
|
|
5261
|
+
await AdminCategories.saveButton.click();
|
|
5262
|
+
await AdminCategories.loadingSpinner.waitFor({ state: "hidden" });
|
|
5263
|
+
const url = AdminCategoryDetail.page.url();
|
|
5264
|
+
const categoryId = url.split("/")[url.split("/").length - 2];
|
|
5265
|
+
TestDataService.addCreatedRecord("category", categoryId);
|
|
5266
|
+
};
|
|
5267
|
+
};
|
|
5268
|
+
await use(task);
|
|
5269
|
+
}
|
|
5270
|
+
});
|
|
5271
|
+
|
|
4937
5272
|
const test$3 = mergeTests(
|
|
4938
5273
|
SaveProduct,
|
|
4939
|
-
ExpectNotification
|
|
5274
|
+
ExpectNotification,
|
|
5275
|
+
CreateLinkTypeCategory
|
|
4940
5276
|
);
|
|
4941
5277
|
|
|
4942
5278
|
const Login = test$e.extend({
|
|
@@ -4979,9 +5315,12 @@ const Register = test$e.extend({
|
|
|
4979
5315
|
street: "Ebbinghof 10",
|
|
4980
5316
|
city: "Sch\xF6ppingen",
|
|
4981
5317
|
country: "Germany",
|
|
4982
|
-
postalCode: "48624"
|
|
5318
|
+
postalCode: "48624",
|
|
5319
|
+
company: "shopware",
|
|
5320
|
+
department: "Operations",
|
|
5321
|
+
vatRegNo: "DE1234567890"
|
|
4983
5322
|
};
|
|
4984
|
-
const task = (email) => {
|
|
5323
|
+
const task = (email, isCommercial) => {
|
|
4985
5324
|
return async function Register2() {
|
|
4986
5325
|
registrationData.email = email;
|
|
4987
5326
|
await StorefrontAccountLogin.firstNameInput.fill(registrationData.firstName);
|
|
@@ -4992,6 +5331,11 @@ const Register = test$e.extend({
|
|
|
4992
5331
|
await StorefrontAccountLogin.cityInput.fill(registrationData.city);
|
|
4993
5332
|
await StorefrontAccountLogin.countryInput.selectOption(registrationData.country);
|
|
4994
5333
|
await StorefrontAccountLogin.postalCodeInput.fill(registrationData.postalCode);
|
|
5334
|
+
if (isCommercial) {
|
|
5335
|
+
await StorefrontAccountLogin.companyInput.fill(registrationData.company);
|
|
5336
|
+
await StorefrontAccountLogin.departmentInput.fill(registrationData.department);
|
|
5337
|
+
await StorefrontAccountLogin.vatRegNoInput.fill(registrationData.vatRegNo);
|
|
5338
|
+
}
|
|
4995
5339
|
await StorefrontAccountLogin.registerButton.click();
|
|
4996
5340
|
};
|
|
4997
5341
|
};
|