@shopware-ag/acceptance-test-suite 11.28.0 → 11.29.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
@@ -3039,6 +3039,17 @@ declare function hideElements(page: Page, selectors: (string | Locator)[]): Prom
3039
3039
  * - Also masks placeholder so empty fields show replacement text in screenshots.
3040
3040
  */
3041
3041
  declare function replaceElements(page: Page, selectors: (string | Locator)[], replaceWith?: string): Promise<void>;
3042
+ interface ReplaceTarget {
3043
+ selector: string | Locator;
3044
+ replaceWith?: string;
3045
+ }
3046
+ /**
3047
+ * Replaces elements individually based on an array of targets.
3048
+ *
3049
+ *@param page - Playwright page
3050
+ *@param targets - Array of objects containing selectors and optional replacement strings.
3051
+ */
3052
+ declare function replaceElementsIndividually(page: Page, targets: ReplaceTarget[]): Promise<void>;
3042
3053
  /**
3043
3054
  * Calculates the ideal viewport dimensions for a Playwright test based on scrollable content,
3044
3055
  * header visibility, and optional configuration. Useful for dynamic screenshot sizing or
@@ -3162,4 +3173,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
3162
3173
  SelectProductFilterOption: Task;
3163
3174
  }, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
3164
3175
 
3165
- export { type AccountData, type AclRole, type Address, AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CategoryCustomizableLinkData, type CategoryData, type CmsPage, type Country$1 as Country, type CreatedRecord, type Currency$2 as Currency, type CustomField, type CustomFieldData, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Flow, type FlowConfig, type FlowTemplate, type Language$2 as Language, type Manufacturer, type Media, type Options, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod$1 as PaymentMethod, type Price, type Product, type ProductCrossSelling, type ProductPrice, type ProductReview, 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$1 as ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type TagData, type Task, type Tax$1 as Tax, type TaxRules, TestDataService, type User, type VariantListingConfig, assertScreenshot, compareFlowTemplateWithFlow, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlow, getFlowId, getFlowTemplate, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, hideElements, isSaaSInstance, isThemeCompiled, replaceElements, setOrderStatus, setViewport, test, updateAdminUser };
3176
+ export { type AccountData, type AclRole, type Address, AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CategoryCustomizableLinkData, type CategoryData, type CmsPage, type Country$1 as Country, type CreatedRecord, type Currency$2 as Currency, type CustomField, type CustomFieldData, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Flow, type FlowConfig, type FlowTemplate, type Language$2 as Language, type Manufacturer, type Media, type Options, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod$1 as PaymentMethod, type Price, type Product, type ProductCrossSelling, type ProductPrice, type ProductReview, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type ReplaceTarget, type Rule, type RuleAssignmentEntity, RuleType, type SalesChannel, type SalesChannelAnalytics, type SalesChannelDomain, type SalesChannelRecord, type Salutation, type ShippingMethod$1 as ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type TagData, type Task, type Tax$1 as Tax, type TaxRules, TestDataService, type User, type VariantListingConfig, assertScreenshot, compareFlowTemplateWithFlow, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlow, getFlowId, getFlowTemplate, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, hideElements, isSaaSInstance, isThemeCompiled, replaceElements, replaceElementsIndividually, setOrderStatus, setViewport, test, updateAdminUser };
package/dist/index.d.ts CHANGED
@@ -3039,6 +3039,17 @@ declare function hideElements(page: Page, selectors: (string | Locator)[]): Prom
3039
3039
  * - Also masks placeholder so empty fields show replacement text in screenshots.
3040
3040
  */
3041
3041
  declare function replaceElements(page: Page, selectors: (string | Locator)[], replaceWith?: string): Promise<void>;
