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

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.
Files changed (2) hide show
  1. package/dist/index.mjs +11 -55
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -367,6 +367,7 @@ const test$a = test$c.extend({
367
367
  email: `customer_${id}@example.com`,
368
368
  password: "shopware",
369
369
  salutationId: salutations.data[0].id,
370
+ languageId: SalesChannelBaseConfig.enGBLanguageId,
370
371
  defaultShippingAddress: {
371
372
  firstName: `${id} admin`,
372
373
  lastName: `${id} admin`,
@@ -1659,48 +1660,7 @@ const CategoryData = test$c.extend({
1659
1660
  });
1660
1661
 
1661
1662
  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();
1663
+ DigitalProductData: async ({ ProductData, IdProvider, AdminApiContext }, use) => {
1704
1664
  const newMediaResource = await AdminApiContext.post("./media?_response", {
1705
1665
  data: {
1706
1666
  private: false
@@ -1720,41 +1680,37 @@ const DigitalProductData = test$c.extend({
1720
1680
  expect(newMediaUpload.ok()).toBeTruthy();
1721
1681
  const productDownloadResponse = await AdminApiContext.post(`./product-download?_response`, {
1722
1682
  data: {
1723
- productId: productData.id,
1683
+ productId: ProductData.id,
1724
1684
  mediaId: newMediaId
1725
1685
  }
1726
1686
  });
1727
1687
  expect(productDownloadResponse.ok()).toBeTruthy();
1728
1688
  const { data: productDownload } = await productDownloadResponse.json();
1729
1689
  const returnData = {
1730
- product: productData,
1690
+ product: ProductData,
1731
1691
  fileContent
1732
1692
  };
1733
1693
  await use(returnData);
1734
1694
  const orderSearchResponse = await AdminApiContext.post("./search/order", {
1735
1695
  data: {
1736
1696
  limit: 10,
1737
- filter: [
1738
- {
1739
- type: "equals",
1740
- field: "lineItems.productId",
1741
- value: productData.id
1742
- }
1743
- ]
1697
+ filter: [{
1698
+ type: "equals",
1699
+ field: "lineItems.productId",
1700
+ value: ProductData.id
1701
+ }]
1744
1702
  }
1745
1703
  });
1746
1704
  expect(orderSearchResponse.ok()).toBeTruthy();
1747
1705
  const { data: ordersWithDigitalProduct } = await orderSearchResponse.json();
1748
1706
  for (const order of ordersWithDigitalProduct) {
1749
1707
  const deleteOrderResponse = await AdminApiContext.delete(`./order/${order.id}`);
1750
- expect(deleteOrderResponse.ok()).toBeTruthy();
1708
+ expect(deleteOrderResponse.status()).toBeLessThan(500);
1751
1709
  }
1752
1710
  const unlinkMediaResponse = await AdminApiContext.delete(`./product-download/${productDownload.id}`);
1753
1711
  expect(unlinkMediaResponse.ok()).toBeTruthy();
1754
1712
  const cleanupMediaResponse = await AdminApiContext.delete(`./media/${newMediaId}`);
1755
1713
  expect(cleanupMediaResponse.ok()).toBeTruthy();
1756
- const cleanupResponse = await AdminApiContext.delete(`./product/${productUuid}`);
1757
- expect(cleanupResponse.ok()).toBeTruthy();
1758
1714
  }
1759
1715
  });
1760
1716
 
@@ -2145,7 +2101,7 @@ const OrderData = test$c.extend({
2145
2101
  const { data: order } = await orderResponse.json();
2146
2102
  await use(order);
2147
2103
  const cleanupResponse = await AdminApiContext.delete(`./order/${order.id}`);
2148
- expect(cleanupResponse.ok()).toBeTruthy();
2104
+ expect(cleanupResponse.status()).toBeLessThan(500);
2149
2105
  }
2150
2106
  });
2151
2107
 
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.1",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",