@shopware-ag/acceptance-test-suite 11.3.3 → 11.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -367,6 +367,9 @@ type CustomField = Omit<components['schemas']['CustomField'], 'config'> & {
367
367
  };
368
368
  };
369
369
  };
370
+ type Tax = components['schemas']['Tax'] & {
371
+ id: string;
372
+ };
370
373
  declare enum RuleType {
371
374
  shippingAvailability = "shippingMethodAvailabilityRule",
372
375
  taxAvailability = "taxProviderAvailabilityRule",
@@ -691,6 +694,12 @@ declare class TestDataService {
691
694
  * @param overrides - Specific data overrides that will be applied to the sales channel domain data struct.
692
695
  */
693
696
  createSalesChannelDomain(overrides?: Partial<SalesChannelDomain>): Promise<SalesChannelDomain>;
697
+ /**
698
+ * Creates a new tax rate (19%) with a random name.
699
+ *
700
+ * @param overrides - Specific data overrides that will be applied to the tax data struct.
701
+ */
702
+ createTaxRate(overrides?: Partial<Tax>): Promise<Tax>;
694
703
  /**
695
704
  * Assigns a media resource as the download of a digital product.
696
705
  *
@@ -1041,6 +1050,7 @@ declare class TestDataService {
1041
1050
  getBasicCustomFieldSetStruct(overrides?: Partial<CustomFieldSet>): Partial<CustomFieldSet>;
1042
1051
  getBasicCustomFieldStruct(overrides?: Partial<CustomField>): Partial<CustomField>;
1043
1052
  getSalesChannelDomainStruct(salesChannelId: string, currencyId: string, languageId: string, snippetSetId: string, overrides?: Partial<SalesChannelDomain>): Partial<SalesChannelDomain>;
1053
+ getTaxStruct(overrides: Partial<Tax>): Partial<Tax>;
1044
1054
  }
1045
1055
 
1046
1056
  interface TestDataFixtureTypes {
@@ -1375,8 +1385,10 @@ declare class SearchSuggest extends Home implements PageObject {
1375
1385
  readonly searchSuggestLineItemName: Locator;
1376
1386
  readonly searchSuggestLineItemPrice: Locator;
1377
1387
  readonly searchSuggestTotalLink: Locator;
1388
+ readonly searchResultTotal: Locator;
1378
1389
  readonly searchHeadline: Locator;
1379
1390
  constructor(page: Page);
1391
+ getTotalSearchResultCount(): Promise<number>;
1380
1392
  url(searchTerm?: string): string;
1381
1393
  }
1382
1394
 
@@ -2331,8 +2343,10 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
2331
2343
  OpenSearchResultPage: Task;
2332
2344
  } & {
2333
2345
  OpenSearchSuggestPage: Task;
2346
+ } & {
2347
+ SearchForTerm: Task;
2334
2348
  } & {
2335
2349
  ValidateAccessibility: (pageName: string, assertViolations?: number | boolean | undefined, createReport?: boolean | undefined, ruleTags?: string[] | undefined, outputDir?: string | undefined) => () => Promise<axe_core.Result[]>;
2336
2350
  }, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
2337
2351
 
2338
- export { type AccountData, AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CategoryCustomizableLinkData, type CategoryData, type CmsPage, type Country, type CreatedRecord, type Currency$1 as Currency, type CustomField, type CustomFieldData, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Language$1 as Language, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type Rule, type RuleAssignmentEntity, RuleType, type SalesChannel, type SalesChannelAnalytics, type SalesChannelDomain, type SalesChannelRecord, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type TagData, type Task, type TaxRules, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
2352
+ export { type AccountData, AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CategoryCustomizableLinkData, type CategoryData, type CmsPage, type Country, type CreatedRecord, type Currency$1 as Currency, type CustomField, type CustomFieldData, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Language$1 as Language, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type Rule, type RuleAssignmentEntity, RuleType, type SalesChannel, type SalesChannelAnalytics, type SalesChannelDomain, type SalesChannelRecord, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type TagData, type Task, type Tax, type TaxRules, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
package/dist/index.d.ts CHANGED
@@ -367,6 +367,9 @@ type CustomField = Omit<components['schemas']['CustomField'], 'config'> & {
367
367
  };
368
368
  };
369
369
  };
370
+ type Tax = components['schemas']['Tax'] & {
371
+ id: string;
372
+ };
370
373
  declare enum RuleType {
371
374
  shippingAvailability = "shippingMethodAvailabilityRule",
372
375
  taxAvailability = "taxProviderAvailabilityRule",
@@ -691,6 +694,12 @@ declare class TestDataService {
691
694
  * @param overrides - Specific data overrides that will be applied to the sales channel domain data struct.
692
695
  */
693
696
  createSalesChannelDomain(overrides?: Partial<SalesChannelDomain>): Promise<SalesChannelDomain>;
697
+ /**
698
+ * Creates a new tax rate (19%) with a random name.
699
+ *
700
+ * @param overrides - Specific data overrides that will be applied to the tax data struct.
701
+ */
702
+ createTaxRate(overrides?: Partial<Tax>): Promise<Tax>;
694
703
  /**
695
704
  * Assigns a media resource as the download of a digital product.
696
705
  *
@@ -1041,6 +1050,7 @@ declare class TestDataService {
1041
1050
  getBasicCustomFieldSetStruct(overrides?: Partial<CustomFieldSet>): Partial<CustomFieldSet>;
1042
1051
  getBasicCustomFieldStruct(overrides?: Partial<CustomField>): Partial<CustomField>;
1043
1052
  getSalesChannelDomainStruct(salesChannelId: string, currencyId: string, languageId: string, snippetSetId: string, overrides?: Partial<SalesChannelDomain>): Partial<SalesChannelDomain>;
1053
+ getTaxStruct(overrides: Partial<Tax>): Partial<Tax>;
1044
1054
  }
1045
1055
 
1046
1056
  interface TestDataFixtureTypes {
@@ -1375,8 +1385,10 @@ declare class SearchSuggest extends Home implements PageObject {
1375
1385
  readonly searchSuggestLineItemName: Locator;
1376
1386
  readonly searchSuggestLineItemPrice: Locator;
1377
1387
  readonly searchSuggestTotalLink: Locator;
1388
+ readonly searchResultTotal: Locator;
1378
1389
  readonly searchHeadline: Locator;
1379
1390
  constructor(page: Page);
1391
+ getTotalSearchResultCount(): Promise<number>;
1380
1392
  url(searchTerm?: string): string;
1381
1393
  }
1382
1394
 
@@ -2331,8 +2343,10 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
2331
2343
  OpenSearchResultPage: Task;
2332
2344
  } & {
2333
2345
  OpenSearchSuggestPage: Task;
2346
+ } & {
2347
+ SearchForTerm: Task;
2334
2348
  } & {
2335
2349
  ValidateAccessibility: (pageName: string, assertViolations?: number | boolean | undefined, createReport?: boolean | undefined, ruleTags?: string[] | undefined, outputDir?: string | undefined) => () => Promise<axe_core.Result[]>;
2336
2350
  }, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
2337
2351
 
2338
- export { type AccountData, AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CategoryCustomizableLinkData, type CategoryData, type CmsPage, type Country, type CreatedRecord, type Currency$1 as Currency, type CustomField, type CustomFieldData, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Language$1 as Language, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type Rule, type RuleAssignmentEntity, RuleType, type SalesChannel, type SalesChannelAnalytics, type SalesChannelDomain, type SalesChannelRecord, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type TagData, type Task, type TaxRules, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
2352
+ export { type AccountData, AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CategoryCustomizableLinkData, type CategoryData, type CmsPage, type Country, type CreatedRecord, type Currency$1 as Currency, type CustomField, type CustomFieldData, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Language$1 as Language, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type Rule, type RuleAssignmentEntity, RuleType, type SalesChannel, type SalesChannelAnalytics, type SalesChannelDomain, type SalesChannelRecord, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type TagData, type Task, type Tax, type TaxRules, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
package/dist/index.mjs CHANGED
@@ -440,7 +440,7 @@ const _AdminApiContext = class _AdminApiContext {
440
440
  grant_type: "client_credentials",
441
441
  client_id: options.client_id,
442
442
  client_secret: options.client_secret,
443
- scope: ["write"]
443
+ scope: "write"
444
444
  }
445
445
  });
446
446
  const authData = await authResponse.json();
@@ -456,7 +456,7 @@ const _AdminApiContext = class _AdminApiContext {
456
456
  grant_type: "password",
457
457
  username: options.admin_username,
458
458
  password: options.admin_password,
459
- scope: ["write"]
459
+ scope: "write"
460
460
  }
461
461
  });
462
462
  const authData = await authResponse.json();
@@ -1238,16 +1238,20 @@ class TestDataService {
1238
1238
  description: "Color",
1239
1239
  displayType: "color",
1240
1240
  sortingType: "name",
1241
- options: [{
1242
- name: "Blue",
1243
- colorHexCode: "#2148d6"
1244
- }, {
1245
- name: "Red",
1246
- colorHexCode: "#bf0f2a"
1247
- }, {
1248
- name: "Green",
1249
- colorHexCode: "#12bf0f"
1250
- }]
1241
+ options: [
1242
+ {
1243
+ name: "Blue",
1244
+ colorHexCode: "#2148d6"
1245
+ },
1246
+ {
1247
+ name: "Red",
1248
+ colorHexCode: "#bf0f2a"
1249
+ },
1250
+ {
1251
+ name: "Green",
1252
+ colorHexCode: "#12bf0f"
1253
+ }
1254
+ ]
1251
1255
  };
1252
1256
  const propertyGroupResponse = await this.AdminApiClient.post("property-group?_response=detail", {
1253
1257
  data: Object.assign({}, colorPropertyGroup, overrides)
@@ -1269,13 +1273,17 @@ class TestDataService {
1269
1273
  description: "Size",
1270
1274
  displayType: "text",
1271
1275
  sortingType: "name",
1272
- options: [{
1273
- name: "Small"
1274
- }, {
1275
- name: "Medium"
1276
- }, {
1277
- name: "Large"
1278
- }]
1276
+ options: [
1277
+ {
1278
+ name: "Small"
1279
+ },
1280
+ {
1281
+ name: "Medium"
1282
+ },
1283
+ {
1284
+ name: "Large"
1285
+ }
1286
+ ]
1279
1287
  };
1280
1288
  const propertyGroupResponse = await this.AdminApiClient.post("property-group?_response=detail", {
1281
1289
  data: Object.assign({}, textPropertyGroup, overrides)
@@ -1329,7 +1337,10 @@ class TestDataService {
1329
1337
  if (typeof basicCustomerStruct.password !== "string") {
1330
1338
  customer = { ...customerData.data };
1331
1339
  } else {
1332
- customer = { ...customerData.data, password: basicCustomerStruct.password };
1340
+ customer = {
1341
+ ...customerData.data,
1342
+ password: basicCustomerStruct.password
1343
+ };
1333
1344
  }
1334
1345
  this.addCreatedRecord("customer", customer.id);
1335
1346
  return customer;
@@ -1427,10 +1438,7 @@ class TestDataService {
1427
1438
  async createBasicShippingMethod(overrides = {}) {
1428
1439
  const deliveryTime = await this.getAllDeliveryTimeResources();
1429
1440
  overrides.availabilityRuleId ?? (overrides.availabilityRuleId = (await this.getRule("Always valid (Default)")).id);
1430
- const basicShippingMethod = this.getBasicShippingMethodStruct(
1431
- deliveryTime[0].id,
1432
- overrides
1433
- );
1441
+ const basicShippingMethod = this.getBasicShippingMethodStruct(deliveryTime[0].id, overrides);
1434
1442
  const shippingMethodResponse = await this.AdminApiClient.post("shipping-method?_response=detail", {
1435
1443
  data: basicShippingMethod
1436
1444
  });
@@ -1607,6 +1615,21 @@ class TestDataService {
1607
1615
  this.addCreatedRecord("sales_channel_domain", salesChannelDomain.id);
1608
1616
  return salesChannelDomain;
1609
1617
  }
1618
+ /**
1619
+ * Creates a new tax rate (19%) with a random name.
1620
+ *
1621
+ * @param overrides - Specific data overrides that will be applied to the tax data struct.
1622
+ */
1623
+ async createTaxRate(overrides = {}) {
1624
+ const taxStruct = this.getTaxStruct(overrides);
1625
+ const response = await this.AdminApiClient.post("tax?_response=detail", {
1626
+ data: taxStruct
1627
+ });
1628
+ expect(response.ok()).toBeTruthy();
1629
+ const { data: tax } = await response.json();
1630
+ this.addCreatedRecord("tax", tax.id);
1631
+ return tax;
1632
+ }
1610
1633
  /**
1611
1634
  * Assigns a media resource as the download of a digital product.
1612
1635
  *
@@ -1708,9 +1731,11 @@ class TestDataService {
1708
1731
  async assignProductCategory(productId, categoryId) {
1709
1732
  return await this.AdminApiClient.patch(`product/${productId}?_response=basic`, {
1710
1733
  data: {
1711
- categories: [{
1712
- id: categoryId
1713
- }]
1734
+ categories: [
1735
+ {
1736
+ id: categoryId
1737
+ }
1738
+ ]
1714
1739
  }
1715
1740
  });
1716
1741
  }
@@ -1723,9 +1748,11 @@ class TestDataService {
1723
1748
  async assignProductTag(productId, tagId) {
1724
1749
  return await this.AdminApiClient.patch(`product/${productId}?_response=basic`, {
1725
1750
  data: {
1726
- tags: [{
1727
- id: tagId
1728
- }]
1751
+ tags: [
1752
+ {
1753
+ id: tagId
1754
+ }
1755
+ ]
1729
1756
  }
1730
1757
  });
1731
1758
  }
@@ -1779,7 +1806,10 @@ class TestDataService {
1779
1806
  });
1780
1807
  expect(syncSalesChannelResponse.ok()).toBeTruthy();
1781
1808
  const { data: salesChannel } = await syncSalesChannelResponse.json();
1782
- this.addCreatedRecord("sales_channel_currency", { salesChannelId, currencyId });
1809
+ this.addCreatedRecord("sales_channel_currency", {
1810
+ salesChannelId,
1811
+ currencyId
1812
+ });
1783
1813
  return salesChannel;
1784
1814
  }
1785
1815
  /**
@@ -1831,7 +1861,10 @@ class TestDataService {
1831
1861
  });
1832
1862
  expect(syncSalesChannelResponse.ok()).toBeTruthy();
1833
1863
  const { data: salesChannel } = await syncSalesChannelResponse.json();
1834
- this.addCreatedRecord("sales_channel_country", { salesChannelId, countryId });
1864
+ this.addCreatedRecord("sales_channel_country", {
1865
+ salesChannelId,
1866
+ countryId
1867
+ });
1835
1868
  return salesChannel;
1836
1869
  }
1837
1870
  /**
@@ -1857,7 +1890,10 @@ class TestDataService {
1857
1890
  });
1858
1891
  expect(syncSalesChannelResponse.ok()).toBeTruthy();
1859
1892
  const { data: salesChannel } = await syncSalesChannelResponse.json();
1860
- this.addCreatedRecord("sales_channel_language", { salesChannelId, languageId });
1893
+ this.addCreatedRecord("sales_channel_language", {
1894
+ salesChannelId,
1895
+ languageId
1896
+ });
1861
1897
  return salesChannel;
1862
1898
  }
1863
1899
  /**
@@ -1908,11 +1944,13 @@ class TestDataService {
1908
1944
  const currencyResponse = await this.AdminApiClient.post("search/currency", {
1909
1945
  data: {
1910
1946
  limit: 1,
1911
- filter: [{
1912
- type: "equals",
1913
- field: "isoCode",
1914
- value: isoCode
1915
- }]
1947
+ filter: [
1948
+ {
1949
+ type: "equals",
1950
+ field: "isoCode",
1951
+ value: isoCode
1952
+ }
1953
+ ]
1916
1954
  }
1917
1955
  });
1918
1956
  expect(currencyResponse.ok()).toBeTruthy();
@@ -1928,11 +1966,13 @@ class TestDataService {
1928
1966
  const response = await this.AdminApiClient.post("search/rule", {
1929
1967
  data: {
1930
1968
  limit: 1,
1931
- filter: [{
1932
- type: "equals",
1933
- field: "name",
1934
- value: name
1935
- }]
1969
+ filter: [
1970
+ {
1971
+ type: "equals",
1972
+ field: "name",
1973
+ value: name
1974
+ }
1975
+ ]
1936
1976
  }
1937
1977
  });
1938
1978
  expect(response.ok()).toBeTruthy();
@@ -1948,11 +1988,13 @@ class TestDataService {
1948
1988
  const response = await this.AdminApiClient.post("search/shipping-method", {
1949
1989
  data: {
1950
1990
  limit: 1,
1951
- filter: [{
1952
- type: "equals",
1953
- field: "name",
1954
- value: name
1955
- }]
1991
+ filter: [
1992
+ {
1993
+ type: "equals",
1994
+ field: "name",
1995
+ value: name
1996
+ }
1997
+ ]
1956
1998
  }
1957
1999
  });
1958
2000
  expect(response.ok()).toBeTruthy();
@@ -1977,11 +2019,13 @@ class TestDataService {
1977
2019
  const response = await this.AdminApiClient.post("search/payment-method", {
1978
2020
  data: {
1979
2021
  limit: 1,
1980
- filter: [{
1981
- type: "equals",
1982
- field: "name",
1983
- value: name
1984
- }]
2022
+ filter: [
2023
+ {
2024
+ type: "equals",
2025
+ field: "name",
2026
+ value: name
2027
+ }
2028
+ ]
1985
2029
  }
1986
2030
  });
1987
2031
  expect(response.ok()).toBeTruthy();
@@ -2008,11 +2052,13 @@ class TestDataService {
2008
2052
  const response = await this.AdminApiClient.post("search/salutation", {
2009
2053
  data: {
2010
2054
  limit: 1,
2011
- filter: [{
2012
- type: "equals",
2013
- field: "salutationKey",
2014
- value: key
2015
- }]
2055
+ filter: [
2056
+ {
2057
+ type: "equals",
2058
+ field: "salutationKey",
2059
+ value: key
2060
+ }
2061
+ ]
2016
2062
  }
2017
2063
  });
2018
2064
  expect(response.ok()).toBeTruthy();
@@ -2046,11 +2092,13 @@ class TestDataService {
2046
2092
  const response = await this.AdminApiClient.post("search/state-machine", {
2047
2093
  data: {
2048
2094
  limit: 1,
2049
- filter: [{
2050
- type: "equals",
2051
- field: "technicalName",
2052
- value: name
2053
- }]
2095
+ filter: [
2096
+ {
2097
+ type: "equals",
2098
+ field: "technicalName",
2099
+ value: name
2100
+ }
2101
+ ]
2054
2102
  }
2055
2103
  });
2056
2104
  expect(response.ok()).toBeTruthy();
@@ -2067,15 +2115,18 @@ class TestDataService {
2067
2115
  const response = await this.AdminApiClient.post("search/state-machine-state", {
2068
2116
  data: {
2069
2117
  limit: 1,
2070
- filter: [{
2071
- type: "equals",
2072
- field: "stateMachineId",
2073
- value: stateMachineId
2074
- }, {
2075
- type: "equals",
2076
- field: "technicalName",
2077
- value: stateName
2078
- }]
2118
+ filter: [
2119
+ {
2120
+ type: "equals",
2121
+ field: "stateMachineId",
2122
+ value: stateMachineId
2123
+ },
2124
+ {
2125
+ type: "equals",
2126
+ field: "technicalName",
2127
+ value: stateName
2128
+ }
2129
+ ]
2079
2130
  }
2080
2131
  });
2081
2132
  expect(response.ok()).toBeTruthy();
@@ -2091,11 +2142,13 @@ class TestDataService {
2091
2142
  const response = await this.AdminApiClient.post("search/property-group-option", {
2092
2143
  data: {
2093
2144
  limit: 50,
2094
- filter: [{
2095
- type: "equals",
2096
- field: "groupId",
2097
- value: propertyGroupId
2098
- }]
2145
+ filter: [
2146
+ {
2147
+ type: "equals",
2148
+ field: "groupId",
2149
+ value: propertyGroupId
2150
+ }
2151
+ ]
2099
2152
  }
2100
2153
  });
2101
2154
  expect(response.ok()).toBeTruthy();
@@ -2159,7 +2212,10 @@ class TestDataService {
2159
2212
  * @param field - The database field which has to be overridden
2160
2213
  */
2161
2214
  addCreatedSalesChannelRecord(salesChannelId, field) {
2162
- this.createdSalesChannelRecords.push({ salesChannelId, field });
2215
+ this.createdSalesChannelRecords.push({
2216
+ salesChannelId,
2217
+ field
2218
+ });
2163
2219
  }
2164
2220
  /**
2165
2221
  * Set the configuration of automated data clean up.
@@ -2244,11 +2300,13 @@ class TestDataService {
2244
2300
  const countryResponse = await this.AdminApiClient.post("search/country", {
2245
2301
  data: {
2246
2302
  limit: 1,
2247
- filter: [{
2248
- type: "equals",
2249
- field: "iso",
2250
- value: iso2
2251
- }]
2303
+ filter: [
2304
+ {
2305
+ type: "equals",
2306
+ field: "iso",
2307
+ value: iso2
2308
+ }
2309
+ ]
2252
2310
  }
2253
2311
  });
2254
2312
  const { data: result } = await countryResponse.json();
@@ -2325,17 +2383,21 @@ class TestDataService {
2325
2383
  };
2326
2384
  if (this.defaultCategoryId) {
2327
2385
  basicProduct = Object.assign({}, basicProduct, {
2328
- categories: [{
2329
- id: this.defaultCategoryId
2330
- }]
2386
+ categories: [
2387
+ {
2388
+ id: this.defaultCategoryId
2389
+ }
2390
+ ]
2331
2391
  });
2332
2392
  }
2333
2393
  if (this.defaultSalesChannel) {
2334
2394
  basicProduct = Object.assign({}, basicProduct, {
2335
- visibilities: [{
2336
- salesChannelId: this.defaultSalesChannel.id,
2337
- visibility: 30
2338
- }]
2395
+ visibilities: [
2396
+ {
2397
+ salesChannelId: this.defaultSalesChannel.id,
2398
+ visibility: 30
2399
+ }
2400
+ ]
2339
2401
  });
2340
2402
  }
2341
2403
  return Object.assign({}, basicProduct, overrides);
@@ -2392,27 +2454,32 @@ class TestDataService {
2392
2454
  ];
2393
2455
  return {
2394
2456
  price: p(100, 84.03),
2395
- prices: [{
2396
- ruleId,
2397
- price: p(100, 84.03),
2398
- quantityStart: 1,
2399
- quantityEnd: 10
2400
- }, {
2401
- ruleId,
2402
- price: p(90, 75.63),
2403
- quantityStart: 11,
2404
- quantityEnd: 20
2405
- }, {
2406
- ruleId,
2407
- price: p(80, 67.23),
2408
- quantityStart: 21,
2409
- quantityEnd: 50
2410
- }, {
2411
- ruleId,
2412
- price: p(70, 58.82),
2413
- quantityStart: 51,
2414
- quantityEnd: null
2415
- }]
2457
+ prices: [
2458
+ {
2459
+ ruleId,
2460
+ price: p(100, 84.03),
2461
+ quantityStart: 1,
2462
+ quantityEnd: 10
2463
+ },
2464
+ {
2465
+ ruleId,
2466
+ price: p(90, 75.63),
2467
+ quantityStart: 11,
2468
+ quantityEnd: 20
2469
+ },
2470
+ {
2471
+ ruleId,
2472
+ price: p(80, 67.23),
2473
+ quantityStart: 21,
2474
+ quantityEnd: 50
2475
+ },
2476
+ {
2477
+ ruleId,
2478
+ price: p(70, 58.82),
2479
+ quantityStart: 51,
2480
+ quantityEnd: null
2481
+ }
2482
+ ]
2416
2483
  };
2417
2484
  }
2418
2485
  getBasicManufacturerStruct(overrides = {}) {
@@ -2600,15 +2667,19 @@ class TestDataService {
2600
2667
  rawTotal: totalPrice,
2601
2668
  netPrice: totalPrice,
2602
2669
  taxStatus: "gross",
2603
- calculatedTaxes: [{
2604
- tax: 0,
2605
- taxRate: 0,
2606
- price: totalPrice
2607
- }],
2608
- taxRules: [{
2609
- taxRate: 0,
2610
- percentage: 100
2611
- }]
2670
+ calculatedTaxes: [
2671
+ {
2672
+ tax: 0,
2673
+ taxRate: 0,
2674
+ price: totalPrice
2675
+ }
2676
+ ],
2677
+ taxRules: [
2678
+ {
2679
+ taxRate: 0,
2680
+ percentage: 100
2681
+ }
2682
+ ]
2612
2683
  },
2613
2684
  orderCustomer: {
2614
2685
  customerId: customer.id,
@@ -2621,15 +2692,19 @@ class TestDataService {
2621
2692
  unitPrice: shippingCosts,
2622
2693
  totalPrice: shippingCosts,
2623
2694
  quantity: 1,
2624
- calculatedTaxes: [{
2625
- tax: 0,
2626
- taxRate: 0,
2627
- price: shippingCosts
2628
- }],
2629
- taxRules: [{
2630
- taxRate: 0,
2631
- percentage: 100
2632
- }]
2695
+ calculatedTaxes: [
2696
+ {
2697
+ tax: 0,
2698
+ taxRate: 0,
2699
+ price: shippingCosts
2700
+ }
2701
+ ],
2702
+ taxRules: [
2703
+ {
2704
+ taxRate: 0,
2705
+ percentage: 100
2706
+ }
2707
+ ]
2633
2708
  },
2634
2709
  lineItems: orderLineItems,
2635
2710
  deliveries: [orderDelivery],
@@ -2682,24 +2757,30 @@ class TestDataService {
2682
2757
  unitPrice,
2683
2758
  totalPrice,
2684
2759
  quantity: lineItem.quantity,
2685
- calculatedTaxes: [{
2686
- tax: 0,
2687
- taxRate: 0,
2688
- price: totalPrice
2689
- }],
2690
- taxRules: [{
2691
- taxRate: 0,
2692
- percentage: 100
2693
- }]
2760
+ calculatedTaxes: [
2761
+ {
2762
+ tax: 0,
2763
+ taxRate: 0,
2764
+ price: totalPrice
2765
+ }
2766
+ ],
2767
+ taxRules: [
2768
+ {
2769
+ taxRate: 0,
2770
+ percentage: 100
2771
+ }
2772
+ ]
2694
2773
  },
2695
2774
  priceDefinition: {
2696
2775
  type: "quantity",
2697
2776
  price: totalPrice,
2698
2777
  quantity: lineItem.quantity || 1,
2699
- taxRules: [{
2700
- taxRate: 0,
2701
- percentage: 100
2702
- }],
2778
+ taxRules: [
2779
+ {
2780
+ taxRate: 0,
2781
+ percentage: 100
2782
+ }
2783
+ ],
2703
2784
  listPrice: 8,
2704
2785
  isCalculated: true,
2705
2786
  referencePriceDefinition: null
@@ -2733,15 +2814,19 @@ class TestDataService {
2733
2814
  unitPrice,
2734
2815
  totalPrice,
2735
2816
  quantity: lineItem.quantity,
2736
- calculatedTaxes: [{
2737
- tax: 0,
2738
- taxRate: 0,
2739
- price: totalPrice
2740
- }],
2741
- taxRules: [{
2742
- taxRate: 0,
2743
- percentage: 100
2744
- }]
2817
+ calculatedTaxes: [
2818
+ {
2819
+ tax: 0,
2820
+ taxRate: 0,
2821
+ price: totalPrice
2822
+ }
2823
+ ],
2824
+ taxRules: [
2825
+ {
2826
+ taxRate: 0,
2827
+ percentage: 100
2828
+ }
2829
+ ]
2745
2830
  },
2746
2831
  priceDefinition: {
2747
2832
  type: promotionDiscountType,
@@ -2767,16 +2852,20 @@ class TestDataService {
2767
2852
  preventCombination: true,
2768
2853
  customerRestriction: false,
2769
2854
  code: promotionCode,
2770
- discounts: [{
2771
- scope: "cart",
2772
- type: "percentage",
2773
- value: 10,
2774
- considerAdvancedRules: false
2775
- }],
2776
- salesChannels: [{
2777
- salesChannelId,
2778
- priority: 1
2779
- }]
2855
+ discounts: [
2856
+ {
2857
+ scope: "cart",
2858
+ type: "percentage",
2859
+ value: 10,
2860
+ considerAdvancedRules: false
2861
+ }
2862
+ ],
2863
+ salesChannels: [
2864
+ {
2865
+ salesChannelId,
2866
+ priority: 1
2867
+ }
2868
+ ]
2780
2869
  };
2781
2870
  return Object.assign({}, basicPromotion, overrides);
2782
2871
  }
@@ -2827,9 +2916,11 @@ class TestDataService {
2827
2916
  registrationSeoMetaDescription: `${customerGroupName}-SEO-Description`,
2828
2917
  registrationOnlyCompanyRegistration: false,
2829
2918
  customFields: {},
2830
- registrationSalesChannels: [{
2831
- id: this.defaultSalesChannel.id
2832
- }]
2919
+ registrationSalesChannels: [
2920
+ {
2921
+ id: this.defaultSalesChannel.id
2922
+ }
2923
+ ]
2833
2924
  };
2834
2925
  return Object.assign({}, basicCustomerGroup, overrides);
2835
2926
  }
@@ -2906,6 +2997,16 @@ class TestDataService {
2906
2997
  };
2907
2998
  return Object.assign({}, basicSalesChannelDomain, overrides);
2908
2999
  }
3000
+ getTaxStruct(overrides) {
3001
+ const taxUuid = this.IdProvider.getIdPair().uuid;
3002
+ const taxName = `${this.namePrefix}Tax-${taxUuid}${this.nameSuffix}`;
3003
+ const basicTaxStruct = {
3004
+ id: taxUuid,
3005
+ name: taxName,
3006
+ taxRate: 19
3007
+ };
3008
+ return Object.assign({}, basicTaxStruct, overrides);
3009
+ }
2909
3010
  }
2910
3011
 
2911
3012
  const test$8 = test$e.extend({
@@ -3054,7 +3155,7 @@ class Home {
3054
3155
  this.accountMenuButton = page.getByLabel("Your account");
3055
3156
  this.closeGuestSessionButton = page.locator(".account-aside-btn");
3056
3157
  this.productImages = page.locator(".product-image-wrapper");
3057
- this.productListItems = page.getByRole("listitem");
3158
+ this.productListItems = page.locator(".product-box");
3058
3159
  this.languagesDropdown = page.locator(".top-bar-language").filter({ has: page.getByRole("button") });
3059
3160
  this.languagesMenuOptions = page.locator(".top-bar-language").filter({ has: page.getByRole("list") });
3060
3161
  this.currenciesDropdown = page.locator(".top-bar-currency").filter({ has: page.getByRole("button") });
@@ -3776,6 +3877,7 @@ class SearchSuggest extends Home {
3776
3877
  __publicField$z(this, "searchSuggestLineItemName");
3777
3878
  __publicField$z(this, "searchSuggestLineItemPrice");
3778
3879
  __publicField$z(this, "searchSuggestTotalLink");
3880
+ __publicField$z(this, "searchResultTotal");
3779
3881
  __publicField$z(this, "searchHeadline");
3780
3882
  this.searchSuggestLineItemImages = page.locator(".search-suggest-product-image-container");
3781
3883
  this.searchInput = page.locator(".header-search-input");
@@ -3784,8 +3886,13 @@ class SearchSuggest extends Home {
3784
3886
  this.searchSuggestLineItemName = page.locator(".search-suggest-product-name");
3785
3887
  this.searchSuggestLineItemPrice = page.locator(".col-auto.search-suggest-product-price");
3786
3888
  this.searchSuggestTotalLink = page.locator(".search-suggest-total-link");
3889
+ this.searchResultTotal = page.locator(".search-suggest-total-count");
3787
3890
  this.searchHeadline = page.locator(".search-headline");
3788
3891
  }
3892
+ async getTotalSearchResultCount() {
3893
+ const totalCountText = await this.searchResultTotal.textContent();
3894
+ return parseInt(totalCountText?.trim().replace(/\D/g, "") || "0", 10);
3895
+ }
3789
3896
  url(searchTerm) {
3790
3897
  return `suggest?search=${searchTerm}`;
3791
3898
  }
@@ -6855,6 +6962,18 @@ const OpenSearchSuggestPage = test$e.extend({
6855
6962
  }
6856
6963
  });
6857
6964
 
6965
+ const SearchForTerm = test$e.extend({
6966
+ SearchForTerm: async ({ StorefrontSearchSuggest }, use) => {
6967
+ const task = (searchTerm) => {
6968
+ return async function SearchForTerm2() {
6969
+ await StorefrontSearchSuggest.searchInput.fill(searchTerm);
6970
+ await StorefrontSearchSuggest.page.waitForResponse((response) => response.url().includes(`suggest?search=${searchTerm}`) && response.ok());
6971
+ };
6972
+ };
6973
+ await use(task);
6974
+ }
6975
+ });
6976
+
6858
6977
  const ValidateAccessibility = test$e.extend({
6859
6978
  ValidateAccessibility: async ({ ShopCustomer }, use) => {
6860
6979
  const task = (pageName, assertViolations = true, createReport = true, ruleTags = ["wcag2a", "wcag2aa", "wcag2aaa", "wcag21a", "wcag21aa", "best-practice"], outputDir = "test-results/AccessibilityReports") => {
@@ -6903,6 +7022,7 @@ const test$2 = mergeTests(
6903
7022
  SubmitOrder,
6904
7023
  OpenSearchResultPage,
6905
7024
  OpenSearchSuggestPage,
7025
+ SearchForTerm,
6906
7026
  ValidateAccessibility
6907
7027
  );
6908
7028
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "11.3.3",
3
+ "version": "11.4.0",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",