@shopware-ag/acceptance-test-suite 3.0.0 → 3.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.d.mts CHANGED
@@ -285,6 +285,9 @@ type Promotion = Omit<components['schemas']['Promotion'], 'discounts'> & {
285
285
  type PromotionDiscount = components['schemas']['PromotionDiscount'] & {
286
286
  id: string;
287
287
  };
288
+ type OrderLineItem = components['schemas']['OrderLineItem'] & {
289
+ id: string;
290
+ };
288
291
 
289
292
  interface CreatedRecord {
290
293
  resource: string;
@@ -294,6 +297,7 @@ interface SimpleLineItem {
294
297
  product: Product | Promotion;
295
298
  quantity?: number;
296
299
  position?: number;
300
+ overrides?: Partial<OrderLineItem>;
297
301
  }
298
302
  interface SyncApiOperation {
299
303
  entity: string;
@@ -643,7 +647,7 @@ declare class TestDataService {
643
647
  isCalculated: boolean;
644
648
  referencePriceDefinition: null;
645
649
  };
646
- };
650
+ } & Partial<OrderLineItem>;
647
651
  getBasicPromotionLineItemStruct(lineItem: SimpleLineItem): {
648
652
  payload: {
649
653
  code: string | undefined;
@@ -673,7 +677,7 @@ declare class TestDataService {
673
677
  price: number;
674
678
  percentage: number | null;
675
679
  };
676
- };
680
+ } & Partial<OrderLineItem>;
677
681
  getBasicPromotionStruct(salesChannelId?: string, overrides?: Partial<Promotion>): Partial<Promotion>;
678
682
  }
679
683
 
@@ -1247,4 +1251,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
1247
1251
  ValidateAccessibility: (pageName: string, assertViolations?: number | boolean | undefined, createReport?: boolean | undefined, ruleTags?: string[] | undefined, outputDir?: string | undefined) => () => Promise<axe_core.Result[]>;
1248
1252
  }, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
1249
1253
 
1250
- export { AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CreatedRecord, type Currency$1 as Currency, type Customer, type CustomerAddress, type DataServiceOptions, type FixtureTypes, type Manufacturer, type Media, type Order, type OrderDelivery, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type Rule, type SalesChannel, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type Tag, 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 };
1254
+ export { AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CreatedRecord, type Currency$1 as Currency, type Customer, type CustomerAddress, type DataServiceOptions, type FixtureTypes, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type Rule, type SalesChannel, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type Tag, 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 };
package/dist/index.d.ts CHANGED
@@ -285,6 +285,9 @@ type Promotion = Omit<components['schemas']['Promotion'], 'discounts'> & {
285
285
  type PromotionDiscount = components['schemas']['PromotionDiscount'] & {
286
286
  id: string;
287
287
  };
288
+ type OrderLineItem = components['schemas']['OrderLineItem'] & {
289
+ id: string;
290
+ };
288
291
 
289
292
  interface CreatedRecord {
290
293
  resource: string;
@@ -294,6 +297,7 @@ interface SimpleLineItem {
294
297
  product: Product | Promotion;
295
298
  quantity?: number;
296
299
  position?: number;
300
+ overrides?: Partial<OrderLineItem>;
297
301
  }
298
302
  interface SyncApiOperation {
299
303
  entity: string;
@@ -643,7 +647,7 @@ declare class TestDataService {
643
647
  isCalculated: boolean;
644
648
  referencePriceDefinition: null;
645
649
  };
646
- };
650
+ } & Partial<OrderLineItem>;
647
651
  getBasicPromotionLineItemStruct(lineItem: SimpleLineItem): {
648
652
  payload: {
649
653
  code: string | undefined;
@@ -673,7 +677,7 @@ declare class TestDataService {
673
677
  price: number;
674
678
  percentage: number | null;
675
679
  };
676
- };
680
+ } & Partial<OrderLineItem>;
677
681
  getBasicPromotionStruct(salesChannelId?: string, overrides?: Partial<Promotion>): Partial<Promotion>;
678
682
  }
679
683
 
@@ -1247,4 +1251,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
1247
1251
  ValidateAccessibility: (pageName: string, assertViolations?: number | boolean | undefined, createReport?: boolean | undefined, ruleTags?: string[] | undefined, outputDir?: string | undefined) => () => Promise<axe_core.Result[]>;
1248
1252
  }, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
1249
1253
 
1250
- export { AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CreatedRecord, type Currency$1 as Currency, type Customer, type CustomerAddress, type DataServiceOptions, type FixtureTypes, type Manufacturer, type Media, type Order, type OrderDelivery, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type Rule, type SalesChannel, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type Tag, 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 };
1254
+ export { AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CreatedRecord, type Currency$1 as Currency, type Customer, type CustomerAddress, type DataServiceOptions, type FixtureTypes, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type Rule, type SalesChannel, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type Tag, 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 };
package/dist/index.mjs CHANGED
@@ -1931,7 +1931,7 @@ class TestDataService {
1931
1931
  const product = lineItem.product;
1932
1932
  const unitPrice = product.price[0].gross || 10;
1933
1933
  const totalPrice = unitPrice * (lineItem.quantity || 1);
1934
- return {
1934
+ const basicProductLineItemStruct = {
1935
1935
  productId: product.id,
1936
1936
  referencedId: product.id,
1937
1937
  payload: {
@@ -1969,6 +1969,7 @@ class TestDataService {
1969
1969
  referencePriceDefinition: null
1970
1970
  }
1971
1971
  };
1972
+ return Object.assign({}, basicProductLineItemStruct, lineItem.overrides);
1972
1973
  }
1973
1974
  getBasicPromotionLineItemStruct(lineItem) {
1974
1975
  if (!this.isPromotion(lineItem.product)) {
@@ -1980,7 +1981,7 @@ class TestDataService {
1980
1981
  const promotionDiscountId = promotion.discounts[0].id;
1981
1982
  const unitPrice = -Math.abs(promotionDiscountValue || 10);
1982
1983
  const totalPrice = unitPrice * (lineItem.quantity || 1);
1983
- return {
1984
+ const basicPromotionLineItemStruct = {
1984
1985
  payload: {
1985
1986
  code: promotion.code
1986
1987
  },
@@ -2010,6 +2011,7 @@ class TestDataService {
2010
2011
  percentage: promotionDiscountType === "percentage" ? promotionDiscountValue : null
2011
2012
  }
2012
2013
  };
2014
+ return Object.assign({}, basicPromotionLineItemStruct, lineItem.overrides);
2013
2015
  }
2014
2016
  getBasicPromotionStruct(salesChannelId = this.defaultSalesChannel.id, overrides = {}) {
2015
2017
  const promotionCode = `${this.IdProvider.getIdPair().id}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",