3042
+ interface ReplaceTarget {
3043
+ selector: string | Locator;
3044
+ replaceWith?: string;
3045
+ }
3046
+ /**
3047
+ * Replaces elements individually based on an array of targets.
3048
+ *
3049
+ *@param page - Playwright page
3050
+ *@param targets - Array of objects containing selectors and optional replacement strings.
3051
+ */
3052
+ declare function replaceElementsIndividually(page: Page, targets: ReplaceTarget[]): Promise<void>;
3042
3053
  /**
3043
3054
  * Calculates the ideal viewport dimensions for a Playwright test based on scrollable content,
3044
3055
  * header visibility, and optional configuration. Useful for dynamic screenshot sizing or
@@ -3162,4 +3173,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
3162
3173
  SelectProductFilterOption: Task;
3163
3174
  }, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
3164
3175
 
3165
- export { type AccountData, type AclRole, type Address, AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CategoryCustomizableLinkData, type CategoryData, type CmsPage, type Country$1 as Country, type CreatedRecord, type Currency$2 as Currency, type CustomField, type CustomFieldData, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Flow, type FlowConfig, type FlowTemplate, type Language$2 as Language, type Manufacturer, type Media, type Options, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod$1 as PaymentMethod, type Price, type Product, type ProductCrossSelling, type ProductPrice, type ProductReview, 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$1 as ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type TagData, type Task, type Tax$1 as Tax, type TaxRules, TestDataService, type User, type VariantListingConfig, assertScreenshot, compareFlowTemplateWithFlow, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlow, getFlowId, getFlowTemplate, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, hideElements, isSaaSInstance, isThemeCompiled, replaceElements, setOrderStatus, setViewport, test, updateAdminUser };
3176
+ export { type AccountData, type AclRole, type Address, AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CategoryCustomizableLinkData, type CategoryData, type CmsPage, type Country$1 as Country, type CreatedRecord, type Currency$2 as Currency, type CustomField, type CustomFieldData, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Flow, type FlowConfig, type FlowTemplate, type Language$2 as Language, type Manufacturer, type Media, type Options, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod$1 as PaymentMethod, type Price, type Product, type ProductCrossSelling, type ProductPrice, type ProductReview, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type ReplaceTarget, type Rule, type RuleAssignmentEntity, RuleType, type SalesChannel, type SalesChannelAnalytics, type SalesChannelDomain, type SalesChannelRecord, type Salutation, type ShippingMethod$1 as ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type TagData, type Task, type Tax$1 as Tax, type TaxRules, TestDataService, type User, type VariantListingConfig, assertScreenshot, compareFlowTemplateWithFlow, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlow, getFlowId, getFlowTemplate, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, hideElements, isSaaSInstance, isThemeCompiled, replaceElements, replaceElementsIndividually, setOrderStatus, setViewport, test, updateAdminUser };
package/dist/index.mjs CHANGED
@@ -9294,6 +9294,12 @@ async function replaceElements(page, selectors, replaceWith = "***") {
9294
9294
  }
9295
9295
  );
9296
9296
  }
9297
+ async function replaceElementsIndividually(page, targets) {
9298
+ for (const target of targets) {
9299
+ const { selector, replaceWith } = target;
9300
+ await replaceElements(page, [selector], replaceWith ?? "***");
9301
+ }
9302
+ }
9297
9303
  const defaultOptions = {
9298
9304
  requestURL: "api/notification/message?limit=5",
9299
9305
  width: 1440,
@@ -9400,4 +9406,4 @@ const test = mergeTests(
9400
9406
  test$3
9401
9407
  );
9402
9408
 
9403
- export { AdminPageObjects, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, compareFlowTemplateWithFlow, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlow, getFlowId, getFlowTemplate, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, hideElements, isSaaSInstance, isThemeCompiled, replaceElements, setOrderStatus, setViewport, test, updateAdminUser };
9409
+ export { AdminPageObjects, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, compareFlowTemplateWithFlow, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlow, getFlowId, getFlowTemplate, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, hideElements, isSaaSInstance, isThemeCompiled, replaceElements, replaceElementsIndividually, setOrderStatus, setViewport, test, updateAdminUser };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "11.28.0",
3
+ "version": "11.29.0",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",