@shopware-ag/acceptance-test-suite 11.28.0 → 11.29.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.
- package/dist/index.d.mts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.mjs +37 -7
- package/package.json +1 -1
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
|
@@ -6570,19 +6570,43 @@ class RuleDetail extends RuleCreate {
|
|
|
6570
6570
|
this.shippingMethodAvailabilityRulesCard = page.locator(".sw-settings-rule-detail-assignments__card-shipping_method_availability_rule");
|
|
6571
6571
|
this.shippingMethodAvailabilityRulesCardLink = this.shippingMethodAvailabilityRulesCard.getByRole("link");
|
|
6572
6572
|
this.shippingMethodAvailabilityRulesCardTable = page.locator(".sw-settings-rule-detail-assignments__entity-listing-shipping_method_availability_rule");
|
|
6573
|
-
|
|
6573
|
+
if (satisfies(instanceMeta.version, "<6.7.3")) {
|
|
6574
|
+
this.shippingMethodAvailabilityRulesCardEmptyState = this.shippingMethodAvailabilityRulesCard.getByRole("alert");
|
|
6575
|
+
} else {
|
|
6576
|
+
this.shippingMethodAvailabilityRulesCardEmptyState = this.shippingMethodAvailabilityRulesCard.locator(".mt-empty-state__headline");
|
|
6577
|
+
}
|
|
6574
6578
|
this.shippingMethodAvailabilityRulesCardSearchField = this.shippingMethodAvailabilityRulesCard.getByRole("textbox");
|
|
6575
6579
|
this.taxProviderRulesCard = page.locator(".sw-settings-rule-detail-assignments__card-tax_provider");
|
|
6576
|
-
|
|
6580
|
+
if (satisfies(instanceMeta.version, "<6.7.3")) {
|
|
6581
|
+
this.taxProviderRulesCardEmptyState = this.taxProviderRulesCard.getByRole("alert");
|
|
6582
|
+
} else {
|
|
6583
|
+
this.taxProviderRulesCardEmptyState = this.taxProviderRulesCard.locator(".mt-empty-state__headline");
|
|
6584
|
+
}
|
|
6577
6585
|
this.paymentMethodsAvailabilityRulesCard = page.locator(".sw-settings-rule-detail-assignments__card-payment_method");
|
|
6578
|
-
|
|
6586
|
+
if (satisfies(instanceMeta.version, "<6.7.3")) {
|
|
6587
|
+
this.paymentMethodsAvailabilityRulesCardEmptyState = this.paymentMethodsAvailabilityRulesCard.getByRole("alert");
|
|
6588
|
+
} else {
|
|
6589
|
+
this.paymentMethodsAvailabilityRulesCardEmptyState = this.paymentMethodsAvailabilityRulesCard.locator(".mt-empty-state__headline");
|
|
6590
|
+
}
|
|
6579
6591
|
this.paymentMethodsAvailabilityRulesCardLink = page.locator(".sw-settings-rule-detail-assignments__card-payment_method").getByRole("link");
|
|
6580
6592
|
this.promotionOrderRulesCard = page.locator(".sw-settings-rule-detail-assignments__card-promotion_order_rule");
|
|
6581
|
-
|
|
6593
|
+
if (satisfies(instanceMeta.version, "<6.7.3")) {
|
|
6594
|
+
this.promotionOrderRulesCardEmptyState = this.promotionOrderRulesCard.getByRole("alert");
|
|
6595
|
+
} else {
|
|
6596
|
+
this.promotionOrderRulesCardEmptyState = this.promotionOrderRulesCard.locator(".mt-empty-state__headline");
|
|
6597
|
+
}
|
|
6582
6598
|
this.promotionCustomerRulesCard = page.locator(".sw-settings-rule-detail-assignments__card-promotion_customer_rule");
|
|
6583
|
-
|
|
6599
|
+
if (satisfies(instanceMeta.version, "<6.7.3")) {
|
|
6600
|
+
this.promotionCustomerRulesCardEmptyState = this.promotionCustomerRulesCard.getByRole("alert");
|
|
6601
|
+
} else {
|
|
6602
|
+
this.promotionCustomerRulesCardEmptyState = this.promotionCustomerRulesCard.locator(".mt-empty-state__headline");
|
|
6603
|
+
}
|
|
6584
6604
|
this.promotionCartRulesCard = page.locator(".sw-settings-rule-detail-assignments__card-promotion_cart_rule");
|
|
6585
|
-
|
|
6605
|
+
if (satisfies(instanceMeta.version, "<6.7.3")) {
|
|
6606
|
+
this.promotionCartRulesCardEmptyState = this.promotionCartRulesCard.getByRole("alert");
|
|
6607
|
+
} else {
|
|
6608
|
+
this.promotionCartRulesCardEmptyState = this.promotionCartRulesCard.locator(".mt-empty-state__headline");
|
|
6609
|
+
}
|
|
6586
6610
|
this.assignmentModal = page.locator(".sw-settings-rule-add-assignment-modal");
|
|
6587
6611
|
this.assignmentModalSearchField = this.assignmentModal.getByRole("textbox");
|
|
6588
6612
|
this.adminMenuAvatar = page.locator(".sw-admin-menu__avatar");
|
|
@@ -9294,6 +9318,12 @@ async function replaceElements(page, selectors, replaceWith = "***") {
|
|
|
9294
9318
|
}
|
|
9295
9319
|
);
|
|
9296
9320
|
}
|
|
9321
|
+
async function replaceElementsIndividually(page, targets) {
|
|
9322
|
+
for (const target of targets) {
|
|
9323
|
+
const { selector, replaceWith } = target;
|
|
9324
|
+
await replaceElements(page, [selector], replaceWith ?? "***");
|
|
9325
|
+
}
|
|
9326
|
+
}
|
|
9297
9327
|
const defaultOptions = {
|
|
9298
9328
|
requestURL: "api/notification/message?limit=5",
|
|
9299
9329
|
width: 1440,
|
|
@@ -9400,4 +9430,4 @@ const test = mergeTests(
|
|
|
9400
9430
|
test$3
|
|
9401
9431
|
);
|
|
9402
9432
|
|
|
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 };
|
|
9433
|
+
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 };
|