@shopware-ag/acceptance-test-suite 5.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -385,16 +385,16 @@ const test$c = test$e.extend({
385
385
  ]
386
386
  });
387
387
 
388
- var __defProp$A = Object.defineProperty;
389
- var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
390
- var __publicField$A = (obj, key, value) => {
391
- __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
388
+ var __defProp$F = Object.defineProperty;
389
+ var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
390
+ var __publicField$F = (obj, key, value) => {
391
+ __defNormalProp$F(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$A(this, "context");
397
- __publicField$A(this, "options");
396
+ __publicField$F(this, "context");
397
+ __publicField$F(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$A(_AdminApiContext, "defaultOptions", {
489
+ __publicField$F(_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$A(_AdminApiContext, "defaultOptions", {
496
496
  });
497
497
  let AdminApiContext = _AdminApiContext;
498
498
 
499
- var __defProp$z = Object.defineProperty;
500
- var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
501
- var __publicField$z = (obj, key, value) => {
502
- __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
499
+ var __defProp$E = Object.defineProperty;
500
+ var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
501
+ var __publicField$E = (obj, key, value) => {
502
+ __defNormalProp$E(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$z(this, "context");
508
- __publicField$z(this, "options");
507
+ __publicField$E(this, "context");
508
+ __publicField$E(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$z(_StoreApiContext, "defaultOptions", {
567
+ __publicField$E(_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$y = Object.defineProperty;
574
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
575
- var __publicField$y = (obj, key, value) => {
576
- __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
573
+ var __defProp$D = Object.defineProperty;
574
+ var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
575
+ var __publicField$D = (obj, key, value) => {
576
+ __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
577
577
  return value;
578
578
  };
579
579
  class MailpitApiContext {
580
580
  constructor(context) {
581
- __publicField$y(this, "context");
581
+ __publicField$D(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$x = Object.defineProperty;
879
- var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
880
- var __publicField$x = (obj, key, value) => {
881
- __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
878
+ var __defProp$C = Object.defineProperty;
879
+ var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
880
+ var __publicField$C = (obj, key, value) => {
881
+ __defNormalProp$C(obj, typeof key !== "symbol" ? key + "" : key, value);
882
882
  return value;
883
883
  };
884
884
  class Actor {
885
885
  constructor(name, page) {
886
- __publicField$x(this, "page");
887
- __publicField$x(this, "name");
888
- __publicField$x(this, "expects", expect);
886
+ __publicField$C(this, "page");
887
+ __publicField$C(this, "name");
888
+ __publicField$C(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$w = Object.defineProperty;
938
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
939
- var __publicField$w = (obj, key, value) => {
940
- __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
937
+ var __defProp$B = Object.defineProperty;
938
+ var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
939
+ var __publicField$B = (obj, key, value) => {
940
+ __defNormalProp$B(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$w(this, "AdminApiClient");
946
- __publicField$w(this, "IdProvider");
947
- __publicField$w(this, "namePrefix", "Test-");
948
- __publicField$w(this, "nameSuffix", "");
949
- __publicField$w(this, "defaultSalesChannel");
950
- __publicField$w(this, "defaultTaxId");
951
- __publicField$w(this, "defaultCurrencyId");
952
- __publicField$w(this, "defaultCategoryId");
953
- __publicField$w(this, "defaultLanguageId");
954
- __publicField$w(this, "defaultCountryId");
955
- __publicField$w(this, "defaultCustomerGroupId");
945
+ __publicField$B(this, "AdminApiClient");
946
+ __publicField$B(this, "IdProvider");
947
+ __publicField$B(this, "namePrefix", "Test-");
948
+ __publicField$B(this, "nameSuffix", "");
949
+ __publicField$B(this, "defaultSalesChannel");
950
+ __publicField$B(this, "defaultTaxId");
951
+ __publicField$B(this, "defaultCurrencyId");
952
+ __publicField$B(this, "defaultCategoryId");
953
+ __publicField$B(this, "defaultLanguageId");
954
+ __publicField$B(this, "defaultCountryId");
955
+ __publicField$B(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$w(this, "shouldCleanUp", true);
961
+ __publicField$B(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$w(this, "highPriorityEntities", ["order", "product"]);
969
+ __publicField$B(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$w(this, "createdRecords", []);
975
+ __publicField$B(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$w(this, "combineAll", (array) => {
981
+ __publicField$B(this, "combineAll", (array) => {
982
982
  const result = [];
983
983
  const max = array.length - 1;
984
984
  const helper = (tmpArray, i) => {
@@ -1080,6 +1080,51 @@ class TestDataService {
1080
1080
  const productOverrides = Object.assign({}, priceRange, overrides);
1081
1081
  return this.createBasicProduct(productOverrides, taxId, currencyId);
1082
1082
  }
1083
+ /**
1084
+ * Creates basic variant products based on property group.
1085
+ *
1086
+ * @param parentProduct Parent product of the variants
1087
+ * @param propertyGroups Property group collection which contain options
1088
+ * @param overrides - Specific data overrides that will be applied to the variant data struct.
1089
+ */
1090
+ async createVariantProducts(parentProduct, propertyGroups, overrides = {}) {
1091
+ const productVariantCandidates = [];
1092
+ for (const propertyGroup of propertyGroups) {
1093
+ const propertyGroupOptions = await this.getPropertyGroupOptions(propertyGroup.id);
1094
+ const propertyGroupOptionsCollection = [];
1095
+ for (const propertyGroupOption of propertyGroupOptions) {
1096
+ propertyGroupOptionsCollection.push({ id: propertyGroupOption.id });
1097
+ const productConfiguratorResponse = await this.AdminApiClient.post("product-configurator-setting?_response=detail", {
1098
+ data: {
1099
+ id: this.IdProvider.getIdPair().uuid,
1100
+ productId: parentProduct.id,
1101
+ optionId: propertyGroupOption.id
1102
+ }
1103
+ });
1104
+ expect(productConfiguratorResponse.ok()).toBeTruthy();
1105
+ }
1106
+ productVariantCandidates.push(propertyGroupOptionsCollection);
1107
+ }
1108
+ const productVariantCombinations = this.combineAll(productVariantCandidates);
1109
+ const variantProducts = [];
1110
+ let index = 1;
1111
+ for (const productVariantCombination of productVariantCombinations) {
1112
+ const variantOverrides = {
1113
+ parentId: parentProduct.id,
1114
+ productNumber: parentProduct.productNumber + "." + index,
1115
+ options: productVariantCombination
1116
+ };
1117
+ const overrideCollection = Object.assign({}, overrides, variantOverrides);
1118
+ variantProducts.push(await this.createBasicProduct(overrideCollection));
1119
+ index++;
1120
+ }
1121
+ await this.AdminApiClient.post("_action/indexing/product.indexer?_response=detail", {
1122
+ data: {
1123
+ offset: 0
1124
+ }
1125
+ });
1126
+ return variantProducts;
1127
+ }
1083
1128
  /**
1084
1129
  * Creates a basic manufacturer without images or other special configuration.
1085
1130
  *
@@ -1355,37 +1400,6 @@ class TestDataService {
1355
1400
  this.addCreatedRecord("payment_method", paymentMethod.id);
1356
1401
  return paymentMethod;
1357
1402
  }
1358
- /**
1359
- * Creates a new basic rule with the condition cart amount >= 1.
1360
- *
1361
- * @param overrides - Specific data overrides that will be applied to the payment method data struct.
1362
- */
1363
- async createBasicRule(overrides = {}, conditionType = "cartCartAmount", operator = ">=", amount = 1) {
1364
- const basicRule = this.getBasicRuleStruct(overrides, conditionType, operator, amount);
1365
- const ruleResponse = await this.AdminApiClient.post("rule?_response=detail", {
1366
- data: basicRule
1367
- });
1368
- expect(ruleResponse.ok()).toBeTruthy();
1369
- const { data: rule } = await ruleResponse.json();
1370
- this.addCreatedRecord("rule", rule.id);
1371
- return rule;
1372
- }
1373
- /**
1374
- * Creates a new basic page layout.
1375
- *
1376
- * @param cmsPageType - The type of the cms page layout (page/landingpage/product_detail/product_list).
1377
- * @param overrides - Specific data overrides that will be applied to the cms page layout data struct.
1378
- */
1379
- async createBasicPageLayout(cmsPageType, overrides = {}) {
1380
- const basicLayout = this.getBasicCmsStruct(cmsPageType, overrides);
1381
- const layoutResponse = await this.AdminApiClient.post("cms-page?_response=detail", {
1382
- data: basicLayout
1383
- });
1384
- expect(layoutResponse.ok()).toBeTruthy();
1385
- const { data: layout } = await layoutResponse.json();
1386
- this.addCreatedRecord("cms_page", layout.id);
1387
- return layout;
1388
- }
1389
1403
  /**
1390
1404
  * Creates a payment method with one randomly generated image.
1391
1405
  *
@@ -1398,49 +1412,24 @@ class TestDataService {
1398
1412
  return paymentMethod;
1399
1413
  }
1400
1414
  /**
1401
- * Creates basic variant products based on property group.
1415
+ * Creates a new basic shipping method with random delivery time.
1402
1416
  *
1403
- * @param parentProduct Parent product of the variants
1404
- * @param propertyGroups Property group collection which contain options
1405
- * @param overrides - Specific data overrides that will be applied to the variant data struct.
1417
+ * @param overrides - Specific data overrides that will be applied to the shipping method data struct.
1406
1418
  */
1407
- async createVariantProducts(parentProduct, propertyGroups, overrides = {}) {
1408
- const productVariantCandidates = [];
1409
- for (const propertyGroup of propertyGroups) {
1410
- const propertyGroupOptions = await this.getPropertyGroupOptions(propertyGroup.id);
1411
- const propertyGroupOptionsCollection = [];
1412
- for (const propertyGroupOption of propertyGroupOptions) {
1413
- propertyGroupOptionsCollection.push({ id: propertyGroupOption.id });
1414
- const productConfiguratorResponse = await this.AdminApiClient.post("product-configurator-setting?_response=detail", {
1415
- data: {
1416
- id: this.IdProvider.getIdPair().uuid,
1417
- productId: parentProduct.id,
1418
- optionId: propertyGroupOption.id
1419
- }
1420
- });
1421
- expect(productConfiguratorResponse.ok()).toBeTruthy();
1422
- }
1423
- productVariantCandidates.push(propertyGroupOptionsCollection);
1424
- }
1425
- const productVariantCombinations = this.combineAll(productVariantCandidates);
1426
- const variantProducts = [];
1427
- let index = 1;
1428
- for (const productVariantCombination of productVariantCombinations) {
1429
- const variantOverrides = {
1430
- parentId: parentProduct.id,
1431
- productNumber: parentProduct.productNumber + "." + index,
1432
- options: productVariantCombination
1433
- };
1434
- const overrideCollection = Object.assign({}, overrides, variantOverrides);
1435
- variantProducts.push(await this.createBasicProduct(overrideCollection));
1436
- index++;
1437
- }
1438
- await this.AdminApiClient.post("_action/indexing/product.indexer?_response=detail", {
1439
- data: {
1440
- offset: 0
1441
- }
1419
+ async createBasicShippingMethod(overrides = {}) {
1420
+ const deliveryTime = await this.getAllDeliveryTimeResources();
1421
+ overrides.availabilityRuleId ?? (overrides.availabilityRuleId = (await this.getRule("Always valid (Default)")).id);
1422
+ const basicShippingMethod = this.getBasicShippingMethodStruct(
1423
+ deliveryTime[0].id,
1424
+ overrides
1425
+ );
1426
+ const shippingMethodResponse = await this.AdminApiClient.post("shipping-method?_response=detail", {
1427
+ data: basicShippingMethod
1442
1428
  });
1443
- return variantProducts;
1429
+ expect(shippingMethodResponse.ok()).toBeTruthy();
1430
+ const { data: shippingMethod } = await shippingMethodResponse.json();
1431
+ this.addCreatedRecord("shipping_method", shippingMethod.id);
1432
+ return shippingMethod;
1444
1433
  }
1445
1434
  /**
1446
1435
  * Creates a shipping method with one randomly generated image.
@@ -1454,40 +1443,35 @@ class TestDataService {
1454
1443
  return shippingMethod;
1455
1444
  }
1456
1445
  /**
1457
- * Creates a new basic shipping method with random delivery time.
1446
+ * Creates a new basic rule with the condition cart amount >= 1.
1458
1447
  *
1459
- * @param overrides - Specific data overrides that will be applied to the shipping method data struct.
1448
+ * @param overrides - Specific data overrides that will be applied to the payment method data struct.
1460
1449
  */
1461
- async createBasicShippingMethod(overrides = {}) {
1462
- const deliveryTime = await this.getAllDeliveryTimeResources();
1463
- overrides.availabilityRuleId ?? (overrides.availabilityRuleId = (await this.getRule("Always valid (Default)")).id);
1464
- const basicShippingMethod = this.getBasicShippingMethodStruct(
1465
- deliveryTime[0].id,
1466
- overrides
1467
- );
1468
- const shippingMethodResponse = await this.AdminApiClient.post("shipping-method?_response=detail", {
1469
- data: basicShippingMethod
1450
+ async createBasicRule(overrides = {}, conditionType = "cartCartAmount", operator = ">=", amount = 1) {
1451
+ const basicRule = this.getBasicRuleStruct(overrides, conditionType, operator, amount);
1452
+ const ruleResponse = await this.AdminApiClient.post("rule?_response=detail", {
1453
+ data: basicRule
1470
1454
  });
1471
- expect(shippingMethodResponse.ok()).toBeTruthy();
1472
- const { data: shippingMethod } = await shippingMethodResponse.json();
1473
- this.addCreatedRecord("shipping_method", shippingMethod.id);
1474
- return shippingMethod;
1455
+ expect(ruleResponse.ok()).toBeTruthy();
1456
+ const { data: rule } = await ruleResponse.json();
1457
+ this.addCreatedRecord("rule", rule.id);
1458
+ return rule;
1475
1459
  }
1476
1460
  /**
1477
- * Assigns a media resource to a payment method as a logo.
1461
+ * Creates a new basic page layout.
1478
1462
  *
1479
- * @param paymentMethodId - The uuid of the payment method.
1480
- * @param mediaId - The uuid of the media resource.
1463
+ * @param cmsPageType - The type of the cms page layout (page/landingpage/product_detail/product_list).
1464
+ * @param overrides - Specific data overrides that will be applied to the cms page layout data struct.
1481
1465
  */
1482
- async assignPaymentMethodMedia(paymentMethodId, mediaId) {
1483
- const paymentMethodResponse = await this.AdminApiClient.patch(`payment-method/${paymentMethodId}?_response=basic`, {
1484
- data: {
1485
- mediaId
1486
- }
1466
+ async createBasicPageLayout(cmsPageType, overrides = {}) {
1467
+ const basicLayout = this.getBasicCmsStruct(cmsPageType, overrides);
1468
+ const layoutResponse = await this.AdminApiClient.post("cms-page?_response=detail", {
1469
+ data: basicLayout
1487
1470
  });
1488
- expect(paymentMethodResponse.ok()).toBeTruthy();
1489
- const { data: paymentMethodMedia } = await paymentMethodResponse.json();
1490
- return paymentMethodMedia;
1471
+ expect(layoutResponse.ok()).toBeTruthy();
1472
+ const { data: layout } = await layoutResponse.json();
1473
+ this.addCreatedRecord("cms_page", layout.id);
1474
+ return layout;
1491
1475
  }
1492
1476
  /**
1493
1477
  * Assigns a media resource as the download of a digital product.
@@ -1531,29 +1515,13 @@ class TestDataService {
1531
1515
  const { data: productMedia } = await mediaResponse.json();
1532
1516
  return productMedia;
1533
1517
  }
1534
- /**
1535
- * Assigns a media resource to a manufacturer as a logo.
1536
- *
1537
- * @param manufacturerId - The uuid of the manufacturer.
1538
- * @param mediaId - The uuid of the media resource.
1539
- */
1540
- async assignManufacturerMedia(manufacturerId, mediaId) {
1541
- const mediaResponse = await this.AdminApiClient.patch(`product-manufacturer/${manufacturerId}?_response=basic`, {
1542
- data: {
1543
- mediaId
1544
- }
1545
- });
1546
- expect(mediaResponse.ok()).toBeTruthy();
1547
- const { data: manufacturerMedia } = await mediaResponse.json();
1548
- return manufacturerMedia;
1549
- }
1550
1518
  /**
1551
1519
  * Assigns a manufacturer to a product.
1552
1520
  *
1553
- * @param manufacturerId - The uuid of the manufacturer.
1554
1521
  * @param productId - The uuid of the product.
1522
+ * @param manufacturerId - The uuid of the manufacturer.
1555
1523
  */
1556
- async assignManufacturerProduct(manufacturerId, productId) {
1524
+ async assignProductManufacturer(productId, manufacturerId) {
1557
1525
  await this.AdminApiClient.patch(`product/${productId}?_response=basic`, {
1558
1526
  data: {
1559
1527
  manufacturerId
@@ -1591,52 +1559,91 @@ class TestDataService {
1591
1559
  });
1592
1560
  }
1593
1561
  /**
1594
- * Retrieves a currency based on its ISO code.
1562
+ * Assigns a media resource to a manufacturer as a logo.
1595
1563
  *
1596
- * @param isoCode - The ISO code of the currency, for example "EUR".
1564
+ * @param manufacturerId - The uuid of the manufacturer.
1565
+ * @param mediaId - The uuid of the media resource.
1597
1566
  */
1598
- async getCurrency(isoCode) {
1599
- const currencyResponse = await this.AdminApiClient.post("search/currency", {
1567
+ async assignManufacturerMedia(manufacturerId, mediaId) {
1568
+ const mediaResponse = await this.AdminApiClient.patch(`product-manufacturer/${manufacturerId}?_response=basic`, {
1600
1569
  data: {
1601
- limit: 1,
1602
- filter: [{
1603
- type: "equals",
1604
- field: "isoCode",
1605
- value: isoCode
1606
- }]
1570
+ mediaId
1607
1571
  }
1608
1572
  });
1609
- expect(currencyResponse.ok()).toBeTruthy();
1610
- const { data: result } = await currencyResponse.json();
1611
- return result[0];
1573
+ expect(mediaResponse.ok()).toBeTruthy();
1574
+ const { data: manufacturerMedia } = await mediaResponse.json();
1575
+ return manufacturerMedia;
1612
1576
  }
1613
1577
  /**
1614
- * Retrieves a rule based on its name.
1578
+ * Assigns a manufacturer to a product.
1615
1579
  *
1616
- * @param name - The name of the rule.
1580
+ * @deprecated - Use `assignProductManufacturer` instead.
1581
+ *
1582
+ * @param manufacturerId - The uuid of the manufacturer.
1583
+ * @param productId - The uuid of the product.
1617
1584
  */
1618
- async getRule(name) {
1619
- const response = await this.AdminApiClient.post("search/rule", {
1620
- data: {
1621
- limit: 1,
1622
- filter: [{
1623
- type: "equals",
1624
- field: "name",
1625
- value: name
1626
- }]
1627
- }
1628
- });
1629
- expect(response.ok()).toBeTruthy();
1630
- const { data: result } = await response.json();
1585
+ async assignManufacturerProduct(manufacturerId, productId) {
1586
+ await this.assignProductManufacturer(productId, manufacturerId);
1587
+ }
1588
+ /**
1589
+ * Assigns a media resource to a payment method as a logo.
1590
+ *
1591
+ * @param paymentMethodId - The uuid of the payment method.
1592
+ * @param mediaId - The uuid of the media resource.
1593
+ */
1594
+ async assignPaymentMethodMedia(paymentMethodId, mediaId) {
1595
+ const paymentMethodResponse = await this.AdminApiClient.patch(`payment-method/${paymentMethodId}?_response=basic`, {
1596
+ data: {
1597
+ mediaId
1598
+ }
1599
+ });
1600
+ expect(paymentMethodResponse.ok()).toBeTruthy();
1601
+ const { data: paymentMethodMedia } = await paymentMethodResponse.json();
1602
+ return paymentMethodMedia;
1603
+ }
1604
+ /**
1605
+ * Assigns a media resource to a shipping method as a logo.
1606
+ *
1607
+ * @param shippingMethodId - The uuid of the shipping method.
1608
+ * @param mediaId - The uuid of the media resource.
1609
+ */
1610
+ async assignShippingMethodMedia(shippingMethodId, mediaId) {
1611
+ const shippingMethodResponse = await this.AdminApiClient.patch(`shipping-method/${shippingMethodId}?_response=basic`, {
1612
+ data: {
1613
+ mediaId
1614
+ }
1615
+ });
1616
+ expect(shippingMethodResponse.ok()).toBeTruthy();
1617
+ const { data: shippingMethodMedia } = await shippingMethodResponse.json();
1618
+ return shippingMethodMedia;
1619
+ }
1620
+ /**
1621
+ * Retrieves a currency based on its ISO code.
1622
+ *
1623
+ * @param isoCode - The ISO code of the currency, for example "EUR".
1624
+ */
1625
+ async getCurrency(isoCode) {
1626
+ const currencyResponse = await this.AdminApiClient.post("search/currency", {
1627
+ data: {
1628
+ limit: 1,
1629
+ filter: [{
1630
+ type: "equals",
1631
+ field: "isoCode",
1632
+ value: isoCode
1633
+ }]
1634
+ }
1635
+ });
1636
+ expect(currencyResponse.ok()).toBeTruthy();
1637
+ const { data: result } = await currencyResponse.json();
1631
1638
  return result[0];
1632
1639
  }
1633
1640
  /**
1634
- * Retrieves a shipping method by its name.
1641
+ * Retrieves a rule based on its name.
1635
1642
  *
1636
- * @param name - The name of the shipping method. Default is "Standard".
1643
+ * @param name - The name of the rule.
1637
1644
  */
1638
- async getShippingMethod(name = "Standard") {
1639
- const response = await this.AdminApiClient.post("search/shipping-method", {
1645
+ async getRule(name) {
1646
+ const response = await this.AdminApiClient.post("search/rule", {
1640
1647
  data: {
1641
1648
  limit: 1,
1642
1649
  filter: [{
@@ -1651,20 +1658,24 @@ class TestDataService {
1651
1658
  return result[0];
1652
1659
  }
1653
1660
  /**
1654
- * Assigns a media resource to a shipping method as a logo.
1661
+ * Retrieves a shipping method by its name.
1655
1662
  *
1656
- * @param shippingMethodId - The uuid of the shipping method.
1657
- * @param mediaId - The uuid of the media resource.
1663
+ * @param name - The name of the shipping method. Default is "Standard".
1658
1664
  */
1659
- async assignShippingMethodMedia(shippingMethodId, mediaId) {
1660
- const shippingMethodResponse = await this.AdminApiClient.patch(`shipping-method/${shippingMethodId}?_response=basic`, {
1665
+ async getShippingMethod(name = "Standard") {
1666
+ const response = await this.AdminApiClient.post("search/shipping-method", {
1661
1667
  data: {
1662
- mediaId
1668
+ limit: 1,
1669
+ filter: [{
1670
+ type: "equals",
1671
+ field: "name",
1672
+ value: name
1673
+ }]
1663
1674
  }
1664
1675
  });
1665
- expect(shippingMethodResponse.ok()).toBeTruthy();
1666
- const { data: shippingMethodMedia } = await shippingMethodResponse.json();
1667
- return shippingMethodMedia;
1676
+ expect(response.ok()).toBeTruthy();
1677
+ const { data: result } = await response.json();
1678
+ return result[0];
1668
1679
  }
1669
1680
  /**
1670
1681
  * Retrieves all delivery time resources.
@@ -1873,6 +1884,12 @@ class TestDataService {
1873
1884
  data: deleteOperations
1874
1885
  });
1875
1886
  }
1887
+ isProduct(item) {
1888
+ return item.productNumber !== void 0;
1889
+ }
1890
+ isPromotion(item) {
1891
+ return item.code !== void 0;
1892
+ }
1876
1893
  /**
1877
1894
  * Convert a JS date object into a date-time compatible string.
1878
1895
  *
@@ -2139,12 +2156,6 @@ class TestDataService {
2139
2156
  };
2140
2157
  return Object.assign({}, basicShippingMethod, overrides);
2141
2158
  }
2142
- isProduct(item) {
2143
- return item.productNumber !== void 0;
2144
- }
2145
- isPromotion(item) {
2146
- return item.code !== void 0;
2147
- }
2148
2159
  getBasicOrderStruct(lineItems, languageId, currency, paymentMethod, shippingMethod, orderState, deliveryState, transactionState, customer, customerAddress, salesChannelId = this.defaultSalesChannel.id, overrides = {}) {
2149
2160
  const date = /* @__PURE__ */ new Date();
2150
2161
  const orderDateTime = this.convertDateTime(date);
@@ -2430,16 +2441,16 @@ const test$8 = test$e.extend({
2430
2441
  }
2431
2442
  });
2432
2443
 
2433
- var __defProp$v = Object.defineProperty;
2434
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2435
- var __publicField$v = (obj, key, value) => {
2436
- __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
2444
+ var __defProp$A = Object.defineProperty;
2445
+ var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2446
+ var __publicField$A = (obj, key, value) => {
2447
+ __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
2437
2448
  return value;
2438
2449
  };
2439
2450
  class IdProvider {
2440
2451
  constructor(workerIndex, seed) {
2441
- __publicField$v(this, "workerIndex");
2442
- __publicField$v(this, "seed");
2452
+ __publicField$A(this, "workerIndex");
2453
+ __publicField$A(this, "seed");
2443
2454
  this.workerIndex = workerIndex;
2444
2455
  this.seed = seed;
2445
2456
  }
@@ -2513,17 +2524,17 @@ const test$7 = test$e.extend({
2513
2524
  ]
2514
2525
  });
2515
2526
 
2516
- var __defProp$u = Object.defineProperty;
2517
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2518
- var __publicField$u = (obj, key, value) => {
2519
- __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
2527
+ var __defProp$z = Object.defineProperty;
2528
+ var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2529
+ var __publicField$z = (obj, key, value) => {
2530
+ __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
2520
2531
  return value;
2521
2532
  };
2522
2533
  class Home {
2523
2534
  constructor(page) {
2524
2535
  this.page = page;
2525
- __publicField$u(this, "productImages");
2526
- __publicField$u(this, "productListItems");
2536
+ __publicField$z(this, "productImages");
2537
+ __publicField$z(this, "productListItems");
2527
2538
  this.productImages = page.locator(".product-image-link");
2528
2539
  this.productListItems = page.getByRole("listitem");
2529
2540
  }
@@ -2532,26 +2543,26 @@ class Home {
2532
2543
  }
2533
2544
  }
2534
2545
 
2535
- var __defProp$t = Object.defineProperty;
2536
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2537
- var __publicField$t = (obj, key, value) => {
2538
- __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
2546
+ var __defProp$y = Object.defineProperty;
2547
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2548
+ var __publicField$y = (obj, key, value) => {
2549
+ __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
2539
2550
  return value;
2540
2551
  };
2541
2552
  let ProductDetail$1 = class ProductDetail {
2542
2553
  constructor(page) {
2543
2554
  this.page = page;
2544
- __publicField$t(this, "addToCartButton");
2545
- __publicField$t(this, "quantitySelect");
2546
- __publicField$t(this, "productSingleImage");
2547
- __publicField$t(this, "productSinglePrice");
2548
- __publicField$t(this, "productPriceRangesRow");
2549
- __publicField$t(this, "offCanvasCartTitle");
2550
- __publicField$t(this, "offCanvasCart");
2551
- __publicField$t(this, "offCanvasCartGoToCheckoutButton");
2552
- __publicField$t(this, "offCanvasLineItemImages");
2553
- __publicField$t(this, "offCanvasSummaryTotalPrice");
2554
- __publicField$t(this, "offCanvas");
2555
+ __publicField$y(this, "addToCartButton");
2556
+ __publicField$y(this, "quantitySelect");
2557
+ __publicField$y(this, "productSingleImage");
2558
+ __publicField$y(this, "productSinglePrice");
2559
+ __publicField$y(this, "productPriceRangesRow");
2560
+ __publicField$y(this, "offCanvasCartTitle");
2561
+ __publicField$y(this, "offCanvasCart");
2562
+ __publicField$y(this, "offCanvasCartGoToCheckoutButton");
2563
+ __publicField$y(this, "offCanvasLineItemImages");
2564
+ __publicField$y(this, "offCanvasSummaryTotalPrice");
2565
+ __publicField$y(this, "offCanvas");
2555
2566
  this.addToCartButton = page.getByRole("button", { name: "Add to shopping cart" });
2556
2567
  this.quantitySelect = page.getByLabel("Quantity", { exact: true });
2557
2568
  this.productSingleImage = page.locator(".gallery-slider-single-image");
@@ -2573,18 +2584,18 @@ let ProductDetail$1 = class ProductDetail {
2573
2584
  }
2574
2585
  };
2575
2586
 
2576
- var __defProp$s = Object.defineProperty;
2577
- var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2578
- var __publicField$s = (obj, key, value) => {
2579
- __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
2587
+ var __defProp$x = Object.defineProperty;
2588
+ var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2589
+ var __publicField$x = (obj, key, value) => {
2590
+ __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
2580
2591
  return value;
2581
2592
  };
2582
2593
  class Category {
2583
2594
  constructor(page) {
2584
2595
  this.page = page;
2585
- __publicField$s(this, "sortingSelect");
2586
- __publicField$s(this, "firstProductBuyButton");
2587
- __publicField$s(this, "noProductsFoundAlert");
2596
+ __publicField$x(this, "sortingSelect");
2597
+ __publicField$x(this, "firstProductBuyButton");
2598
+ __publicField$x(this, "noProductsFoundAlert");
2588
2599
  this.sortingSelect = page.getByLabel("Sorting");
2589
2600
  this.firstProductBuyButton = page.getByRole("button", { name: "Add to shopping cart" }).first();
2590
2601
  this.noProductsFoundAlert = page.getByText("No products found.");
@@ -2594,24 +2605,24 @@ class Category {
2594
2605
  }
2595
2606
  }
2596
2607
 
2597
- var __defProp$r = Object.defineProperty;
2598
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2599
- var __publicField$r = (obj, key, value) => {
2600
- __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
2608
+ var __defProp$w = Object.defineProperty;
2609
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2610
+ var __publicField$w = (obj, key, value) => {
2611
+ __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
2601
2612
  return value;
2602
2613
  };
2603
2614
  class CheckoutCart {
2604
2615
  constructor(page) {
2605
2616
  this.page = page;
2606
- __publicField$r(this, "headline");
2607
- __publicField$r(this, "goToCheckoutButton");
2608
- __publicField$r(this, "enterPromoInput");
2609
- __publicField$r(this, "grandTotalPrice");
2610
- __publicField$r(this, "emptyCartAlert");
2611
- __publicField$r(this, "stockReachedAlert");
2612
- __publicField$r(this, "cartLineItemImages");
2613
- __publicField$r(this, "unitPriceInfo");
2614
- __publicField$r(this, "cartQuantityNumber");
2617
+ __publicField$w(this, "headline");
2618
+ __publicField$w(this, "goToCheckoutButton");
2619
+ __publicField$w(this, "enterPromoInput");
2620
+ __publicField$w(this, "grandTotalPrice");
2621
+ __publicField$w(this, "emptyCartAlert");
2622
+ __publicField$w(this, "stockReachedAlert");
2623
+ __publicField$w(this, "cartLineItemImages");
2624
+ __publicField$w(this, "unitPriceInfo");
2625
+ __publicField$w(this, "cartQuantityNumber");
2615
2626
  this.headline = page.getByRole("heading", { name: "Shopping cart" });
2616
2627
  this.goToCheckoutButton = page.getByRole("link", { name: "Go to checkout" });
2617
2628
  this.enterPromoInput = page.getByLabel("Promo code");
@@ -2652,25 +2663,25 @@ class CheckoutCart {
2652
2663
  }
2653
2664
  }
2654
2665
 
2655
- var __defProp$q = Object.defineProperty;
2656
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2657
- var __publicField$q = (obj, key, value) => {
2658
- __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
2666
+ var __defProp$v = Object.defineProperty;
2667
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2668
+ var __publicField$v = (obj, key, value) => {
2669
+ __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
2659
2670
  return value;
2660
2671
  };
2661
2672
  class OffCanvasCart {
2662
2673
  constructor(page) {
2663
2674
  this.page = page;
2664
- __publicField$q(this, "headline");
2665
- __publicField$q(this, "itemCount");
2666
- __publicField$q(this, "goToCheckoutButton");
2667
- __publicField$q(this, "goToCartButton");
2668
- __publicField$q(this, "continueShoppingButton");
2669
- __publicField$q(this, "enterPromoInput");
2670
- __publicField$q(this, "submitDiscountButton");
2671
- __publicField$q(this, "subTotalPrice");
2672
- __publicField$q(this, "shippingCosts");
2673
- __publicField$q(this, "cartQuantityNumber");
2675
+ __publicField$v(this, "headline");
2676
+ __publicField$v(this, "itemCount");
2677
+ __publicField$v(this, "goToCheckoutButton");
2678
+ __publicField$v(this, "goToCartButton");
2679
+ __publicField$v(this, "continueShoppingButton");
2680
+ __publicField$v(this, "enterPromoInput");
2681
+ __publicField$v(this, "submitDiscountButton");
2682
+ __publicField$v(this, "subTotalPrice");
2683
+ __publicField$v(this, "shippingCosts");
2684
+ __publicField$v(this, "cartQuantityNumber");
2674
2685
  this.headline = page.getByRole("heading", { name: "Shopping cart" });
2675
2686
  this.itemCount = page.locator(".offcanvas-cart-header-count");
2676
2687
  this.goToCheckoutButton = page.getByRole("link", { name: "Go to checkout" });
@@ -2712,35 +2723,35 @@ class OffCanvasCart {
2712
2723
  }
2713
2724
  }
2714
2725
 
2715
- var __defProp$p = Object.defineProperty;
2716
- var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2717
- var __publicField$p = (obj, key, value) => {
2718
- __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
2726
+ var __defProp$u = Object.defineProperty;
2727
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2728
+ var __publicField$u = (obj, key, value) => {
2729
+ __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
2719
2730
  return value;
2720
2731
  };
2721
2732
  class CheckoutConfirm {
2722
2733
  constructor(page) {
2723
2734
  this.page = page;
2724
- __publicField$p(this, "headline");
2725
- __publicField$p(this, "termsAndConditionsCheckbox");
2726
- __publicField$p(this, "immediateAccessToDigitalProductCheckbox");
2727
- __publicField$p(this, "grandTotalPrice");
2728
- __publicField$p(this, "submitOrderButton");
2735
+ __publicField$u(this, "headline");
2736
+ __publicField$u(this, "termsAndConditionsCheckbox");
2737
+ __publicField$u(this, "immediateAccessToDigitalProductCheckbox");
2738
+ __publicField$u(this, "grandTotalPrice");
2739
+ __publicField$u(this, "submitOrderButton");
2729
2740
  /**
2730
2741
  * Payment options
2731
2742
  */
2732
- __publicField$p(this, "paymentCashOnDelivery");
2733
- __publicField$p(this, "paymentPaidInAdvance");
2734
- __publicField$p(this, "paymentInvoice");
2743
+ __publicField$u(this, "paymentCashOnDelivery");
2744
+ __publicField$u(this, "paymentPaidInAdvance");
2745
+ __publicField$u(this, "paymentInvoice");
2735
2746
  /**
2736
2747
  * Shipping options
2737
2748
  */
2738
- __publicField$p(this, "shippingStandard");
2739
- __publicField$p(this, "shippingExpress");
2749
+ __publicField$u(this, "shippingStandard");
2750
+ __publicField$u(this, "shippingExpress");
2740
2751
  /**
2741
2752
  * Product details
2742
2753
  */
2743
- __publicField$p(this, "cartLineItemImages");
2754
+ __publicField$u(this, "cartLineItemImages");
2744
2755
  this.headline = page.getByRole("heading", { name: "Complete order" });
2745
2756
  this.termsAndConditionsCheckbox = page.getByLabel("I have read and accepted the general terms and conditions.");
2746
2757
  this.immediateAccessToDigitalProductCheckbox = page.getByLabel("I want immediate access to the digital content and I acknowledge that thereby I waive my right to cancel.");
@@ -2758,20 +2769,20 @@ class CheckoutConfirm {
2758
2769
  }
2759
2770
  }
2760
2771
 
2761
- var __defProp$o = Object.defineProperty;
2762
- var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2763
- var __publicField$o = (obj, key, value) => {
2764
- __defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
2772
+ var __defProp$t = Object.defineProperty;
2773
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2774
+ var __publicField$t = (obj, key, value) => {
2775
+ __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
2765
2776
  return value;
2766
2777
  };
2767
2778
  class CheckoutFinish {
2768
2779
  constructor(page) {
2769
2780
  this.page = page;
2770
- __publicField$o(this, "headline");
2771
- __publicField$o(this, "orderNumberText");
2772
- __publicField$o(this, "grandTotalPrice");
2773
- __publicField$o(this, "cartLineItemImages");
2774
- __publicField$o(this, "orderNumberRegex", /Your order number: #(\d+)/);
2781
+ __publicField$t(this, "headline");
2782
+ __publicField$t(this, "orderNumberText");
2783
+ __publicField$t(this, "grandTotalPrice");
2784
+ __publicField$t(this, "cartLineItemImages");
2785
+ __publicField$t(this, "orderNumberRegex", /Your order number: #(\d+)/);
2775
2786
  this.headline = page.getByRole("heading", { name: "Thank you for your order" });
2776
2787
  this.orderNumberText = page.getByText(this.orderNumberRegex);
2777
2788
  this.grandTotalPrice = page.locator('dt:has-text("Grand total") + dd');
@@ -2799,16 +2810,16 @@ class CheckoutFinish {
2799
2810
  }
2800
2811
  }
2801
2812
 
2802
- var __defProp$n = Object.defineProperty;
2803
- var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2804
- var __publicField$n = (obj, key, value) => {
2805
- __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
2813
+ var __defProp$s = Object.defineProperty;
2814
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2815
+ var __publicField$s = (obj, key, value) => {
2816
+ __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
2806
2817
  return value;
2807
2818
  };
2808
2819
  class CheckoutRegister {
2809
2820
  constructor(page) {
2810
2821
  this.page = page;
2811
- __publicField$n(this, "cartLineItemImages");
2822
+ __publicField$s(this, "cartLineItemImages");
2812
2823
  this.cartLineItemImages = page.locator(".line-item-img-link");
2813
2824
  }
2814
2825
  url() {
@@ -2816,22 +2827,22 @@ class CheckoutRegister {
2816
2827
  }
2817
2828
  }
2818
2829
 
2819
- var __defProp$m = Object.defineProperty;
2820
- var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2821
- var __publicField$m = (obj, key, value) => {
2822
- __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
2830
+ var __defProp$r = Object.defineProperty;
2831
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2832
+ var __publicField$r = (obj, key, value) => {
2833
+ __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
2823
2834
  return value;
2824
2835
  };
2825
2836
  class Account {
2826
2837
  constructor(page) {
2827
2838
  this.page = page;
2828
- __publicField$m(this, "headline");
2829
- __publicField$m(this, "personalDataCardTitle");
2830
- __publicField$m(this, "paymentMethodCardTitle");
2831
- __publicField$m(this, "billingAddressCardTitle");
2832
- __publicField$m(this, "shippingAddressCardTitle");
2833
- __publicField$m(this, "newsletterCheckbox");
2834
- __publicField$m(this, "newsletterRegistrationSuccessMessage");
2839
+ __publicField$r(this, "headline");
2840
+ __publicField$r(this, "personalDataCardTitle");
2841
+ __publicField$r(this, "paymentMethodCardTitle");
2842
+ __publicField$r(this, "billingAddressCardTitle");
2843
+ __publicField$r(this, "shippingAddressCardTitle");
2844
+ __publicField$r(this, "newsletterCheckbox");
2845
+ __publicField$r(this, "newsletterRegistrationSuccessMessage");
2835
2846
  this.headline = page.getByRole("heading", { name: "Overview" });
2836
2847
  this.personalDataCardTitle = page.getByRole("heading", { name: "Personal data" });
2837
2848
  this.paymentMethodCardTitle = page.getByRole("heading", { name: "Default payment method" });
@@ -2845,32 +2856,32 @@ class Account {
2845
2856
  }
2846
2857
  }
2847
2858
 
2848
- var __defProp$l = Object.defineProperty;
2849
- var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2850
- var __publicField$l = (obj, key, value) => {
2851
- __defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
2859
+ var __defProp$q = Object.defineProperty;
2860
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2861
+ var __publicField$q = (obj, key, value) => {
2862
+ __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
2852
2863
  return value;
2853
2864
  };
2854
2865
  class AccountLogin {
2855
2866
  constructor(page) {
2856
2867
  this.page = page;
2857
- __publicField$l(this, "emailInput");
2858
- __publicField$l(this, "passwordInput");
2859
- __publicField$l(this, "loginButton");
2860
- __publicField$l(this, "logoutLink");
2861
- __publicField$l(this, "successAlert");
2868
+ __publicField$q(this, "emailInput");
2869
+ __publicField$q(this, "passwordInput");
2870
+ __publicField$q(this, "loginButton");
2871
+ __publicField$q(this, "logoutLink");
2872
+ __publicField$q(this, "successAlert");
2862
2873
  // Inputs for registration
2863
- __publicField$l(this, "personalFormArea");
2864
- __publicField$l(this, "billingAddressFormArea");
2865
- __publicField$l(this, "firstNameInput");
2866
- __publicField$l(this, "lastNameInput");
2867
- __publicField$l(this, "registerEmailInput");
2868
- __publicField$l(this, "registerPasswordInput");
2869
- __publicField$l(this, "streetAddressInput");
2870
- __publicField$l(this, "cityInput");
2871
- __publicField$l(this, "countryInput");
2872
- __publicField$l(this, "postalCodeInput");
2873
- __publicField$l(this, "registerButton");
2874
+ __publicField$q(this, "personalFormArea");
2875
+ __publicField$q(this, "billingAddressFormArea");
2876
+ __publicField$q(this, "firstNameInput");
2877
+ __publicField$q(this, "lastNameInput");
2878
+ __publicField$q(this, "registerEmailInput");
2879
+ __publicField$q(this, "registerPasswordInput");
2880
+ __publicField$q(this, "streetAddressInput");
2881
+ __publicField$q(this, "cityInput");
2882
+ __publicField$q(this, "countryInput");
2883
+ __publicField$q(this, "postalCodeInput");
2884
+ __publicField$q(this, "registerButton");
2874
2885
  this.emailInput = page.getByLabel("Your email address");
2875
2886
  this.passwordInput = page.getByLabel("Your password");
2876
2887
  this.loginButton = page.getByRole("button", { name: "Log in" });
@@ -2894,29 +2905,29 @@ class AccountLogin {
2894
2905
  }
2895
2906
  }
2896
2907
 
2897
- var __defProp$k = Object.defineProperty;
2898
- var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2899
- var __publicField$k = (obj, key, value) => {
2900
- __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
2908
+ var __defProp$p = Object.defineProperty;
2909
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2910
+ var __publicField$p = (obj, key, value) => {
2911
+ __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
2901
2912
  return value;
2902
2913
  };
2903
2914
  class AccountProfile {
2904
2915
  constructor(page) {
2905
2916
  this.page = page;
2906
- __publicField$k(this, "salutationSelect");
2907
- __publicField$k(this, "firstNameInput");
2908
- __publicField$k(this, "lastNameInput");
2909
- __publicField$k(this, "saveProfileButton");
2910
- __publicField$k(this, "changeEmailButton");
2911
- __publicField$k(this, "emailAddressInput");
2912
- __publicField$k(this, "emailAddressConfirmInput");
2913
- __publicField$k(this, "emailConfirmPasswordInput");
2914
- __publicField$k(this, "saveEmailAddressButton");
2915
- __publicField$k(this, "changePasswordButton");
2916
- __publicField$k(this, "newPasswordInput");
2917
- __publicField$k(this, "newPasswordConfirmInput");
2918
- __publicField$k(this, "currentPasswordInput");
2919
- __publicField$k(this, "saveNewPasswordButton");
2917
+ __publicField$p(this, "salutationSelect");
2918
+ __publicField$p(this, "firstNameInput");
2919
+ __publicField$p(this, "lastNameInput");
2920
+ __publicField$p(this, "saveProfileButton");
2921
+ __publicField$p(this, "changeEmailButton");
2922
+ __publicField$p(this, "emailAddressInput");
2923
+ __publicField$p(this, "emailAddressConfirmInput");
2924
+ __publicField$p(this, "emailConfirmPasswordInput");
2925
+ __publicField$p(this, "saveEmailAddressButton");
2926
+ __publicField$p(this, "changePasswordButton");
2927
+ __publicField$p(this, "newPasswordInput");
2928
+ __publicField$p(this, "newPasswordConfirmInput");
2929
+ __publicField$p(this, "currentPasswordInput");
2930
+ __publicField$p(this, "saveNewPasswordButton");
2920
2931
  this.salutationSelect = page.getByLabel("Salutation");
2921
2932
  this.firstNameInput = page.getByPlaceholder("Enter first name...");
2922
2933
  this.lastNameInput = page.getByPlaceholder("Enter last name...");
@@ -2937,18 +2948,18 @@ class AccountProfile {
2937
2948
  }
2938
2949
  }
2939
2950
 
2940
- var __defProp$j = Object.defineProperty;
2941
- var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2942
- var __publicField$j = (obj, key, value) => {
2943
- __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
2951
+ var __defProp$o = Object.defineProperty;
2952
+ var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2953
+ var __publicField$o = (obj, key, value) => {
2954
+ __defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
2944
2955
  return value;
2945
2956
  };
2946
2957
  class AccountOrder {
2947
2958
  constructor(page) {
2948
2959
  this.page = page;
2949
- __publicField$j(this, "cartLineItemImages");
2950
- __publicField$j(this, "orderExpandButton");
2951
- __publicField$j(this, "digitalProductDownloadButton");
2960
+ __publicField$o(this, "cartLineItemImages");
2961
+ __publicField$o(this, "orderExpandButton");
2962
+ __publicField$o(this, "digitalProductDownloadButton");
2952
2963
  this.orderExpandButton = page.getByRole("button", { name: /Expand|Show details/ }).first();
2953
2964
  this.cartLineItemImages = page.locator(".line-item-img-link");
2954
2965
  this.digitalProductDownloadButton = page.getByRole("link", { name: "Download" }).first();
@@ -2958,20 +2969,20 @@ class AccountOrder {
2958
2969
  }
2959
2970
  }
2960
2971
 
2961
- var __defProp$i = Object.defineProperty;
2962
- var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2963
- var __publicField$i = (obj, key, value) => {
2964
- __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
2972
+ var __defProp$n = Object.defineProperty;
2973
+ var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2974
+ var __publicField$n = (obj, key, value) => {
2975
+ __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
2965
2976
  return value;
2966
2977
  };
2967
2978
  class AccountAddresses {
2968
2979
  constructor(page) {
2969
2980
  this.page = page;
2970
- __publicField$i(this, "addNewAddressButton");
2971
- __publicField$i(this, "editBillingAddressButton");
2972
- __publicField$i(this, "editShippingAddressButton");
2973
- __publicField$i(this, "useDefaultBillingAddressButton");
2974
- __publicField$i(this, "useDefaultShippingAddressButton");
2981
+ __publicField$n(this, "addNewAddressButton");
2982
+ __publicField$n(this, "editBillingAddressButton");
2983
+ __publicField$n(this, "editShippingAddressButton");
2984
+ __publicField$n(this, "useDefaultBillingAddressButton");
2985
+ __publicField$n(this, "useDefaultShippingAddressButton");
2975
2986
  this.addNewAddressButton = page.getByRole("link", { name: /Add (new )?address/ });
2976
2987
  this.editBillingAddressButton = page.getByRole("link", { name: "Edit address" }).first();
2977
2988
  this.editShippingAddressButton = page.getByRole("link", { name: "Edit address" }).nth(1);
@@ -2983,19 +2994,19 @@ class AccountAddresses {
2983
2994
  }
2984
2995
  }
2985
2996
 
2986
- var __defProp$h = Object.defineProperty;
2987
- var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2988
- var __publicField$h = (obj, key, value) => {
2989
- __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
2997
+ var __defProp$m = Object.defineProperty;
2998
+ var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2999
+ var __publicField$m = (obj, key, value) => {
3000
+ __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
2990
3001
  return value;
2991
3002
  };
2992
3003
  class AccountPayment {
2993
3004
  constructor(page) {
2994
3005
  this.page = page;
2995
- __publicField$h(this, "cashOnDeliveryOption");
2996
- __publicField$h(this, "paidInAdvanceOption");
2997
- __publicField$h(this, "invoiceOption");
2998
- __publicField$h(this, "changeDefaultPaymentButton");
3006
+ __publicField$m(this, "cashOnDeliveryOption");
3007
+ __publicField$m(this, "paidInAdvanceOption");
3008
+ __publicField$m(this, "invoiceOption");
3009
+ __publicField$m(this, "changeDefaultPaymentButton");
2999
3010
  this.cashOnDeliveryOption = page.getByLabel("Cash on delivery");
3000
3011
  this.paidInAdvanceOption = page.getByLabel("Paid in advance");
3001
3012
  this.invoiceOption = page.getByLabel("Invoice");
@@ -3006,17 +3017,17 @@ class AccountPayment {
3006
3017
  }
3007
3018
  }
3008
3019
 
3009
- var __defProp$g = Object.defineProperty;
3010
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3011
- var __publicField$g = (obj, key, value) => {
3012
- __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
3020
+ var __defProp$l = Object.defineProperty;
3021
+ var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3022
+ var __publicField$l = (obj, key, value) => {
3023
+ __defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
3013
3024
  return value;
3014
3025
  };
3015
3026
  class Search {
3016
3027
  constructor(page) {
3017
3028
  this.page = page;
3018
- __publicField$g(this, "headline");
3019
- __publicField$g(this, "productImages");
3029
+ __publicField$l(this, "headline");
3030
+ __publicField$l(this, "productImages");
3020
3031
  this.headline = page.locator("h1.search-headline");
3021
3032
  this.productImages = page.locator(".product-image-link");
3022
3033
  }
@@ -3025,16 +3036,16 @@ class Search {
3025
3036
  }
3026
3037
  }
3027
3038
 
3028
- var __defProp$f = Object.defineProperty;
3029
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3030
- var __publicField$f = (obj, key, value) => {
3031
- __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
3039
+ var __defProp$k = Object.defineProperty;
3040
+ var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3041
+ var __publicField$k = (obj, key, value) => {
3042
+ __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
3032
3043
  return value;
3033
3044
  };
3034
3045
  class SearchSuggest {
3035
3046
  constructor(page) {
3036
3047
  this.page = page;
3037
- __publicField$f(this, "searchSuggestLineItemImages");
3048
+ __publicField$k(this, "searchSuggestLineItemImages");
3038
3049
  this.searchSuggestLineItemImages = page.locator(".search-suggest-product-image-container");
3039
3050
  }
3040
3051
  url(searchTerm) {
@@ -3111,10 +3122,10 @@ const test$6 = test$e.extend({
3111
3122
  }
3112
3123
  });
3113
3124
 
3114
- var __defProp$e = Object.defineProperty;
3115
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3116
- var __publicField$e = (obj, key, value) => {
3117
- __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
3125
+ var __defProp$j = Object.defineProperty;
3126
+ var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3127
+ var __publicField$j = (obj, key, value) => {
3128
+ __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
3118
3129
  return value;
3119
3130
  };
3120
3131
  class ProductDetail {
@@ -3123,39 +3134,44 @@ class ProductDetail {
3123
3134
  /**
3124
3135
  * Save interactions
3125
3136
  */
3126
- __publicField$e(this, "savePhysicalProductButton");
3127
- __publicField$e(this, "saveButtonLoadingSpinner");
3128
- __publicField$e(this, "saveButtonCheckMark");
3137
+ __publicField$j(this, "savePhysicalProductButton");
3138
+ __publicField$j(this, "saveButtonLoadingSpinner");
3139
+ __publicField$j(this, "saveButtonCheckMark");
3129
3140
  /**
3130
3141
  * Media Upload interactions
3131
3142
  */
3132
- __publicField$e(this, "uploadMediaButton");
3133
- __publicField$e(this, "coverImage");
3134
- __publicField$e(this, "productImage");
3143
+ __publicField$j(this, "uploadMediaButton");
3144
+ __publicField$j(this, "coverImage");
3145
+ __publicField$j(this, "productImage");
3135
3146
  /**
3136
3147
  * Tabs
3137
3148
  */
3138
- __publicField$e(this, "variantsTabLink");
3149
+ __publicField$j(this, "variantsTabLink");
3150
+ __publicField$j(this, "specificationsTabLink");
3139
3151
  /**
3140
3152
  * Variants Generation
3141
3153
  */
3142
- __publicField$e(this, "generateVariantsButton");
3143
- __publicField$e(this, "variantsModal");
3144
- __publicField$e(this, "variantsModalHeadline");
3145
- __publicField$e(this, "variantsNextButton");
3146
- __publicField$e(this, "variantsSaveButton");
3154
+ __publicField$j(this, "generateVariantsButton");
3155
+ __publicField$j(this, "variantsModal");
3156
+ __publicField$j(this, "variantsModalHeadline");
3157
+ __publicField$j(this, "variantsNextButton");
3158
+ __publicField$j(this, "variantsSaveButton");
3147
3159
  /**
3148
3160
  * Property Selection
3149
3161
  */
3150
- __publicField$e(this, "propertyGroupColor");
3151
- __publicField$e(this, "propertyGroupSize");
3152
- __publicField$e(this, "propertyOptionGrid");
3153
- __publicField$e(this, "propertyOptionColorBlue");
3154
- __publicField$e(this, "propertyOptionColorRed");
3155
- __publicField$e(this, "propertyOptionColorGreen");
3156
- __publicField$e(this, "propertyOptionSizeSmall");
3157
- __publicField$e(this, "propertyOptionSizeMedium");
3158
- __publicField$e(this, "propertyOptionSizeLarge");
3162
+ __publicField$j(this, "propertyGroupColor");
3163
+ __publicField$j(this, "propertyGroupSize");
3164
+ __publicField$j(this, "propertyOptionGrid");
3165
+ __publicField$j(this, "propertyOptionColorBlue");
3166
+ __publicField$j(this, "propertyOptionColorRed");
3167
+ __publicField$j(this, "propertyOptionColorGreen");
3168
+ __publicField$j(this, "propertyOptionSizeSmall");
3169
+ __publicField$j(this, "propertyOptionSizeMedium");
3170
+ __publicField$j(this, "propertyOptionSizeLarge");
3171
+ /**
3172
+ * Cards
3173
+ */
3174
+ __publicField$j(this, "customFieldCard");
3159
3175
  this.savePhysicalProductButton = page.getByRole("button", { name: "Save" });
3160
3176
  this.saveButtonCheckMark = page.locator(".icon--regular-checkmark-xs");
3161
3177
  this.saveButtonLoadingSpinner = page.locator("sw-loader");
@@ -3177,24 +3193,35 @@ class ProductDetail {
3177
3193
  this.propertyOptionSizeSmall = this.propertyOptionGrid.getByLabel("Small");
3178
3194
  this.propertyOptionSizeMedium = this.propertyOptionGrid.getByLabel("Medium");
3179
3195
  this.propertyOptionSizeLarge = this.propertyOptionGrid.getByLabel("Large");
3196
+ this.specificationsTabLink = page.getByRole("link", { name: "Specifications" });
3197
+ this.customFieldCard = page.locator(".sw-card").getByText("Custom fields");
3198
+ }
3199
+ async getCustomFieldSetCardContentByName(customFieldSetName) {
3200
+ const customFieldCard = this.page.locator(".sw-card").filter({ hasText: "Custom fields" });
3201
+ const customFieldSetTab = customFieldCard.getByText(customFieldSetName);
3202
+ const customFieldSetTabCustomContent = customFieldCard.locator(`.sw-custom-field-set-renderer-tab-content__${customFieldSetName}`);
3203
+ return {
3204
+ customFieldSetTab,
3205
+ customFieldSetTabCustomContent
3206
+ };
3180
3207
  }
3181
3208
  url(productId) {
3182
3209
  return `#/sw/product/detail/${productId}/base`;
3183
3210
  }
3184
3211
  }
3185
3212
 
3186
- var __defProp$d = Object.defineProperty;
3187
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3188
- var __publicField$d = (obj, key, value) => {
3189
- __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
3213
+ var __defProp$i = Object.defineProperty;
3214
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3215
+ var __publicField$i = (obj, key, value) => {
3216
+ __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
3190
3217
  return value;
3191
3218
  };
3192
3219
  class OrderDetail {
3193
3220
  constructor(page) {
3194
3221
  this.page = page;
3195
- __publicField$d(this, "saveButton");
3196
- __publicField$d(this, "dataGridContextButton");
3197
- __publicField$d(this, "orderTag");
3222
+ __publicField$i(this, "saveButton");
3223
+ __publicField$i(this, "dataGridContextButton");
3224
+ __publicField$i(this, "orderTag");
3198
3225
  this.saveButton = page.locator(".sw-order-detail__smart-bar-save-button");
3199
3226
  this.dataGridContextButton = page.locator(".sw-data-grid__actions-menu").and(page.getByRole("button"));
3200
3227
  this.orderTag = page.locator(".sw-select-selection-list__item");
@@ -3204,74 +3231,89 @@ class OrderDetail {
3204
3231
  }
3205
3232
  }
3206
3233
 
3207
- var __defProp$c = Object.defineProperty;
3208
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3209
- var __publicField$c = (obj, key, value) => {
3210
- __defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
3234
+ var __defProp$h = Object.defineProperty;
3235
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3236
+ var __publicField$h = (obj, key, value) => {
3237
+ __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
3211
3238
  return value;
3212
3239
  };
3213
3240
  class CustomerDetail {
3214
3241
  constructor(page) {
3215
3242
  this.page = page;
3216
- __publicField$c(this, "editButton");
3217
- __publicField$c(this, "generalTab");
3218
- __publicField$c(this, "accountCard");
3243
+ __publicField$h(this, "editButton");
3244
+ __publicField$h(this, "generalTab");
3245
+ __publicField$h(this, "accountCard");
3246
+ __publicField$h(this, "customFieldCard");
3247
+ __publicField$h(this, "customFieldSetTabs");
3248
+ __publicField$h(this, "customFieldSetTabCustomContent");
3219
3249
  this.editButton = page.getByRole("button", { name: "Edit" });
3220
3250
  this.generalTab = page.getByRole("link", { name: "General" });
3221
3251
  this.accountCard = page.locator(".sw-customer-card");
3252
+ this.customFieldCard = page.locator(".sw-card").getByText("Custom fields");
3253
+ this.customFieldSetTabs = this.customFieldCard.locator(".sw-tabs-item");
3254
+ this.customFieldSetTabCustomContent = this.customFieldCard.locator(".sw-tabs__custom-content");
3255
+ }
3256
+ async getCustomFieldSetCardContentByName(customFieldSetName) {
3257
+ const customFieldCard = this.page.locator(".sw-card").filter({ hasText: "Custom fields" });
3258
+ const customFieldSetTab = customFieldCard.getByText(customFieldSetName);
3259
+ const customFieldSetTabCustomContent = customFieldCard.locator(`.sw-custom-field-set-renderer-tab-content__${customFieldSetName}`);
3260
+ return {
3261
+ customFieldSetTab,
3262
+ customFieldSetTabCustomContent
3263
+ };
3222
3264
  }
3223
3265
  url(customerId) {
3224
3266
  return `#/sw/customer/detail/${customerId}/base`;
3225
3267
  }
3226
3268
  }
3227
3269
 
3228
- var __defProp$b = Object.defineProperty;
3229
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3230
- var __publicField$b = (obj, key, value) => {
3231
- __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
3270
+ var __defProp$g = Object.defineProperty;
3271
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3272
+ var __publicField$g = (obj, key, value) => {
3273
+ __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
3232
3274
  return value;
3233
3275
  };
3234
3276
  class FirstRunWizard {
3235
3277
  constructor(page) {
3236
3278
  this.page = page;
3237
- __publicField$b(this, "nextButton");
3238
- __publicField$b(this, "configureLaterButton");
3239
- __publicField$b(this, "skipButton");
3240
- __publicField$b(this, "finishButton");
3241
- __publicField$b(this, "backButton");
3242
- __publicField$b(this, "smtpServerButton");
3243
- __publicField$b(this, "dataImportHeader");
3244
- __publicField$b(this, "installLanguagePackButton");
3245
- __publicField$b(this, "installDemoDataButton");
3246
- __publicField$b(this, "installMigrationAssistantButton");
3247
- __publicField$b(this, "defaultValuesHeader");
3248
- __publicField$b(this, "mailerConfigurationHeader");
3249
- __publicField$b(this, "payPalSetupHeader");
3250
- __publicField$b(this, "extensionsHeader");
3251
- __publicField$b(this, "shopwareAccountHeader");
3252
- __publicField$b(this, "shopwareStoreHeader");
3253
- __publicField$b(this, "doneHeader");
3254
- __publicField$b(this, "frwSuccessText");
3255
- __publicField$b(this, "welcomeText");
3256
- __publicField$b(this, "pluginCardInfo");
3257
- __publicField$b(this, "dataImportCard");
3258
- __publicField$b(this, "salesChannelSelectionList");
3259
- __publicField$b(this, "salesChannelSelectionMultiSelect");
3260
- __publicField$b(this, "smtpServerTitle");
3261
- __publicField$b(this, "smtpServerFields");
3262
- __publicField$b(this, "payPalPaymethods");
3263
- __publicField$b(this, "payPalInfoCard");
3264
- __publicField$b(this, "emailAddressInputField");
3265
- __publicField$b(this, "passwordInputField");
3266
- __publicField$b(this, "forgotPasswordLink");
3267
- __publicField$b(this, "extensionStoreHeading");
3268
- __publicField$b(this, "documentationLink");
3269
- __publicField$b(this, "forumLink");
3270
- __publicField$b(this, "roadmapLink");
3271
- __publicField$b(this, "germanRegionSelector");
3272
- __publicField$b(this, "toolsSelector");
3273
- __publicField$b(this, "recommendationHeader");
3274
- __publicField$b(this, "toolsRecommendedPlugin");
3279
+ __publicField$g(this, "nextButton");
3280
+ __publicField$g(this, "configureLaterButton");
3281
+ __publicField$g(this, "skipButton");
3282
+ __publicField$g(this, "finishButton");
3283
+ __publicField$g(this, "backButton");
3284
+ __publicField$g(this, "smtpServerButton");
3285
+ __publicField$g(this, "dataImportHeader");
3286
+ __publicField$g(this, "installLanguagePackButton");
3287
+ __publicField$g(this, "installDemoDataButton");
3288
+ __publicField$g(this, "installMigrationAssistantButton");
3289
+ __publicField$g(this, "defaultValuesHeader");
3290
+ __publicField$g(this, "mailerConfigurationHeader");
3291
+ __publicField$g(this, "payPalSetupHeader");
3292
+ __publicField$g(this, "extensionsHeader");
3293
+ __publicField$g(this, "shopwareAccountHeader");
3294
+ __publicField$g(this, "shopwareStoreHeader");
3295
+ __publicField$g(this, "doneHeader");
3296
+ __publicField$g(this, "frwSuccessText");
3297
+ __publicField$g(this, "welcomeText");
3298
+ __publicField$g(this, "pluginCardInfo");
3299
+ __publicField$g(this, "dataImportCard");
3300
+ __publicField$g(this, "salesChannelSelectionList");
3301
+ __publicField$g(this, "salesChannelSelectionMultiSelect");
3302
+ __publicField$g(this, "smtpServerTitle");
3303
+ __publicField$g(this, "smtpServerFields");
3304
+ __publicField$g(this, "payPalPaymethods");
3305
+ __publicField$g(this, "payPalInfoCard");
3306
+ __publicField$g(this, "emailAddressInputField");
3307
+ __publicField$g(this, "passwordInputField");
3308
+ __publicField$g(this, "forgotPasswordLink");
3309
+ __publicField$g(this, "extensionStoreHeading");
3310
+ __publicField$g(this, "documentationLink");
3311
+ __publicField$g(this, "forumLink");
3312
+ __publicField$g(this, "roadmapLink");
3313
+ __publicField$g(this, "germanRegionSelector");
3314
+ __publicField$g(this, "toolsSelector");
3315
+ __publicField$g(this, "recommendationHeader");
3316
+ __publicField$g(this, "toolsRecommendedPlugin");
3275
3317
  this.nextButton = page.getByText("Next", { exact: true });
3276
3318
  this.configureLaterButton = page.getByText("Configure later", { exact: true });
3277
3319
  this.skipButton = page.getByText("Skip", { exact: true });
@@ -3316,17 +3358,17 @@ class FirstRunWizard {
3316
3358
  }
3317
3359
  }
3318
3360
 
3319
- var __defProp$a = Object.defineProperty;
3320
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3321
- var __publicField$a = (obj, key, value) => {
3322
- __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
3361
+ var __defProp$f = Object.defineProperty;
3362
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3363
+ var __publicField$f = (obj, key, value) => {
3364
+ __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
3323
3365
  return value;
3324
3366
  };
3325
3367
  class FlowBuilderCreate {
3326
3368
  constructor(page) {
3327
3369
  this.page = page;
3328
- __publicField$a(this, "saveButton");
3329
- __publicField$a(this, "header");
3370
+ __publicField$f(this, "saveButton");
3371
+ __publicField$f(this, "header");
3330
3372
  this.saveButton = page.locator(".sw-flow-detail__save");
3331
3373
  this.header = page.locator("h2");
3332
3374
  }
@@ -3335,28 +3377,28 @@ class FlowBuilderCreate {
3335
3377
  }
3336
3378
  }
3337
3379
 
3338
- var __defProp$9 = Object.defineProperty;
3339
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3340
- var __publicField$9 = (obj, key, value) => {
3341
- __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
3380
+ var __defProp$e = Object.defineProperty;
3381
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3382
+ var __publicField$e = (obj, key, value) => {
3383
+ __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
3342
3384
  return value;
3343
3385
  };
3344
3386
  class FlowBuilderListing {
3345
3387
  constructor(page) {
3346
3388
  this.page = page;
3347
- __publicField$9(this, "createFlowButton");
3348
- __publicField$9(this, "firstFlowName");
3349
- __publicField$9(this, "firstFlowContextButton");
3350
- __publicField$9(this, "flowContextMenu");
3351
- __publicField$9(this, "contextMenuDownload");
3352
- __publicField$9(this, "contextMenuDuplicate");
3353
- __publicField$9(this, "contextMenuEdit");
3354
- __publicField$9(this, "contextMenuDelete");
3355
- __publicField$9(this, "flowDownloadModal");
3356
- __publicField$9(this, "downloadFlowButton");
3357
- __publicField$9(this, "flowDeleteButton");
3358
- __publicField$9(this, "successAlert");
3359
- __publicField$9(this, "successAlertMessage");
3389
+ __publicField$e(this, "createFlowButton");
3390
+ __publicField$e(this, "firstFlowName");
3391
+ __publicField$e(this, "firstFlowContextButton");
3392
+ __publicField$e(this, "flowContextMenu");
3393
+ __publicField$e(this, "contextMenuDownload");
3394
+ __publicField$e(this, "contextMenuDuplicate");
3395
+ __publicField$e(this, "contextMenuEdit");
3396
+ __publicField$e(this, "contextMenuDelete");
3397
+ __publicField$e(this, "flowDownloadModal");
3398
+ __publicField$e(this, "downloadFlowButton");
3399
+ __publicField$e(this, "flowDeleteButton");
3400
+ __publicField$e(this, "successAlert");
3401
+ __publicField$e(this, "successAlertMessage");
3360
3402
  this.createFlowButton = page.locator(".sw-flow-list__create");
3361
3403
  this.firstFlowName = page.locator(".sw-data-grid__cell--name a").first();
3362
3404
  this.firstFlowContextButton = page.locator(".sw-data-grid__actions-menu").first();
@@ -3393,18 +3435,18 @@ class FlowBuilderListing {
3393
3435
  }
3394
3436
  }
3395
3437
 
3396
- var __defProp$8 = Object.defineProperty;
3397
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3398
- var __publicField$8 = (obj, key, value) => {
3399
- __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
3438
+ var __defProp$d = Object.defineProperty;
3439
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3440
+ var __publicField$d = (obj, key, value) => {
3441
+ __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
3400
3442
  return value;
3401
3443
  };
3402
3444
  class FlowBuilderDetail {
3403
3445
  constructor(page) {
3404
3446
  this.page = page;
3405
- __publicField$8(this, "saveButton");
3406
- __publicField$8(this, "generalTab");
3407
- __publicField$8(this, "flowTab");
3447
+ __publicField$d(this, "saveButton");
3448
+ __publicField$d(this, "generalTab");
3449
+ __publicField$d(this, "flowTab");
3408
3450
  this.saveButton = page.locator(".sw-flow-detail__save");
3409
3451
  this.generalTab = page.locator(".sw-flow-detail__tab-general");
3410
3452
  this.flowTab = page.locator(".sw-flow-detail__tab-flow");
@@ -3414,20 +3456,20 @@ class FlowBuilderDetail {
3414
3456
  }
3415
3457
  }
3416
3458
 
3417
- var __defProp$7 = Object.defineProperty;
3418
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3419
- var __publicField$7 = (obj, key, value) => {
3420
- __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
3459
+ var __defProp$c = Object.defineProperty;
3460
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3461
+ var __publicField$c = (obj, key, value) => {
3462
+ __defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
3421
3463
  return value;
3422
3464
  };
3423
3465
  class DataSharing {
3424
3466
  constructor(page) {
3425
3467
  this.page = page;
3426
- __publicField$7(this, "dataConsentHeadline");
3427
- __publicField$7(this, "dataSharingSuccessMessageLabel");
3428
- __publicField$7(this, "dataSharingAgreeButton");
3429
- __publicField$7(this, "dataSharingDisableButton");
3430
- __publicField$7(this, "dataSharingTermsAgreementLabel");
3468
+ __publicField$c(this, "dataConsentHeadline");
3469
+ __publicField$c(this, "dataSharingSuccessMessageLabel");
3470
+ __publicField$c(this, "dataSharingAgreeButton");
3471
+ __publicField$c(this, "dataSharingDisableButton");
3472
+ __publicField$c(this, "dataSharingTermsAgreementLabel");
3431
3473
  this.dataConsentHeadline = page.locator("h3.sw-usage-data-consent-banner__content-headline");
3432
3474
  this.dataSharingAgreeButton = page.getByRole("button", { name: "Agree" });
3433
3475
  this.dataSharingDisableButton = page.getByRole("button", { name: "Disable data sharing" });
@@ -3439,23 +3481,23 @@ class DataSharing {
3439
3481
  }
3440
3482
  }
3441
3483
 
3442
- var __defProp$6 = Object.defineProperty;
3443
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3444
- var __publicField$6 = (obj, key, value) => {
3445
- __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
3484
+ var __defProp$b = Object.defineProperty;
3485
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3486
+ var __publicField$b = (obj, key, value) => {
3487
+ __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
3446
3488
  return value;
3447
3489
  };
3448
3490
  class Dashboard {
3449
3491
  constructor(page) {
3450
3492
  this.page = page;
3451
- __publicField$6(this, "welcomeHeadline");
3452
- __publicField$6(this, "dataSharingConsentBanner");
3453
- __publicField$6(this, "dataSharingAgreeButton");
3454
- __publicField$6(this, "dataSharingNotAtTheMomentButton");
3455
- __publicField$6(this, "dataSharingTermsAgreementLabel");
3456
- __publicField$6(this, "dataSharingSettingsLink");
3457
- __publicField$6(this, "dataSharingAcceptMessageText");
3458
- __publicField$6(this, "dataSharingNotAtTheMomentMessageText");
3493
+ __publicField$b(this, "welcomeHeadline");
3494
+ __publicField$b(this, "dataSharingConsentBanner");
3495
+ __publicField$b(this, "dataSharingAgreeButton");
3496
+ __publicField$b(this, "dataSharingNotAtTheMomentButton");
3497
+ __publicField$b(this, "dataSharingTermsAgreementLabel");
3498
+ __publicField$b(this, "dataSharingSettingsLink");
3499
+ __publicField$b(this, "dataSharingAcceptMessageText");
3500
+ __publicField$b(this, "dataSharingNotAtTheMomentMessageText");
3459
3501
  this.welcomeHeadline = page.locator("h1.sw-dashboard-index__welcome-title");
3460
3502
  this.dataSharingConsentBanner = page.locator(".sw-usage-data-consent-banner");
3461
3503
  this.dataSharingAgreeButton = page.getByRole("button", { name: "Agree" });
@@ -3470,25 +3512,25 @@ class Dashboard {
3470
3512
  }
3471
3513
  }
3472
3514
 
3473
- var __defProp$5 = Object.defineProperty;
3474
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3475
- var __publicField$5 = (obj, key, value) => {
3476
- __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
3515
+ var __defProp$a = Object.defineProperty;
3516
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3517
+ var __publicField$a = (obj, key, value) => {
3518
+ __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
3477
3519
  return value;
3478
3520
  };
3479
3521
  class ShippingListing {
3480
3522
  constructor(page) {
3481
3523
  this.page = page;
3482
- __publicField$5(this, "header");
3483
- __publicField$5(this, "addShippingMethod");
3484
- __publicField$5(this, "contextMenu");
3485
- __publicField$5(this, "editButton");
3486
- __publicField$5(this, "deleteButton");
3524
+ __publicField$a(this, "header");
3525
+ __publicField$a(this, "addShippingMethod");
3526
+ __publicField$a(this, "contextMenu");
3527
+ __publicField$a(this, "editButton");
3528
+ __publicField$a(this, "deleteButton");
3487
3529
  //warning modal
3488
- __publicField$5(this, "modal");
3489
- __publicField$5(this, "modalHeader");
3490
- __publicField$5(this, "modalCancelButton");
3491
- __publicField$5(this, "modalDeleteButton");
3530
+ __publicField$a(this, "modal");
3531
+ __publicField$a(this, "modalHeader");
3532
+ __publicField$a(this, "modalCancelButton");
3533
+ __publicField$a(this, "modalDeleteButton");
3492
3534
  this.header = page.locator(".smart-bar__header");
3493
3535
  this.addShippingMethod = page.getByText("Add shipping method", { exact: true });
3494
3536
  this.contextMenu = page.locator(".sw-data-grid-settings__trigger");
@@ -3504,10 +3546,10 @@ class ShippingListing {
3504
3546
  }
3505
3547
  }
3506
3548
 
3507
- var __defProp$4 = Object.defineProperty;
3508
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3509
- var __publicField$4 = (obj, key, value) => {
3510
- __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
3549
+ var __defProp$9 = Object.defineProperty;
3550
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3551
+ var __publicField$9 = (obj, key, value) => {
3552
+ __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
3511
3553
  return value;
3512
3554
  };
3513
3555
  class LandingPageCreate {
@@ -3516,24 +3558,24 @@ class LandingPageCreate {
3516
3558
  /**
3517
3559
  * General
3518
3560
  */
3519
- __publicField$4(this, "nameInput");
3520
- __publicField$4(this, "landingPageStatus");
3521
- __publicField$4(this, "salesChannelSelectionList");
3522
- __publicField$4(this, "filtersResultPopoverItemList");
3523
- __publicField$4(this, "saveLandingPageButton");
3524
- __publicField$4(this, "loadingSpinner");
3525
- __publicField$4(this, "seoUrlInput");
3561
+ __publicField$9(this, "nameInput");
3562
+ __publicField$9(this, "landingPageStatus");
3563
+ __publicField$9(this, "salesChannelSelectionList");
3564
+ __publicField$9(this, "filtersResultPopoverItemList");
3565
+ __publicField$9(this, "saveLandingPageButton");
3566
+ __publicField$9(this, "loadingSpinner");
3567
+ __publicField$9(this, "seoUrlInput");
3526
3568
  /**
3527
3569
  * Layout
3528
3570
  */
3529
- __publicField$4(this, "layoutTab");
3530
- __publicField$4(this, "assignLayoutButton");
3531
- __publicField$4(this, "searchLayoutInput");
3532
- __publicField$4(this, "layoutItems");
3533
- __publicField$4(this, "layoutAddButton");
3534
- __publicField$4(this, "layoutEmptyState");
3535
- __publicField$4(this, "createNewLayoutButton");
3536
- __publicField$4(this, "layoutCheckboxes");
3571
+ __publicField$9(this, "layoutTab");
3572
+ __publicField$9(this, "assignLayoutButton");
3573
+ __publicField$9(this, "searchLayoutInput");
3574
+ __publicField$9(this, "layoutItems");
3575
+ __publicField$9(this, "layoutSaveButton");
3576
+ __publicField$9(this, "layoutEmptyState");
3577
+ __publicField$9(this, "createNewLayoutButton");
3578
+ __publicField$9(this, "layoutCheckboxes");
3537
3579
  this.loadingSpinner = page.locator(".sw-loader");
3538
3580
  this.saveLandingPageButton = page.getByRole("button", { name: "Save" });
3539
3581
  this.nameInput = page.getByLabel("Name");
@@ -3551,17 +3593,17 @@ class LandingPageCreate {
3551
3593
  this.layoutItems = layoutModal.locator(".sw-cms-list-item");
3552
3594
  const layoutTable = layoutModal.locator(".sw-data-grid__body");
3553
3595
  this.layoutCheckboxes = layoutTable.locator(".sw-field--checkbox__content");
3554
- this.layoutAddButton = layoutModal.getByRole("button", { name: "Add" });
3596
+ this.layoutSaveButton = layoutModal.getByRole("button", { name: "Save" });
3555
3597
  }
3556
3598
  url() {
3557
3599
  return `#/sw/category/landingPage/create/base`;
3558
3600
  }
3559
3601
  }
3560
3602
 
3561
- var __defProp$3 = Object.defineProperty;
3562
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3563
- var __publicField$3 = (obj, key, value) => {
3564
- __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
3603
+ var __defProp$8 = Object.defineProperty;
3604
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3605
+ var __publicField$8 = (obj, key, value) => {
3606
+ __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
3565
3607
  return value;
3566
3608
  };
3567
3609
  class LandingPageDetail {
@@ -3570,24 +3612,24 @@ class LandingPageDetail {
3570
3612
  /**
3571
3613
  * General
3572
3614
  */
3573
- __publicField$3(this, "nameInput");
3574
- __publicField$3(this, "landingPageStatus");
3575
- __publicField$3(this, "salesChannelSelectionList");
3576
- __publicField$3(this, "filtersResultPopoverItemList");
3577
- __publicField$3(this, "saveLandingPageButton");
3578
- __publicField$3(this, "loadingSpinner");
3579
- __publicField$3(this, "seoUrlInput");
3615
+ __publicField$8(this, "nameInput");
3616
+ __publicField$8(this, "landingPageStatus");
3617
+ __publicField$8(this, "salesChannelSelectionList");
3618
+ __publicField$8(this, "filtersResultPopoverItemList");
3619
+ __publicField$8(this, "saveLandingPageButton");
3620
+ __publicField$8(this, "loadingSpinner");
3621
+ __publicField$8(this, "seoUrlInput");
3580
3622
  /**
3581
3623
  * Layout
3582
3624
  */
3583
- __publicField$3(this, "layoutTab");
3584
- __publicField$3(this, "layoutAssignmentCardTitle");
3585
- __publicField$3(this, "layoutAssignmentCardHeadline");
3586
- __publicField$3(this, "changeLayoutButton");
3587
- __publicField$3(this, "editInDesignerButton");
3588
- __publicField$3(this, "layoutResetButton");
3589
- __publicField$3(this, "layoutAssignmentStatus");
3590
- __publicField$3(this, "layoutAssignmentContentSection");
3625
+ __publicField$8(this, "layoutTab");
3626
+ __publicField$8(this, "layoutAssignmentCardTitle");
3627
+ __publicField$8(this, "layoutAssignmentCardHeadline");
3628
+ __publicField$8(this, "changeLayoutButton");
3629
+ __publicField$8(this, "editInDesignerButton");
3630
+ __publicField$8(this, "layoutResetButton");
3631
+ __publicField$8(this, "layoutAssignmentStatus");
3632
+ __publicField$8(this, "layoutAssignmentContentSection");
3591
3633
  this.loadingSpinner = page.locator(".sw-loader");
3592
3634
  this.saveLandingPageButton = page.getByRole("button", { name: "Save" });
3593
3635
  this.nameInput = page.getByLabel("Name");
@@ -3611,10 +3653,10 @@ class LandingPageDetail {
3611
3653
  }
3612
3654
  }
3613
3655
 
3614
- var __defProp$2 = Object.defineProperty;
3615
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3616
- var __publicField$2 = (obj, key, value) => {
3617
- __defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
3656
+ var __defProp$7 = Object.defineProperty;
3657
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3658
+ var __publicField$7 = (obj, key, value) => {
3659
+ __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
3618
3660
  return value;
3619
3661
  };
3620
3662
  class Categories {
@@ -3623,36 +3665,293 @@ class Categories {
3623
3665
  /**
3624
3666
  * Landing pages
3625
3667
  */
3626
- __publicField$2(this, "landingPageArea");
3627
- __publicField$2(this, "landingPageHeadline");
3628
- __publicField$2(this, "addLandingPageButton");
3629
- __publicField$2(this, "landingPageItems");
3668
+ __publicField$7(this, "landingPageArea");
3669
+ __publicField$7(this, "landingPageHeadline");
3670
+ __publicField$7(this, "addLandingPageButton");
3671
+ __publicField$7(this, "landingPageItems");
3672
+ /**
3673
+ * Category tree
3674
+ */
3675
+ __publicField$7(this, "categoryTree");
3676
+ __publicField$7(this, "homeCategory");
3677
+ __publicField$7(this, "homeCategoryContextButton");
3678
+ __publicField$7(this, "categoryMenuItemList");
3679
+ __publicField$7(this, "createCategoryInput");
3680
+ __publicField$7(this, "confirmCategoryCreationButton");
3681
+ __publicField$7(this, "categoryItems");
3682
+ /**
3683
+ * General
3684
+ */
3685
+ __publicField$7(this, "nameInput");
3686
+ __publicField$7(this, "activeCheckbox");
3687
+ __publicField$7(this, "categoryTypeSelectionList");
3688
+ __publicField$7(this, "filtersResultPopoverItemList");
3689
+ __publicField$7(this, "saveButton");
3690
+ /**
3691
+ * Customisable link
3692
+ */
3693
+ __publicField$7(this, "entitySelectionList");
3694
+ __publicField$7(this, "linkTypeSelectionList");
3695
+ __publicField$7(this, "categorySelectionList");
3696
+ __publicField$7(this, "productSelectionList");
3697
+ __publicField$7(this, "landingPageSelectionList");
3698
+ __publicField$7(this, "filterResultPopoverTreeCheckboxItemList");
3699
+ __publicField$7(this, "openInNewTabCheckbox");
3630
3700
  this.landingPageArea = page.locator(".sw-category-detail__landing-page-collapse");
3631
3701
  this.landingPageHeadline = this.landingPageArea.getByRole("heading", { name: "Landing pages" });
3632
3702
  this.addLandingPageButton = this.landingPageArea.getByText("Add landing page");
3633
3703
  this.landingPageItems = this.landingPageArea.locator(".sw-tree-item__label");
3704
+ this.categoryTree = page.locator(".sw-category-tree");
3705
+ this.homeCategory = this.categoryTree.locator(".sw-tree-item__element").filter({ hasText: "Home" });
3706
+ this.homeCategoryContextButton = this.homeCategory.locator(".sw-context-button__button");
3707
+ this.categoryMenuItemList = page.locator(".sw-context-button__menu-popover").locator(".sw-context-menu-item");
3708
+ this.createCategoryInput = page.getByPlaceholder("Create category").getByRole("textbox");
3709
+ this.confirmCategoryCreationButton = page.locator(".sw-confirm-field").locator(".sw-button--primary");
3710
+ this.categoryItems = this.categoryTree.locator(".sw-tree-item__label");
3711
+ this.nameInput = page.getByLabel("Name");
3712
+ this.activeCheckbox = page.getByRole("checkbox", { name: "Active" });
3713
+ this.saveButton = page.getByRole("button", { name: "Save" });
3714
+ this.categoryTypeSelectionList = page.locator(".sw-select").filter({ hasText: "Category type" }).locator(".sw-select__selection");
3715
+ this.linkTypeSelectionList = page.locator(".sw-select").filter({ hasText: "Link type" }).locator(".sw-select__selection");
3716
+ this.entitySelectionList = page.locator(".sw-select").filter({ hasText: "Entity" }).locator(".sw-select__selection");
3717
+ this.categorySelectionList = page.locator(".sw-select").filter({ hasText: "Category" }).locator(".sw-select__selection");
3718
+ this.productSelectionList = page.locator(".sw-select").filter({ hasText: "Product" }).locator(".sw-select__selection");
3719
+ this.landingPageSelectionList = page.locator(".sw-select").filter({ hasText: "Landing page" }).locator(".sw-select__selection");
3720
+ this.filtersResultPopoverItemList = page.locator(".sw-select-result-list__content").getByRole("listitem");
3721
+ this.filterResultPopoverTreeCheckboxItemList = page.locator(".sw-tree__content").getByRole("checkbox");
3722
+ this.openInNewTabCheckbox = page.getByRole("checkbox", { name: "Open in new tab" });
3723
+ }
3724
+ async getLandingPageByName(landingPageName) {
3725
+ return this.landingPageItems.locator(`text="${landingPageName}"`);
3634
3726
  }
3635
3727
  url() {
3636
3728
  return `#/sw/category/index`;
3637
3729
  }
3638
3730
  }
3639
3731
 
3732
+ var __defProp$6 = Object.defineProperty;
3733
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3734
+ var __publicField$6 = (obj, key, value) => {
3735
+ __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
3736
+ return value;
3737
+ };
3738
+ class RuleDetail {
3739
+ constructor(page) {
3740
+ this.page = page;
3741
+ __publicField$6(this, "nameInput");
3742
+ __publicField$6(this, "priorityInput");
3743
+ __publicField$6(this, "conditionTypeSelectionInput");
3744
+ __publicField$6(this, "conditionValueSelectionInput");
3745
+ __publicField$6(this, "filtersResultPopoverSelectionList");
3746
+ this.nameInput = page.getByLabel("Name");
3747
+ this.priorityInput = page.getByLabel("Priority");
3748
+ this.conditionTypeSelectionInput = page.locator(".sw-condition-type-select").locator(".sw-single-select__selection");
3749
+ this.conditionValueSelectionInput = page.locator(".sw-condition__value-content").locator(".sw-entity-single-select__selection");
3750
+ this.filtersResultPopoverSelectionList = page.locator(".sw-select-result-list__content").getByRole("listitem");
3751
+ }
3752
+ url(ruleId, tabName = "base") {
3753
+ return `#/sw/settings/rule/detail/${ruleId}/${tabName}`;
3754
+ }
3755
+ }
3756
+
3757
+ var __defProp$5 = Object.defineProperty;
3758
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3759
+ var __publicField$5 = (obj, key, value) => {
3760
+ __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
3761
+ return value;
3762
+ };
3763
+ class CustomFieldListing {
3764
+ constructor(page) {
3765
+ this.page = page;
3766
+ __publicField$5(this, "addNewSetButton");
3767
+ __publicField$5(this, "customFieldRows");
3768
+ this.addNewSetButton = page.getByText("Add new set");
3769
+ this.customFieldRows = page.getByRole("row");
3770
+ }
3771
+ async getLineItemByCustomFieldSetName(customFieldSetName) {
3772
+ const lineItem = this.page.getByRole("row").filter({ hasText: customFieldSetName });
3773
+ const customFieldSetNameText = lineItem.getByText(customFieldSetName);
3774
+ const customFieldSetContextButton = lineItem.locator(".sw-context-button__button");
3775
+ const customFieldSetEditButton = this.page.locator(".sw-context-menu__content").getByRole("link", { name: "Edit" });
3776
+ const customFieldSetDeleteButton = this.page.locator(".sw-context-menu__content").getByRole("link", { name: "Delete" });
3777
+ const warningDialog = this.page.getByRole("dialog", { name: "Warning" });
3778
+ const warningDialogCancelButton = warningDialog.getByRole("button", { name: "Cancel" });
3779
+ const warningDialogDeleteButton = warningDialog.getByRole("button", { name: "Delete" });
3780
+ return {
3781
+ customFieldSetNameText,
3782
+ customFieldSetContextButton,
3783
+ customFieldSetEditButton,
3784
+ customFieldSetDeleteButton,
3785
+ warningDialog,
3786
+ warningDialogCancelButton,
3787
+ warningDialogDeleteButton
3788
+ };
3789
+ }
3790
+ url() {
3791
+ return `#/sw/settings/custom/field/index`;
3792
+ }
3793
+ }
3794
+
3795
+ var __defProp$4 = Object.defineProperty;
3796
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3797
+ var __publicField$4 = (obj, key, value) => {
3798
+ __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
3799
+ return value;
3800
+ };
3801
+ class CustomFieldCreate {
3802
+ constructor(page) {
3803
+ this.page = page;
3804
+ __publicField$4(this, "saveButton");
3805
+ __publicField$4(this, "cancelButton");
3806
+ __publicField$4(this, "technicalNameInput");
3807
+ __publicField$4(this, "positionInput");
3808
+ __publicField$4(this, "labelEnglishGBInput");
3809
+ __publicField$4(this, "assignToSelectionList");
3810
+ __publicField$4(this, "resultAssignToPopoverItemList");
3811
+ this.saveButton = page.getByRole("button", { name: "Save" });
3812
+ this.cancelButton = page.getByRole("button", { name: "Cancel" });
3813
+ this.technicalNameInput = page.getByLabel("Technical name");
3814
+ this.positionInput = page.getByLabel("Position");
3815
+ this.labelEnglishGBInput = page.getByLabel("Label (English (GB))");
3816
+ this.assignToSelectionList = page.locator(".sw-field").filter({ hasText: "Assign To" }).locator(".sw-select__selection");
3817
+ this.resultAssignToPopoverItemList = page.locator(".sw-select-result-list__content").getByRole("listitem");
3818
+ }
3819
+ url() {
3820
+ return `#/sw/settings/custom/field/create`;
3821
+ }
3822
+ }
3823
+
3824
+ var __defProp$3 = Object.defineProperty;
3825
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3826
+ var __publicField$3 = (obj, key, value) => {
3827
+ __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
3828
+ return value;
3829
+ };
3830
+ class CustomFieldDetail extends CustomFieldCreate {
3831
+ constructor(page) {
3832
+ super(page);
3833
+ this.page = page;
3834
+ __publicField$3(this, "newCustomFieldButton");
3835
+ __publicField$3(this, "customFieldEditDialog");
3836
+ __publicField$3(this, "newCustomFieldDialog");
3837
+ __publicField$3(this, "customFieldTechnicalNameInput");
3838
+ __publicField$3(this, "customFieldPositionInput");
3839
+ __publicField$3(this, "customFieldTypeSelectionList");
3840
+ __publicField$3(this, "customFieldModifyByStoreApiCheckbox");
3841
+ __publicField$3(this, "customFieldCancelButton");
3842
+ __publicField$3(this, "customFieldAddButton");
3843
+ __publicField$3(this, "customFieldEditApplyButton");
3844
+ __publicField$3(this, "customFieldLabelEnglishGBInput");
3845
+ __publicField$3(this, "customFieldPlaceholderEnglishGBInput");
3846
+ __publicField$3(this, "customFieldHelpTextEnglishGBInput");
3847
+ __publicField$3(this, "customFieldDeleteListButton");
3848
+ __publicField$3(this, "customFieldDeleteDialog");
3849
+ __publicField$3(this, "customFieldDeleteCancelButton");
3850
+ __publicField$3(this, "customFieldDeleteButton");
3851
+ this.newCustomFieldButton = page.getByRole("button", { name: "New custom field" });
3852
+ this.customFieldDeleteListButton = page.locator(".sw-custom-field-list__delete-button");
3853
+ this.newCustomFieldDialog = page.getByRole("dialog", { name: "New custom field" });
3854
+ this.customFieldAddButton = this.newCustomFieldDialog.getByRole("button", { name: "Add" });
3855
+ this.customFieldTechnicalNameInput = this.newCustomFieldDialog.getByLabel("Technical Name");
3856
+ this.customFieldPositionInput = this.newCustomFieldDialog.getByLabel("Position");
3857
+ this.customFieldTypeSelectionList = this.newCustomFieldDialog.getByLabel("Type");
3858
+ this.customFieldModifyByStoreApiCheckbox = this.newCustomFieldDialog.getByLabel("Modifiable via Store API");
3859
+ this.customFieldCancelButton = this.newCustomFieldDialog.getByRole("button", { name: "Cancel" });
3860
+ this.customFieldLabelEnglishGBInput = this.newCustomFieldDialog.getByLabel("Label (English (GB))");
3861
+ this.customFieldPlaceholderEnglishGBInput = this.newCustomFieldDialog.getByLabel("Placeholder (English (GB))");
3862
+ this.customFieldHelpTextEnglishGBInput = this.newCustomFieldDialog.getByLabel("Help text (English (GB))");
3863
+ this.customFieldEditDialog = page.getByRole("dialog", { name: "Edit custom field" });
3864
+ this.customFieldEditApplyButton = this.customFieldEditDialog.getByRole("button", { name: "Apply changes" });
3865
+ this.customFieldDeleteDialog = page.getByRole("dialog", { name: "Delete custom field" });
3866
+ this.customFieldDeleteCancelButton = this.customFieldDeleteDialog.getByRole("button", { name: "Cancel" });
3867
+ this.customFieldDeleteButton = this.customFieldDeleteDialog.getByRole("button", { name: "Delete" });
3868
+ }
3869
+ async getLineItemByCustomFieldName(customFieldName) {
3870
+ const lineItem = this.page.getByRole("row").filter({ hasText: customFieldName });
3871
+ const customFieldCheckbox = lineItem.locator(".icon--regular-checkmark-xxs");
3872
+ const customFieldLabelText = lineItem.getByRole("textbox");
3873
+ const customFieldContextButton = lineItem.locator(".sw-context-button__button");
3874
+ const customFieldEditButton = this.page.locator(".sw-context-menu__content").getByRole("link", { name: "Edit" });
3875
+ const customFieldDeleteButton = this.page.locator(".sw-context-menu__content").getByRole("link", { name: "Delete" });
3876
+ const warningDialog = this.page.getByRole("dialog", { name: "Delete custom field" });
3877
+ const warningDialogCancelButton = warningDialog.getByRole("button", { name: "Cancel" });
3878
+ const warningDialogDeleteButton = warningDialog.getByRole("button", { name: "Delete" });
3879
+ return {
3880
+ customFieldLabelText,
3881
+ customFieldCheckbox,
3882
+ customFieldContextButton,
3883
+ customFieldEditButton,
3884
+ customFieldDeleteButton,
3885
+ warningDialog,
3886
+ warningDialogCancelButton,
3887
+ warningDialogDeleteButton
3888
+ };
3889
+ }
3890
+ url(customFieldUuid) {
3891
+ return `#/sw/settings/custom/field/detail/${customFieldUuid}`;
3892
+ }
3893
+ }
3894
+
3895
+ var __defProp$2 = Object.defineProperty;
3896
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3897
+ var __publicField$2 = (obj, key, value) => {
3898
+ __defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
3899
+ return value;
3900
+ };
3901
+ class CategoryDetail {
3902
+ constructor(page) {
3903
+ this.page = page;
3904
+ __publicField$2(this, "saveButton");
3905
+ __publicField$2(this, "cancelButton");
3906
+ __publicField$2(this, "customFieldCard");
3907
+ __publicField$2(this, "customFieldSetTabs");
3908
+ __publicField$2(this, "customFieldSetTabCustomContent");
3909
+ this.saveButton = page.getByRole("button", { name: "Save" });
3910
+ this.cancelButton = page.getByRole("button", { name: "Cancel" });
3911
+ this.customFieldCard = page.locator(".sw-card").getByText("Custom fields");
3912
+ this.customFieldSetTabs = this.customFieldCard.locator(".sw-tabs-item");
3913
+ this.customFieldSetTabCustomContent = this.customFieldCard.locator(".sw-tabs__custom-content");
3914
+ }
3915
+ async getCustomFieldSetCardContentByName(customFieldSetName) {
3916
+ const customFieldCard = this.page.locator(".sw-card").filter({ hasText: "Custom fields" });
3917
+ const customFieldSetTab = customFieldCard.getByText(customFieldSetName);
3918
+ const customFieldSetTabCustomContent = customFieldCard.locator(`.sw-custom-field-set-renderer-tab-content__${customFieldSetName}`);
3919
+ return {
3920
+ customFieldSetTab,
3921
+ customFieldSetTabCustomContent
3922
+ };
3923
+ }
3924
+ url(categoryUuid) {
3925
+ return `#/sw/category/index/${categoryUuid}/base`;
3926
+ }
3927
+ }
3928
+
3640
3929
  var __defProp$1 = Object.defineProperty;
3641
3930
  var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3642
3931
  var __publicField$1 = (obj, key, value) => {
3643
3932
  __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
3644
3933
  return value;
3645
3934
  };
3646
- class RuleDetail {
3935
+ class RuleCreate {
3647
3936
  constructor(page) {
3648
3937
  this.page = page;
3649
3938
  __publicField$1(this, "nameInput");
3650
3939
  __publicField$1(this, "priorityInput");
3940
+ __publicField$1(this, "conditionTypeSelectionInput");
3941
+ __publicField$1(this, "conditionValueSelectionInput");
3942
+ __publicField$1(this, "filtersResultPopoverSelectionList");
3943
+ __publicField$1(this, "saveButton");
3944
+ __publicField$1(this, "cancelButton");
3651
3945
  this.nameInput = page.getByLabel("Name");
3652
3946
  this.priorityInput = page.getByLabel("Priority");
3947
+ this.conditionTypeSelectionInput = page.locator(".sw-condition-type-select").locator(".sw-single-select__selection");
3948
+ this.conditionValueSelectionInput = page.locator(".sw-condition__value-content").locator(".sw-entity-single-select__selection");
3949
+ this.filtersResultPopoverSelectionList = page.locator(".sw-select-result-list__content").getByRole("listitem");
3950
+ this.saveButton = page.getByRole("button", { name: "Save" });
3951
+ this.cancelButton = page.getByRole("button", { name: "Cancel" });
3653
3952
  }
3654
- url(ruleId, tabName = "base") {
3655
- return `#/sw/settings/rule/detail/${ruleId}/${tabName}`;
3953
+ url() {
3954
+ return `#/sw/settings/rule/create/base`;
3656
3955
  }
3657
3956
  }
3658
3957
 
@@ -3668,9 +3967,14 @@ const AdminPageObjects = {
3668
3967
  DataSharing,
3669
3968
  ShippingListing,
3670
3969
  Categories,
3970
+ CategoryDetail,
3671
3971
  LandingPageCreate,
3672
3972
  LandingPageDetail,
3673
- RuleDetail
3973
+ RuleDetail,
3974
+ RuleCreate,
3975
+ CustomFieldListing,
3976
+ CustomFieldCreate,
3977
+ CustomFieldDetail
3674
3978
  };
3675
3979
  const test$5 = test$e.extend({
3676
3980
  AdminProductDetail: async ({ AdminPage }, use) => {
@@ -3706,6 +4010,9 @@ const test$5 = test$e.extend({
3706
4010
  AdminCategories: async ({ AdminPage }, use) => {
3707
4011
  await use(new Categories(AdminPage));
3708
4012
  },
4013
+ AdminCategoryDetail: async ({ AdminPage }, use) => {
4014
+ await use(new CategoryDetail(AdminPage));
4015
+ },
3709
4016
  AdminLandingPageDetail: async ({ AdminPage }, use) => {
3710
4017
  await use(new LandingPageDetail(AdminPage));
3711
4018
  },
@@ -3714,6 +4021,18 @@ const test$5 = test$e.extend({
3714
4021
  },
3715
4022
  AdminRuleDetail: async ({ AdminPage }, use) => {
3716
4023
  await use(new RuleDetail(AdminPage));
4024
+ },
4025
+ AdminRuleCreate: async ({ AdminPage }, use) => {
4026
+ await use(new RuleCreate(AdminPage));
4027
+ },
4028
+ AdminCustomFieldListing: async ({ AdminPage }, use) => {
4029
+ await use(new CustomFieldListing(AdminPage));
4030
+ },
4031
+ AdminCustomFieldCreate: async ({ AdminPage }, use) => {
4032
+ await use(new CustomFieldCreate(AdminPage));
4033
+ },
4034
+ AdminCustomFieldDetail: async ({ AdminPage }, use) => {
4035
+ await use(new CustomFieldDetail(AdminPage));
3717
4036
  }
3718
4037
  });
3719
4038