@shopware-ag/acceptance-test-suite 1.3.0 → 1.3.2

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
@@ -121,6 +121,7 @@ interface StoreBaseConfig {
121
121
  enGBLocaleId: string;
122
122
  enGBLanguageId: string;
123
123
  eurCurrencyId: string;
124
+ defaultCurrencyId: string;
124
125
  invoicePaymentMethodId: string;
125
126
  defaultShippingMethod: string;
126
127
  taxId: string;
package/dist/index.d.ts CHANGED
@@ -121,6 +121,7 @@ interface StoreBaseConfig {
121
121
  enGBLocaleId: string;
122
122
  enGBLanguageId: string;
123
123
  eurCurrencyId: string;
124
+ defaultCurrencyId: string;
124
125
  invoicePaymentMethodId: string;
125
126
  defaultShippingMethod: string;
126
127
  taxId: string;
package/dist/index.mjs CHANGED
@@ -218,6 +218,7 @@ const test$a = test$c.extend({
218
218
  enGBLanguageId: lang.id,
219
219
  storefrontTypeId: "8a243080f92e4c719546314b577cf82b",
220
220
  eurCurrencyId: currency.id,
221
+ defaultCurrencyId: "b7d2554b0ce847cd82f3ac9bd1c0dfca",
221
222
  invoicePaymentMethodId: await requests.invoicePaymentMethodId,
222
223
  defaultShippingMethod: await requests.defaultShippingMethod,
223
224
  taxId: await requests.getTaxId,
@@ -367,6 +368,7 @@ const test$a = test$c.extend({
367
368
  email: `customer_${id}@example.com`,
368
369
  password: "shopware",
369
370
  salutationId: salutations.data[0].id,
371
+ languageId: SalesChannelBaseConfig.enGBLanguageId,
370
372
  defaultShippingAddress: {
371
373
  firstName: `${id} admin`,
372
374
  lastName: `${id} admin`,
@@ -1600,6 +1602,12 @@ const ProductData = test$c.extend({
1600
1602
  gross: 10,
1601
1603
  linked: false,
1602
1604
  net: 8.4
1605
+ },
1606
+ {
1607
+ currencyId: SalesChannelBaseConfig.defaultCurrencyId,
1608
+ gross: 10,
1609
+ linked: false,
1610
+ net: 8.4
1603
1611
  }
1604
1612
  ],
1605
1613
  purchasePrices: [
@@ -1608,6 +1616,12 @@ const ProductData = test$c.extend({
1608
1616
  gross: 8,
1609
1617
  linked: false,
1610
1618
  net: 6.7
1619
+ },
1620
+ {
1621
+ currencyId: SalesChannelBaseConfig.defaultCurrencyId,
1622
+ gross: 8,
1623
+ linked: false,
1624
+ net: 6.7
1611
1625
  }
1612
1626
  ],
1613
1627
  visibilities: [
@@ -1659,48 +1673,7 @@ const CategoryData = test$c.extend({
1659
1673
  });
1660
1674
 
1661
1675
  const DigitalProductData = test$c.extend({
1662
- DigitalProductData: async ({ IdProvider, AdminApiContext, SalesChannelBaseConfig, DefaultSalesChannel }, use) => {
1663
- const { id: productId, uuid: productUuid } = IdProvider.getIdPair();
1664
- const productName = `Digital_Product_test_${productId}`;
1665
- const productResponse = await AdminApiContext.post("./product?_response", {
1666
- data: {
1667
- active: true,
1668
- stock: 10,
1669
- taxId: SalesChannelBaseConfig.taxId,
1670
- id: productUuid,
1671
- name: productName,
1672
- productNumber: "Product-" + productId,
1673
- price: [
1674
- {
1675
- currencyId: SalesChannelBaseConfig.eurCurrencyId,
1676
- gross: 10,
1677
- linked: false,
1678
- net: 8.4
1679
- }
1680
- ],
1681
- purchasePrices: [
1682
- {
1683
- currencyId: SalesChannelBaseConfig.eurCurrencyId,
1684
- gross: 8,
1685
- linked: false,
1686
- net: 6.7
1687
- }
1688
- ],
1689
- visibilities: [
1690
- {
1691
- salesChannelId: DefaultSalesChannel.salesChannel.id,
1692
- visibility: 30
1693
- }
1694
- ],
1695
- categories: [
1696
- {
1697
- id: DefaultSalesChannel.salesChannel.navigationCategoryId
1698
- }
1699
- ]
1700
- }
1701
- });
1702
- expect(productResponse.ok()).toBeTruthy();
1703
- const { data: productData } = await productResponse.json();
1676
+ DigitalProductData: async ({ ProductData, IdProvider, AdminApiContext }, use) => {
1704
1677
  const newMediaResource = await AdminApiContext.post("./media?_response", {
1705
1678
  data: {
1706
1679
  private: false
@@ -1720,41 +1693,37 @@ const DigitalProductData = test$c.extend({
1720
1693
  expect(newMediaUpload.ok()).toBeTruthy();
1721
1694
  const productDownloadResponse = await AdminApiContext.post(`./product-download?_response`, {
1722
1695
  data: {
1723
- productId: productData.id,
1696
+ productId: ProductData.id,
1724
1697
  mediaId: newMediaId
1725
1698
  }
1726
1699
  });
1727
1700
  expect(productDownloadResponse.ok()).toBeTruthy();
1728
1701
  const { data: productDownload } = await productDownloadResponse.json();
1729
1702
  const returnData = {
1730
- product: productData,
1703
+ product: ProductData,
1731
1704
  fileContent
1732
1705
  };
1733
1706
  await use(returnData);
1734
1707
  const orderSearchResponse = await AdminApiContext.post("./search/order", {
1735
1708
  data: {
1736
1709
  limit: 10,
1737
- filter: [
1738
- {
1739
- type: "equals",
1740
- field: "lineItems.productId",
1741
- value: productData.id
1742
- }
1743
- ]
1710
+ filter: [{
1711
+ type: "equals",
1712
+ field: "lineItems.productId",
1713
+ value: ProductData.id
1714
+ }]
1744
1715
  }
1745
1716
  });
1746
1717
  expect(orderSearchResponse.ok()).toBeTruthy();
1747
1718
  const { data: ordersWithDigitalProduct } = await orderSearchResponse.json();
1748
1719
  for (const order of ordersWithDigitalProduct) {
1749
1720
  const deleteOrderResponse = await AdminApiContext.delete(`./order/${order.id}`);
1750
- expect(deleteOrderResponse.ok()).toBeTruthy();
1721
+ expect(deleteOrderResponse.status()).toBeLessThan(500);
1751
1722
  }
1752
1723
  const unlinkMediaResponse = await AdminApiContext.delete(`./product-download/${productDownload.id}`);
1753
1724
  expect(unlinkMediaResponse.ok()).toBeTruthy();
1754
1725
  const cleanupMediaResponse = await AdminApiContext.delete(`./media/${newMediaId}`);
1755
1726
  expect(cleanupMediaResponse.ok()).toBeTruthy();
1756
- const cleanupResponse = await AdminApiContext.delete(`./product/${productUuid}`);
1757
- expect(cleanupResponse.ok()).toBeTruthy();
1758
1727
  }
1759
1728
  });
1760
1729
 
@@ -2145,7 +2114,7 @@ const OrderData = test$c.extend({
2145
2114
  const { data: order } = await orderResponse.json();
2146
2115
  await use(order);
2147
2116
  const cleanupResponse = await AdminApiContext.delete(`./order/${order.id}`);
2148
- expect(cleanupResponse.ok()).toBeTruthy();
2117
+ expect(cleanupResponse.status()).toBeLessThan(500);
2149
2118
  }
2150
2119
  });
2151
2120
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",