@shopware-ag/acceptance-test-suite 12.20.1 → 12.21.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 +59 -6
- package/dist/index.d.ts +59 -6
- package/dist/index.mjs +159 -26
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -138,6 +138,13 @@ interface ApiContextTypes {
|
|
|
138
138
|
MailpitApiContext: MailpitApiContext;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
type NewsletterRecipient = components["schemas"]["NewsletterRecipient"] & {
|
|
142
|
+
id: string;
|
|
143
|
+
email: string;
|
|
144
|
+
salesChannelId: string;
|
|
145
|
+
firstName: string;
|
|
146
|
+
lastName: string;
|
|
147
|
+
};
|
|
141
148
|
type SalesChannel = components["schemas"]["SalesChannel"] & {
|
|
142
149
|
id: string;
|
|
143
150
|
};
|
|
@@ -259,6 +266,11 @@ type Tag = components["schemas"]["Tag"] & {
|
|
|
259
266
|
type Rule = components["schemas"]["Rule"] & {
|
|
260
267
|
id: string;
|
|
261
268
|
};
|
|
269
|
+
interface BasicRuleCondition {
|
|
270
|
+
type: string;
|
|
271
|
+
value: Record<string, unknown>;
|
|
272
|
+
children?: BasicRuleCondition[];
|
|
273
|
+
}
|
|
262
274
|
type Currency$2 = components["schemas"]["Currency"] & {
|
|
263
275
|
id: string;
|
|
264
276
|
};
|
|
@@ -334,6 +346,16 @@ type Promotion = Omit<components["schemas"]["Promotion"], "discounts"> & {
|
|
|
334
346
|
type PromotionDiscount = components["schemas"]["PromotionDiscount"] & {
|
|
335
347
|
id: string;
|
|
336
348
|
};
|
|
349
|
+
interface PromotionWithConditionRuleOptions {
|
|
350
|
+
id: string;
|
|
351
|
+
name: string;
|
|
352
|
+
ruleId: string;
|
|
353
|
+
useCode?: boolean;
|
|
354
|
+
discountValue?: number;
|
|
355
|
+
discountScope?: string;
|
|
356
|
+
discountType?: string;
|
|
357
|
+
salesChannelId?: string;
|
|
358
|
+
}
|
|
337
359
|
type OrderLineItem = components["schemas"]["OrderLineItem"] & {
|
|
338
360
|
id: string;
|
|
339
361
|
};
|
|
@@ -583,6 +605,14 @@ declare class TestDataService {
|
|
|
583
605
|
*/
|
|
584
606
|
private createdSalesChannelRecords;
|
|
585
607
|
constructor(AdminApiClient: AdminApiContext, IdProvider: IdProvider, options: DataServiceOptions);
|
|
608
|
+
/**
|
|
609
|
+
* Creates a newsletter recipient for a customer in the default sales channel.
|
|
610
|
+
* If a matching recipient already exists, it will be reused and registered for cleanup.
|
|
611
|
+
*
|
|
612
|
+
* @param customer - The customer whose email and profile data will be used for the newsletter recipient.
|
|
613
|
+
* @param overrides - Specific data overrides that will be applied to the newsletter recipient payload.
|
|
614
|
+
*/
|
|
615
|
+
createNewsletterRecipient(customer: Customer, overrides?: Partial<NewsletterRecipient>): Promise<NewsletterRecipient>;
|
|
586
616
|
/**
|
|
587
617
|
* Creates a basic product without images or other special configuration.
|
|
588
618
|
* The product will be added to the default sales channel category if configured.
|
|
@@ -755,6 +785,13 @@ declare class TestDataService {
|
|
|
755
785
|
* @param salesChannelId - The uuid of the sales channel in which the promotion should be active.
|
|
756
786
|
*/
|
|
757
787
|
createPromotionWithCode(overrides?: Partial<Promotion>, salesChannelId?: string): Promise<Promotion>;
|
|
788
|
+
/**
|
|
789
|
+
* Creates a promotion with one discount and assigns a condition rule as a persona rule.
|
|
790
|
+
* The created promotion and assigned rule are both registered for cleanup.
|
|
791
|
+
*
|
|
792
|
+
* @param promotionConfig - Promotion configuration, including the promotion id, name, and assigned rule id.
|
|
793
|
+
*/
|
|
794
|
+
createPromotionWithConditionRule(promotionConfig: PromotionWithConditionRuleOptions): Promise<Promotion>;
|
|
758
795
|
/**
|
|
759
796
|
* Creates a new basic payment method.
|
|
760
797
|
*
|
|
@@ -780,11 +817,13 @@ declare class TestDataService {
|
|
|
780
817
|
*/
|
|
781
818
|
createShippingMethodWithImage(overrides?: Partial<ShippingMethod$1>): Promise<ShippingMethod$1>;
|
|
782
819
|
/**
|
|
783
|
-
* Creates a new basic rule with the condition cart amount >= 1.
|
|
820
|
+
* Creates a new basic rule with the condition cart amount >= 1 by default.
|
|
821
|
+
* Pass a condition object to create the same basic rule structure with another condition.
|
|
784
822
|
*
|
|
785
823
|
* @param overrides - Specific data overrides that will be applied to the basic rule data struct.
|
|
824
|
+
* @param condition - The condition object or condition type used in the generated rule.
|
|
786
825
|
*/
|
|
787
|
-
createBasicRule(overrides?: Partial<Rule>,
|
|
826
|
+
createBasicRule(overrides?: Partial<Rule>, condition?: BasicRuleCondition | string, operator?: string, amount?: number): Promise<Rule>;
|
|
788
827
|
/**
|
|
789
828
|
* Creates a new basic page layout.
|
|
790
829
|
*
|
|
@@ -970,6 +1009,11 @@ declare class TestDataService {
|
|
|
970
1009
|
|
|
971
1010
|
*/
|
|
972
1011
|
assignAclRoleUser(aclRoleId: string, adminUserId: string): Promise<any>;
|
|
1012
|
+
/**
|
|
1013
|
+
* Retrieves a newsletter recipient by customer email and the default sales channel.
|
|
1014
|
+
* @param customer - The customer whose email will be used to search for a newsletter recipient.
|
|
1015
|
+
*/
|
|
1016
|
+
getNewsletterRecipient(customer: Customer): Promise<NewsletterRecipient | undefined>;
|
|
973
1017
|
/**
|
|
974
1018
|
* Retrieves a language based on its code.
|
|
975
1019
|
* @param languageCode
|
|
@@ -1153,7 +1197,7 @@ declare class TestDataService {
|
|
|
1153
1197
|
getCountryStruct(overrides?: Partial<Country$1>): Partial<Country$1>;
|
|
1154
1198
|
getCurrencyStruct(overrides: Partial<Currency$2> | undefined, roundingDecimals: number): Partial<Currency$2>;
|
|
1155
1199
|
getBasicProductStruct(taxId?: string, currencyId?: string, overrides?: Partial<Product>): Partial<Product>;
|
|
1156
|
-
getBasicRuleStruct(overrides
|
|
1200
|
+
getBasicRuleStruct(overrides?: Partial<Rule>, condition?: BasicRuleCondition | string, operator?: string, amount?: number): Partial<Rule>;
|
|
1157
1201
|
getProductPriceRangeStruct(currencyId: string, ruleId: string): Partial<Product>;
|
|
1158
1202
|
getBasicManufacturerStruct(overrides?: Partial<Manufacturer>): Partial<Manufacturer>;
|
|
1159
1203
|
getBasicPaymentMethodStruct(overrides?: Partial<PaymentMethod$1>): {
|
|
@@ -1530,6 +1574,7 @@ declare const BUNDLED_RESOURCES: {
|
|
|
1530
1574
|
};
|
|
1531
1575
|
userMenu: {
|
|
1532
1576
|
logout: string;
|
|
1577
|
+
offCanvasToggle: string;
|
|
1533
1578
|
};
|
|
1534
1579
|
order: {
|
|
1535
1580
|
orderTitle: string;
|
|
@@ -2432,6 +2477,7 @@ declare const BUNDLED_RESOURCES: {
|
|
|
2432
2477
|
};
|
|
2433
2478
|
userMenu: {
|
|
2434
2479
|
logout: string;
|
|
2480
|
+
offCanvasToggle: string;
|
|
2435
2481
|
};
|
|
2436
2482
|
order: {
|
|
2437
2483
|
orderTitle: string;
|
|
@@ -3662,6 +3708,7 @@ declare const baseNamespaces: {
|
|
|
3662
3708
|
};
|
|
3663
3709
|
userMenu: {
|
|
3664
3710
|
logout: string;
|
|
3711
|
+
offCanvasToggle: string;
|
|
3665
3712
|
};
|
|
3666
3713
|
order: {
|
|
3667
3714
|
orderTitle: string;
|
|
@@ -4662,6 +4709,7 @@ declare class OffCanvasCart implements PageObject {
|
|
|
4662
4709
|
constructor(page: Page);
|
|
4663
4710
|
url(): string;
|
|
4664
4711
|
getLineItemByProductNumber(productNumber: string): Promise<Record<string, Locator>>;
|
|
4712
|
+
getLineItemByPromotionName(name: string): Promise<Record<string, Locator>>;
|
|
4665
4713
|
}
|
|
4666
4714
|
|
|
4667
4715
|
declare class CheckoutConfirm implements PageObject {
|
|
@@ -4696,7 +4744,10 @@ declare class CheckoutConfirm implements PageObject {
|
|
|
4696
4744
|
*/
|
|
4697
4745
|
readonly cartLineItemImages: Locator;
|
|
4698
4746
|
readonly page: Page;
|
|
4747
|
+
readonly confirmProductTable: Locator;
|
|
4699
4748
|
constructor(page: Page);
|
|
4749
|
+
getLineItemByProductName(productName: string): Record<string, Locator>;
|
|
4750
|
+
getLineItemByPromotionName(promotionName: string): Record<string, Locator>;
|
|
4700
4751
|
url(): string;
|
|
4701
4752
|
}
|
|
4702
4753
|
|
|
@@ -5554,6 +5605,7 @@ declare class DataSharing implements PageObject {
|
|
|
5554
5605
|
declare class Dashboard implements PageObject {
|
|
5555
5606
|
readonly contentView: Locator;
|
|
5556
5607
|
readonly adminMenuView: Locator;
|
|
5608
|
+
readonly adminMenuOffCanvasToggle: Locator;
|
|
5557
5609
|
readonly adminMenuCatalog: Locator;
|
|
5558
5610
|
readonly adminMenuOrder: Locator;
|
|
5559
5611
|
readonly adminMenuOrderOverview: Locator;
|
|
@@ -6013,6 +6065,7 @@ declare class CustomerBulkEdit implements PageObject {
|
|
|
6013
6065
|
readonly customFieldCheckbox: Locator;
|
|
6014
6066
|
readonly customFieldInput: Locator;
|
|
6015
6067
|
readonly customFieldArrowRightButton: Locator;
|
|
6068
|
+
readonly customFieldSet: (customFieldSetName: string) => Locator;
|
|
6016
6069
|
/**
|
|
6017
6070
|
* Confirmation modal
|
|
6018
6071
|
*/
|
|
@@ -6022,10 +6075,10 @@ declare class CustomerBulkEdit implements PageObject {
|
|
|
6022
6075
|
readonly confirmModalSuccessHeader: Locator;
|
|
6023
6076
|
readonly confirmModalSuccessCloseButton: Locator;
|
|
6024
6077
|
readonly page: Page;
|
|
6025
|
-
|
|
6078
|
+
readonly instanceMeta?: HelperFixtureTypes["InstanceMeta"];
|
|
6079
|
+
constructor(page: Page, instanceMeta?: HelperFixtureTypes["InstanceMeta"]);
|
|
6026
6080
|
getPageHeadline(customerCount: number): Promise<Locator>;
|
|
6027
6081
|
getCustomFieldInputByName(customFieldName: string): Promise<Locator>;
|
|
6028
|
-
getCustomFieldLinkByName(customFieldSetName: string): Promise<Locator>;
|
|
6029
6082
|
url(): string;
|
|
6030
6083
|
}
|
|
6031
6084
|
|
|
@@ -6891,4 +6944,4 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
|
|
|
6891
6944
|
}>;
|
|
6892
6945
|
|
|
6893
6946
|
export { Actor, AdminPageObjects, BUNDLED_RESOURCES, COUNTRY_ADDRESS_DATA, FeatureService, IdProvider, LanguageHelper, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, baseNamespaces, clearDelayedCache, compareFlowTemplateWithFlow, createNewAdminPageContext, createRandomImage, createSolidColorImage, encodeImage, expandAdminMenu, extractIdFromUrl, formatPrice, getCountryAddressData, getCountryCodeFromLocale, getCountryId, getCurrency, getCurrencyCodeFromLocale, getCurrencySymbolFromLocale, getCurrentContext, getDefaultShippingMethodId, getFlow, getFlowId, getFlowTemplate, getLanguageCode, getLanguageData, getLocale, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, hideElements, hideSymfonyToolbarOnReload, isPaaSInstance, isSaaSInstance, isThemeCompiled, loginToAdministration, mockApiCalls, replaceElements, replaceElementsIndividually, setCurrentContext, setOrderStatus, setViewport, test, translate, updateAdminUser, uploadRandomPngMedia };
|
|
6894
|
-
export type { AccountData, AclRole, Address, CalculatedTaxes, Category$1 as Category, CategoryCustomizableLinkData, CategoryData, CmsPage, Country$1 as Country, CreatedRecord, Currency$2 as Currency, CustomField, CustomFieldData, CustomFieldSet, Customer, CustomerAddress, CustomerGroup, DataServiceOptions, DeliveryTime, FixtureTypes, Flow, FlowConfig, FlowTemplate, Image, Language$2 as Language, Manufacturer, Media$1 as Media, Options, Order, OrderDelivery, OrderLineItem, OrderStatus, PageObject, PaymentMethod$1 as PaymentMethod, Price, Product, ProductCrossSelling, ProductPrice, ProductReview, Promotion, PromotionDiscount, PropertyGroup, PropertyGroupOption, RegistrationData, ReplaceTarget, Rule, RuleAssignmentEntity, SalesChannel, SalesChannelAnalytics, SalesChannelDomain, SalesChannelRecord, Salutation, ShippingMethod$1 as ShippingMethod, SimpleLineItem, StateMachine, StateMachineState, SyncApiOperation, SystemConfig, Tag, TagData, Task, Tax$1 as Tax, TaxRules, TranslateFn, TranslationKey, UploadMediaTarget, User, VariantListingConfig };
|
|
6947
|
+
export type { AccountData, AclRole, Address, BasicRuleCondition, CalculatedTaxes, Category$1 as Category, CategoryCustomizableLinkData, CategoryData, CmsPage, Country$1 as Country, CreatedRecord, Currency$2 as Currency, CustomField, CustomFieldData, CustomFieldSet, Customer, CustomerAddress, CustomerGroup, DataServiceOptions, DeliveryTime, FixtureTypes, Flow, FlowConfig, FlowTemplate, Image, Language$2 as Language, Manufacturer, Media$1 as Media, NewsletterRecipient, Options, Order, OrderDelivery, OrderLineItem, OrderStatus, PageObject, PaymentMethod$1 as PaymentMethod, Price, Product, ProductCrossSelling, ProductPrice, ProductReview, Promotion, PromotionDiscount, PromotionWithConditionRuleOptions, PropertyGroup, PropertyGroupOption, RegistrationData, ReplaceTarget, Rule, RuleAssignmentEntity, SalesChannel, SalesChannelAnalytics, SalesChannelDomain, SalesChannelRecord, Salutation, ShippingMethod$1 as ShippingMethod, SimpleLineItem, StateMachine, StateMachineState, SyncApiOperation, SystemConfig, Tag, TagData, Task, Tax$1 as Tax, TaxRules, TranslateFn, TranslationKey, UploadMediaTarget, User, VariantListingConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -138,6 +138,13 @@ interface ApiContextTypes {
|
|
|
138
138
|
MailpitApiContext: MailpitApiContext;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
type NewsletterRecipient = components["schemas"]["NewsletterRecipient"] & {
|
|
142
|
+
id: string;
|
|
143
|
+
email: string;
|
|
144
|
+
salesChannelId: string;
|
|
145
|
+
firstName: string;
|
|
146
|
+
lastName: string;
|
|
147
|
+
};
|
|
141
148
|
type SalesChannel = components["schemas"]["SalesChannel"] & {
|
|
142
149
|
id: string;
|
|
143
150
|
};
|
|
@@ -259,6 +266,11 @@ type Tag = components["schemas"]["Tag"] & {
|
|
|
259
266
|
type Rule = components["schemas"]["Rule"] & {
|
|
260
267
|
id: string;
|
|
261
268
|
};
|
|
269
|
+
interface BasicRuleCondition {
|
|
270
|
+
type: string;
|
|
271
|
+
value: Record<string, unknown>;
|
|
272
|
+
children?: BasicRuleCondition[];
|
|
273
|
+
}
|
|
262
274
|
type Currency$2 = components["schemas"]["Currency"] & {
|
|
263
275
|
id: string;
|
|
264
276
|
};
|
|
@@ -334,6 +346,16 @@ type Promotion = Omit<components["schemas"]["Promotion"], "discounts"> & {
|
|
|
334
346
|
type PromotionDiscount = components["schemas"]["PromotionDiscount"] & {
|
|
335
347
|
id: string;
|
|
336
348
|
};
|
|
349
|
+
interface PromotionWithConditionRuleOptions {
|
|
350
|
+
id: string;
|
|
351
|
+
name: string;
|
|
352
|
+
ruleId: string;
|
|
353
|
+
useCode?: boolean;
|
|
354
|
+
discountValue?: number;
|
|
355
|
+
discountScope?: string;
|
|
356
|
+
discountType?: string;
|
|
357
|
+
salesChannelId?: string;
|
|
358
|
+
}
|
|
337
359
|
type OrderLineItem = components["schemas"]["OrderLineItem"] & {
|
|
338
360
|
id: string;
|
|
339
361
|
};
|
|
@@ -583,6 +605,14 @@ declare class TestDataService {
|
|
|
583
605
|
*/
|
|
584
606
|
private createdSalesChannelRecords;
|
|
585
607
|
constructor(AdminApiClient: AdminApiContext, IdProvider: IdProvider, options: DataServiceOptions);
|
|
608
|
+
/**
|
|
609
|
+
* Creates a newsletter recipient for a customer in the default sales channel.
|
|
610
|
+
* If a matching recipient already exists, it will be reused and registered for cleanup.
|
|
611
|
+
*
|
|
612
|
+
* @param customer - The customer whose email and profile data will be used for the newsletter recipient.
|
|
613
|
+
* @param overrides - Specific data overrides that will be applied to the newsletter recipient payload.
|
|
614
|
+
*/
|
|
615
|
+
createNewsletterRecipient(customer: Customer, overrides?: Partial<NewsletterRecipient>): Promise<NewsletterRecipient>;
|
|
586
616
|
/**
|
|
587
617
|
* Creates a basic product without images or other special configuration.
|
|
588
618
|
* The product will be added to the default sales channel category if configured.
|
|
@@ -755,6 +785,13 @@ declare class TestDataService {
|
|
|
755
785
|
* @param salesChannelId - The uuid of the sales channel in which the promotion should be active.
|
|
756
786
|
*/
|
|
757
787
|
createPromotionWithCode(overrides?: Partial<Promotion>, salesChannelId?: string): Promise<Promotion>;
|
|
788
|
+
/**
|
|
789
|
+
* Creates a promotion with one discount and assigns a condition rule as a persona rule.
|
|
790
|
+
* The created promotion and assigned rule are both registered for cleanup.
|
|
791
|
+
*
|
|
792
|
+
* @param promotionConfig - Promotion configuration, including the promotion id, name, and assigned rule id.
|
|
793
|
+
*/
|
|
794
|
+
createPromotionWithConditionRule(promotionConfig: PromotionWithConditionRuleOptions): Promise<Promotion>;
|
|
758
795
|
/**
|
|
759
796
|
* Creates a new basic payment method.
|
|
760
797
|
*
|
|
@@ -780,11 +817,13 @@ declare class TestDataService {
|
|
|
780
817
|
*/
|
|
781
818
|
createShippingMethodWithImage(overrides?: Partial<ShippingMethod$1>): Promise<ShippingMethod$1>;
|
|
782
819
|
/**
|
|
783
|
-
* Creates a new basic rule with the condition cart amount >= 1.
|
|
820
|
+
* Creates a new basic rule with the condition cart amount >= 1 by default.
|
|
821
|
+
* Pass a condition object to create the same basic rule structure with another condition.
|
|
784
822
|
*
|
|
785
823
|
* @param overrides - Specific data overrides that will be applied to the basic rule data struct.
|
|
824
|
+
* @param condition - The condition object or condition type used in the generated rule.
|
|
786
825
|
*/
|
|
787
|
-
createBasicRule(overrides?: Partial<Rule>,
|
|
826
|
+
createBasicRule(overrides?: Partial<Rule>, condition?: BasicRuleCondition | string, operator?: string, amount?: number): Promise<Rule>;
|
|
788
827
|
/**
|
|
789
828
|
* Creates a new basic page layout.
|
|
790
829
|
*
|
|
@@ -970,6 +1009,11 @@ declare class TestDataService {
|
|
|
970
1009
|
|
|
971
1010
|
*/
|
|
972
1011
|
assignAclRoleUser(aclRoleId: string, adminUserId: string): Promise<any>;
|
|
1012
|
+
/**
|
|
1013
|
+
* Retrieves a newsletter recipient by customer email and the default sales channel.
|
|
1014
|
+
* @param customer - The customer whose email will be used to search for a newsletter recipient.
|
|
1015
|
+
*/
|
|
1016
|
+
getNewsletterRecipient(customer: Customer): Promise<NewsletterRecipient | undefined>;
|
|
973
1017
|
/**
|
|
974
1018
|
* Retrieves a language based on its code.
|
|
975
1019
|
* @param languageCode
|
|
@@ -1153,7 +1197,7 @@ declare class TestDataService {
|
|
|
1153
1197
|
getCountryStruct(overrides?: Partial<Country$1>): Partial<Country$1>;
|
|
1154
1198
|
getCurrencyStruct(overrides: Partial<Currency$2> | undefined, roundingDecimals: number): Partial<Currency$2>;
|
|
1155
1199
|
getBasicProductStruct(taxId?: string, currencyId?: string, overrides?: Partial<Product>): Partial<Product>;
|
|
1156
|
-
getBasicRuleStruct(overrides
|
|
1200
|
+
getBasicRuleStruct(overrides?: Partial<Rule>, condition?: BasicRuleCondition | string, operator?: string, amount?: number): Partial<Rule>;
|
|
1157
1201
|
getProductPriceRangeStruct(currencyId: string, ruleId: string): Partial<Product>;
|
|
1158
1202
|
getBasicManufacturerStruct(overrides?: Partial<Manufacturer>): Partial<Manufacturer>;
|
|
1159
1203
|
getBasicPaymentMethodStruct(overrides?: Partial<PaymentMethod$1>): {
|
|
@@ -1530,6 +1574,7 @@ declare const BUNDLED_RESOURCES: {
|
|
|
1530
1574
|
};
|
|
1531
1575
|
userMenu: {
|
|
1532
1576
|
logout: string;
|
|
1577
|
+
offCanvasToggle: string;
|
|
1533
1578
|
};
|
|
1534
1579
|
order: {
|
|
1535
1580
|
orderTitle: string;
|
|
@@ -2432,6 +2477,7 @@ declare const BUNDLED_RESOURCES: {
|
|
|
2432
2477
|
};
|
|
2433
2478
|
userMenu: {
|
|
2434
2479
|
logout: string;
|
|
2480
|
+
offCanvasToggle: string;
|
|
2435
2481
|
};
|
|
2436
2482
|
order: {
|
|
2437
2483
|
orderTitle: string;
|
|
@@ -3662,6 +3708,7 @@ declare const baseNamespaces: {
|
|
|
3662
3708
|
};
|
|
3663
3709
|
userMenu: {
|
|
3664
3710
|
logout: string;
|
|
3711
|
+
offCanvasToggle: string;
|
|
3665
3712
|
};
|
|
3666
3713
|
order: {
|
|
3667
3714
|
orderTitle: string;
|
|
@@ -4662,6 +4709,7 @@ declare class OffCanvasCart implements PageObject {
|
|
|
4662
4709
|
constructor(page: Page);
|
|
4663
4710
|
url(): string;
|
|
4664
4711
|
getLineItemByProductNumber(productNumber: string): Promise<Record<string, Locator>>;
|
|
4712
|
+
getLineItemByPromotionName(name: string): Promise<Record<string, Locator>>;
|
|
4665
4713
|
}
|
|
4666
4714
|
|
|
4667
4715
|
declare class CheckoutConfirm implements PageObject {
|
|
@@ -4696,7 +4744,10 @@ declare class CheckoutConfirm implements PageObject {
|
|
|
4696
4744
|
*/
|
|
4697
4745
|
readonly cartLineItemImages: Locator;
|
|
4698
4746
|
readonly page: Page;
|
|
4747
|
+
readonly confirmProductTable: Locator;
|
|
4699
4748
|
constructor(page: Page);
|
|
4749
|
+
getLineItemByProductName(productName: string): Record<string, Locator>;
|
|
4750
|
+
getLineItemByPromotionName(promotionName: string): Record<string, Locator>;
|
|
4700
4751
|
url(): string;
|
|
4701
4752
|
}
|
|
4702
4753
|
|
|
@@ -5554,6 +5605,7 @@ declare class DataSharing implements PageObject {
|
|
|
5554
5605
|
declare class Dashboard implements PageObject {
|
|
5555
5606
|
readonly contentView: Locator;
|
|
5556
5607
|
readonly adminMenuView: Locator;
|
|
5608
|
+
readonly adminMenuOffCanvasToggle: Locator;
|
|
5557
5609
|
readonly adminMenuCatalog: Locator;
|
|
5558
5610
|
readonly adminMenuOrder: Locator;
|
|
5559
5611
|
readonly adminMenuOrderOverview: Locator;
|
|
@@ -6013,6 +6065,7 @@ declare class CustomerBulkEdit implements PageObject {
|
|
|
6013
6065
|
readonly customFieldCheckbox: Locator;
|
|
6014
6066
|
readonly customFieldInput: Locator;
|
|
6015
6067
|
readonly customFieldArrowRightButton: Locator;
|
|
6068
|
+
readonly customFieldSet: (customFieldSetName: string) => Locator;
|
|
6016
6069
|
/**
|
|
6017
6070
|
* Confirmation modal
|
|
6018
6071
|
*/
|
|
@@ -6022,10 +6075,10 @@ declare class CustomerBulkEdit implements PageObject {
|
|
|
6022
6075
|
readonly confirmModalSuccessHeader: Locator;
|
|
6023
6076
|
readonly confirmModalSuccessCloseButton: Locator;
|
|
6024
6077
|
readonly page: Page;
|
|
6025
|
-
|
|
6078
|
+
readonly instanceMeta?: HelperFixtureTypes["InstanceMeta"];
|
|
6079
|
+
constructor(page: Page, instanceMeta?: HelperFixtureTypes["InstanceMeta"]);
|
|
6026
6080
|
getPageHeadline(customerCount: number): Promise<Locator>;
|
|
6027
6081
|
getCustomFieldInputByName(customFieldName: string): Promise<Locator>;
|
|
6028
|
-
getCustomFieldLinkByName(customFieldSetName: string): Promise<Locator>;
|
|
6029
6082
|
url(): string;
|
|
6030
6083
|
}
|
|
6031
6084
|
|
|
@@ -6891,4 +6944,4 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
|
|
|
6891
6944
|
}>;
|
|
6892
6945
|
|
|
6893
6946
|
export { Actor, AdminPageObjects, BUNDLED_RESOURCES, COUNTRY_ADDRESS_DATA, FeatureService, IdProvider, LanguageHelper, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, baseNamespaces, clearDelayedCache, compareFlowTemplateWithFlow, createNewAdminPageContext, createRandomImage, createSolidColorImage, encodeImage, expandAdminMenu, extractIdFromUrl, formatPrice, getCountryAddressData, getCountryCodeFromLocale, getCountryId, getCurrency, getCurrencyCodeFromLocale, getCurrencySymbolFromLocale, getCurrentContext, getDefaultShippingMethodId, getFlow, getFlowId, getFlowTemplate, getLanguageCode, getLanguageData, getLocale, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, hideElements, hideSymfonyToolbarOnReload, isPaaSInstance, isSaaSInstance, isThemeCompiled, loginToAdministration, mockApiCalls, replaceElements, replaceElementsIndividually, setCurrentContext, setOrderStatus, setViewport, test, translate, updateAdminUser, uploadRandomPngMedia };
|
|
6894
|
-
export type { AccountData, AclRole, Address, CalculatedTaxes, Category$1 as Category, CategoryCustomizableLinkData, CategoryData, CmsPage, Country$1 as Country, CreatedRecord, Currency$2 as Currency, CustomField, CustomFieldData, CustomFieldSet, Customer, CustomerAddress, CustomerGroup, DataServiceOptions, DeliveryTime, FixtureTypes, Flow, FlowConfig, FlowTemplate, Image, Language$2 as Language, Manufacturer, Media$1 as Media, Options, Order, OrderDelivery, OrderLineItem, OrderStatus, PageObject, PaymentMethod$1 as PaymentMethod, Price, Product, ProductCrossSelling, ProductPrice, ProductReview, Promotion, PromotionDiscount, PropertyGroup, PropertyGroupOption, RegistrationData, ReplaceTarget, Rule, RuleAssignmentEntity, SalesChannel, SalesChannelAnalytics, SalesChannelDomain, SalesChannelRecord, Salutation, ShippingMethod$1 as ShippingMethod, SimpleLineItem, StateMachine, StateMachineState, SyncApiOperation, SystemConfig, Tag, TagData, Task, Tax$1 as Tax, TaxRules, TranslateFn, TranslationKey, UploadMediaTarget, User, VariantListingConfig };
|
|
6947
|
+
export type { AccountData, AclRole, Address, BasicRuleCondition, CalculatedTaxes, Category$1 as Category, CategoryCustomizableLinkData, CategoryData, CmsPage, Country$1 as Country, CreatedRecord, Currency$2 as Currency, CustomField, CustomFieldData, CustomFieldSet, Customer, CustomerAddress, CustomerGroup, DataServiceOptions, DeliveryTime, FixtureTypes, Flow, FlowConfig, FlowTemplate, Image, Language$2 as Language, Manufacturer, Media$1 as Media, NewsletterRecipient, Options, Order, OrderDelivery, OrderLineItem, OrderStatus, PageObject, PaymentMethod$1 as PaymentMethod, Price, Product, ProductCrossSelling, ProductPrice, ProductReview, Promotion, PromotionDiscount, PromotionWithConditionRuleOptions, PropertyGroup, PropertyGroupOption, RegistrationData, ReplaceTarget, Rule, RuleAssignmentEntity, SalesChannel, SalesChannelAnalytics, SalesChannelDomain, SalesChannelRecord, Salutation, ShippingMethod$1 as ShippingMethod, SimpleLineItem, StateMachine, StateMachineState, SyncApiOperation, SystemConfig, Tag, TagData, Task, Tax$1 as Tax, TaxRules, TranslateFn, TranslationKey, UploadMediaTarget, User, VariantListingConfig };
|
package/dist/index.mjs
CHANGED
|
@@ -1317,7 +1317,8 @@ const shopwareServices$1 = {
|
|
|
1317
1317
|
exploreNow: "Explore now"
|
|
1318
1318
|
};
|
|
1319
1319
|
const userMenu$1 = {
|
|
1320
|
-
logout: "Logout"
|
|
1320
|
+
logout: "Logout",
|
|
1321
|
+
offCanvasToggle: "Expand menu"
|
|
1321
1322
|
};
|
|
1322
1323
|
const order$1 = {
|
|
1323
1324
|
orderTitle: "Orders",
|
|
@@ -2423,7 +2424,8 @@ const shopwareServices = {
|
|
|
2423
2424
|
exploreNow: "Jetzt erkunden"
|
|
2424
2425
|
};
|
|
2425
2426
|
const userMenu = {
|
|
2426
|
-
logout: "Abmelden"
|
|
2427
|
+
logout: "Abmelden",
|
|
2428
|
+
offCanvasToggle: "Menü ausklappen"
|
|
2427
2429
|
};
|
|
2428
2430
|
const order = {
|
|
2429
2431
|
orderTitle: "Bestellungen",
|
|
@@ -4276,6 +4278,35 @@ class TestDataService {
|
|
|
4276
4278
|
this.nameSuffix = options.nameSuffix;
|
|
4277
4279
|
}
|
|
4278
4280
|
}
|
|
4281
|
+
/**
|
|
4282
|
+
* Creates a newsletter recipient for a customer in the default sales channel.
|
|
4283
|
+
* If a matching recipient already exists, it will be reused and registered for cleanup.
|
|
4284
|
+
*
|
|
4285
|
+
* @param customer - The customer whose email and profile data will be used for the newsletter recipient.
|
|
4286
|
+
* @param overrides - Specific data overrides that will be applied to the newsletter recipient payload.
|
|
4287
|
+
*/
|
|
4288
|
+
async createNewsletterRecipient(customer, overrides = {}) {
|
|
4289
|
+
const hash = this.IdProvider.getIdPair();
|
|
4290
|
+
const recipientPayload = {
|
|
4291
|
+
email: customer.email,
|
|
4292
|
+
salesChannelId: this.defaultSalesChannel.id,
|
|
4293
|
+
firstName: customer.firstName ?? `Test ${hash.id}`,
|
|
4294
|
+
lastName: customer.lastName ?? `User ${hash.id}`,
|
|
4295
|
+
hash: customer.id || hash.uuid,
|
|
4296
|
+
status: "direct",
|
|
4297
|
+
languageId: customer.languageId ?? this.defaultLanguageId,
|
|
4298
|
+
salutationId: customer.salutationId,
|
|
4299
|
+
confirmedAt: this.convertDateTime(/* @__PURE__ */ new Date()),
|
|
4300
|
+
...overrides
|
|
4301
|
+
};
|
|
4302
|
+
const resp = await this.AdminApiClient.post("newsletter-recipient?_response=detail", {
|
|
4303
|
+
data: recipientPayload
|
|
4304
|
+
});
|
|
4305
|
+
expect(resp.ok()).toBeTruthy();
|
|
4306
|
+
const { data: recipient } = await resp.json();
|
|
4307
|
+
this.addCreatedRecord("newsletter_recipient", recipient.id);
|
|
4308
|
+
return recipient;
|
|
4309
|
+
}
|
|
4279
4310
|
/**
|
|
4280
4311
|
* Creates a basic product without images or other special configuration.
|
|
4281
4312
|
* The product will be added to the default sales channel category if configured.
|
|
@@ -4805,6 +4836,48 @@ class TestDataService {
|
|
|
4805
4836
|
this.addCreatedRecord("promotion", promotion.id);
|
|
4806
4837
|
return promotionWithDiscount;
|
|
4807
4838
|
}
|
|
4839
|
+
/**
|
|
4840
|
+
* Creates a promotion with one discount and assigns a condition rule as a persona rule.
|
|
4841
|
+
* The created promotion and assigned rule are both registered for cleanup.
|
|
4842
|
+
*
|
|
4843
|
+
* @param promotionConfig - Promotion configuration, including the promotion id, name, and assigned rule id.
|
|
4844
|
+
*/
|
|
4845
|
+
async createPromotionWithConditionRule(promotionConfig) {
|
|
4846
|
+
const useCode = promotionConfig.useCode ?? false;
|
|
4847
|
+
const basicPromotion = this.getBasicPromotionStruct(promotionConfig.salesChannelId, {
|
|
4848
|
+
id: promotionConfig.id,
|
|
4849
|
+
name: promotionConfig.name,
|
|
4850
|
+
useCodes: useCode,
|
|
4851
|
+
useIndividualCodes: useCode,
|
|
4852
|
+
discounts: [
|
|
4853
|
+
{
|
|
4854
|
+
scope: promotionConfig.discountScope ?? "cart",
|
|
4855
|
+
type: promotionConfig.discountType ?? "percentage",
|
|
4856
|
+
value: promotionConfig.discountValue ?? 10,
|
|
4857
|
+
considerAdvancedRules: false
|
|
4858
|
+
}
|
|
4859
|
+
]
|
|
4860
|
+
});
|
|
4861
|
+
if (!useCode) {
|
|
4862
|
+
delete basicPromotion.code;
|
|
4863
|
+
}
|
|
4864
|
+
const promotionWithConditionRule = {
|
|
4865
|
+
...basicPromotion,
|
|
4866
|
+
personaRules: [
|
|
4867
|
+
{
|
|
4868
|
+
id: promotionConfig.ruleId
|
|
4869
|
+
}
|
|
4870
|
+
]
|
|
4871
|
+
};
|
|
4872
|
+
const promotionResponse = await this.AdminApiClient.post("promotion?_response=detail", {
|
|
4873
|
+
data: promotionWithConditionRule
|
|
4874
|
+
});
|
|
4875
|
+
expect(promotionResponse.ok()).toBeTruthy();
|
|
4876
|
+
const { data: promotion } = await promotionResponse.json();
|
|
4877
|
+
this.addCreatedRecord("promotion", promotionConfig.id);
|
|
4878
|
+
this.addCreatedRecord("rule", promotionConfig.ruleId);
|
|
4879
|
+
return promotion;
|
|
4880
|
+
}
|
|
4808
4881
|
/**
|
|
4809
4882
|
* Creates a new basic payment method.
|
|
4810
4883
|
*
|
|
@@ -4860,12 +4933,14 @@ class TestDataService {
|
|
|
4860
4933
|
return shippingMethod;
|
|
4861
4934
|
}
|
|
4862
4935
|
/**
|
|
4863
|
-
* Creates a new basic rule with the condition cart amount >= 1.
|
|
4936
|
+
* Creates a new basic rule with the condition cart amount >= 1 by default.
|
|
4937
|
+
* Pass a condition object to create the same basic rule structure with another condition.
|
|
4864
4938
|
*
|
|
4865
4939
|
* @param overrides - Specific data overrides that will be applied to the basic rule data struct.
|
|
4940
|
+
* @param condition - The condition object or condition type used in the generated rule.
|
|
4866
4941
|
*/
|
|
4867
|
-
async createBasicRule(overrides = {},
|
|
4868
|
-
const basicRule = this.getBasicRuleStruct(overrides,
|
|
4942
|
+
async createBasicRule(overrides = {}, condition = "cartCartAmount", operator = ">=", amount = 1) {
|
|
4943
|
+
const basicRule = this.getBasicRuleStruct(overrides, condition, operator, amount);
|
|
4869
4944
|
const ruleResponse = await this.AdminApiClient.post("rule?_response=detail", {
|
|
4870
4945
|
data: basicRule
|
|
4871
4946
|
});
|
|
@@ -5410,6 +5485,32 @@ class TestDataService {
|
|
|
5410
5485
|
const { data: aclUser } = await syncAclUserResponse.json();
|
|
5411
5486
|
return aclUser;
|
|
5412
5487
|
}
|
|
5488
|
+
/**
|
|
5489
|
+
* Retrieves a newsletter recipient by customer email and the default sales channel.
|
|
5490
|
+
* @param customer - The customer whose email will be used to search for a newsletter recipient.
|
|
5491
|
+
*/
|
|
5492
|
+
async getNewsletterRecipient(customer) {
|
|
5493
|
+
const response = await this.AdminApiClient.post("search/newsletter-recipient", {
|
|
5494
|
+
data: {
|
|
5495
|
+
limit: 1,
|
|
5496
|
+
filter: [
|
|
5497
|
+
{
|
|
5498
|
+
type: "equals",
|
|
5499
|
+
field: "email",
|
|
5500
|
+
value: customer.email
|
|
5501
|
+
},
|
|
5502
|
+
{
|
|
5503
|
+
type: "equals",
|
|
5504
|
+
field: "salesChannelId",
|
|
5505
|
+
value: this.defaultSalesChannel.id
|
|
5506
|
+
}
|
|
5507
|
+
]
|
|
5508
|
+
}
|
|
5509
|
+
});
|
|
5510
|
+
expect(response.ok()).toBeTruthy();
|
|
5511
|
+
const { data: result } = await response.json();
|
|
5512
|
+
return result[0];
|
|
5513
|
+
}
|
|
5413
5514
|
/**
|
|
5414
5515
|
* Retrieves a language based on its code.
|
|
5415
5516
|
* @param languageCode
|
|
@@ -6029,9 +6130,16 @@ class TestDataService {
|
|
|
6029
6130
|
}
|
|
6030
6131
|
return Object.assign({}, basicProduct, overrides);
|
|
6031
6132
|
}
|
|
6032
|
-
getBasicRuleStruct(overrides = {},
|
|
6133
|
+
getBasicRuleStruct(overrides = {}, condition = "cartCartAmount", operator = ">=", amount = 1) {
|
|
6033
6134
|
const { id: ruleId, uuid: ruleUuid } = this.IdProvider.getIdPair();
|
|
6034
6135
|
const ruleName = `${this.namePrefix}Rule-${ruleId}${this.nameSuffix}`;
|
|
6136
|
+
const ruleCondition = typeof condition === "string" ? {
|
|
6137
|
+
type: condition,
|
|
6138
|
+
value: {
|
|
6139
|
+
operator,
|
|
6140
|
+
amount
|
|
6141
|
+
}
|
|
6142
|
+
} : condition;
|
|
6035
6143
|
const description = `
|
|
6036
6144
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
|
|
6037
6145
|
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
|
@@ -6048,15 +6156,7 @@ class TestDataService {
|
|
|
6048
6156
|
children: [
|
|
6049
6157
|
{
|
|
6050
6158
|
type: "andContainer",
|
|
6051
|
-
children: [
|
|
6052
|
-
{
|
|
6053
|
-
type: conditionType,
|
|
6054
|
-
value: {
|
|
6055
|
-
operator,
|
|
6056
|
-
amount
|
|
6057
|
-
}
|
|
6058
|
-
}
|
|
6059
|
-
]
|
|
6159
|
+
children: [ruleCondition]
|
|
6060
6160
|
}
|
|
6061
6161
|
]
|
|
6062
6162
|
}
|
|
@@ -7372,6 +7472,16 @@ class OffCanvasCart {
|
|
|
7372
7472
|
lineItemGaranLabel
|
|
7373
7473
|
};
|
|
7374
7474
|
}
|
|
7475
|
+
async getLineItemByPromotionName(name) {
|
|
7476
|
+
const promotionItem = this.page.locator(".line-item-promotion", { hasText: name });
|
|
7477
|
+
const promotionLabel = promotionItem.locator(".line-item-label");
|
|
7478
|
+
const promotionPrice = promotionItem.locator(".line-item-total-price-value");
|
|
7479
|
+
return {
|
|
7480
|
+
promotionItem,
|
|
7481
|
+
promotionLabel,
|
|
7482
|
+
promotionPrice
|
|
7483
|
+
};
|
|
7484
|
+
}
|
|
7375
7485
|
}
|
|
7376
7486
|
|
|
7377
7487
|
class CheckoutConfirm {
|
|
@@ -7406,6 +7516,7 @@ class CheckoutConfirm {
|
|
|
7406
7516
|
*/
|
|
7407
7517
|
cartLineItemImages;
|
|
7408
7518
|
page;
|
|
7519
|
+
confirmProductTable;
|
|
7409
7520
|
constructor(page) {
|
|
7410
7521
|
this.page = page;
|
|
7411
7522
|
this.headline = page.getByRole("heading", { name: translate("storefront:checkout:confirm.completeOrder") });
|
|
@@ -7427,6 +7538,27 @@ class CheckoutConfirm {
|
|
|
7427
7538
|
this.termsAndConditionsWithLegalGuaranteeRightsLabel = page.getByLabel(translate("storefront:checkout:confirm.termsAndConditionsWithLegalGuaranteeRights"));
|
|
7428
7539
|
this.legalGuaranteeNoticeLink = page.locator("#legalGuaranteeNoticeModal a");
|
|
7429
7540
|
this.lineItemGaranLabel = page.locator(".line-item-garan-label");
|
|
7541
|
+
this.confirmProductTable = page.locator(".confirm-product");
|
|
7542
|
+
}
|
|
7543
|
+
getLineItemByProductName(productName) {
|
|
7544
|
+
const productLineItem = this.confirmProductTable.locator(".line-item-product", { hasText: productName });
|
|
7545
|
+
const productNameLabel = productLineItem.locator(".line-item-label");
|
|
7546
|
+
const productTotalPrice = productLineItem.locator(".line-item-total-price-value");
|
|
7547
|
+
return {
|
|
7548
|
+
productLineItem,
|
|
7549
|
+
productNameLabel,
|
|
7550
|
+
productTotalPrice
|
|
7551
|
+
};
|
|
7552
|
+
}
|
|
7553
|
+
getLineItemByPromotionName(promotionName) {
|
|
7554
|
+
const promotionLineItem = this.confirmProductTable.locator(".line-item-promotion", { hasText: promotionName });
|
|
7555
|
+
const promotionNameLabel = promotionLineItem.locator(".line-item-label");
|
|
7556
|
+
const promotionTotalPrice = promotionLineItem.locator(".line-item-total-price-value");
|
|
7557
|
+
return {
|
|
7558
|
+
promotionLineItem,
|
|
7559
|
+
promotionNameLabel,
|
|
7560
|
+
promotionTotalPrice
|
|
7561
|
+
};
|
|
7430
7562
|
}
|
|
7431
7563
|
url() {
|
|
7432
7564
|
return "checkout/confirm";
|
|
@@ -9366,6 +9498,7 @@ class DataSharing {
|
|
|
9366
9498
|
class Dashboard {
|
|
9367
9499
|
contentView;
|
|
9368
9500
|
adminMenuView;
|
|
9501
|
+
adminMenuOffCanvasToggle;
|
|
9369
9502
|
adminMenuCatalog;
|
|
9370
9503
|
adminMenuOrder;
|
|
9371
9504
|
adminMenuOrderOverview;
|
|
@@ -9398,6 +9531,7 @@ class Dashboard {
|
|
|
9398
9531
|
constructor(page) {
|
|
9399
9532
|
this.page = page;
|
|
9400
9533
|
this.adminMenuView = page.locator(".sw-admin-menu");
|
|
9534
|
+
this.adminMenuOffCanvasToggle = page.getByRole("button", { name: translate("administration:dashboard:userMenu.offCanvasToggle") });
|
|
9401
9535
|
this.contentView = page.locator(".sw-desktop__content");
|
|
9402
9536
|
this.adminMenuCatalog = page.locator(".sw-catalogue");
|
|
9403
9537
|
this.adminMenuOrder = page.locator(".sw-order");
|
|
@@ -9428,7 +9562,7 @@ class Dashboard {
|
|
|
9428
9562
|
name: translate("administration:dashboard:shopwareServices.exploreNow")
|
|
9429
9563
|
});
|
|
9430
9564
|
this.adminMenuUserActions = page.locator(".sw-admin-menu__user-actions-toggle");
|
|
9431
|
-
this.adminMenuLogoutButton = page.
|
|
9565
|
+
this.adminMenuLogoutButton = page.getByText(translate("administration:dashboard:userMenu.logout"));
|
|
9432
9566
|
}
|
|
9433
9567
|
url() {
|
|
9434
9568
|
return "#/sw/dashboard/index";
|
|
@@ -10379,6 +10513,7 @@ class CustomerBulkEdit {
|
|
|
10379
10513
|
customFieldCheckbox;
|
|
10380
10514
|
customFieldInput;
|
|
10381
10515
|
customFieldArrowRightButton;
|
|
10516
|
+
customFieldSet;
|
|
10382
10517
|
/**
|
|
10383
10518
|
* Confirmation modal
|
|
10384
10519
|
*/
|
|
@@ -10388,8 +10523,10 @@ class CustomerBulkEdit {
|
|
|
10388
10523
|
confirmModalSuccessHeader;
|
|
10389
10524
|
confirmModalSuccessCloseButton;
|
|
10390
10525
|
page;
|
|
10391
|
-
|
|
10526
|
+
instanceMeta;
|
|
10527
|
+
constructor(page, instanceMeta) {
|
|
10392
10528
|
this.page = page;
|
|
10529
|
+
this.instanceMeta = instanceMeta;
|
|
10393
10530
|
this.applyChangesButton = page.getByRole("button", { name: translate("administration:customer:bulkEdit.applyChanges") });
|
|
10394
10531
|
this.filtersResultPopoverItemList = page.locator(".sw-select-result-list__content").getByRole("listitem");
|
|
10395
10532
|
this.changeCustomerGroupCheckbox = page.getByRole("checkbox", { name: translate("administration:customer:bulkEdit.changes.customerGroup") });
|
|
@@ -10409,6 +10546,7 @@ class CustomerBulkEdit {
|
|
|
10409
10546
|
this.customFieldArrowRightButton = customFields.locator(".sw-tabs__arrow--right");
|
|
10410
10547
|
this.customFieldCheckbox = customFields.getByRole("checkbox");
|
|
10411
10548
|
this.customFieldInput = customFields.getByRole("textbox");
|
|
10549
|
+
this.customFieldSet = (customFieldSetName) => this.instanceMeta?.features["V6_8_0_0"] ? customFields.locator(".mt-tabs__item").getByText(customFieldSetName, { exact: true }) : this.page.locator("a").filter({ hasText: customFieldSetName });
|
|
10412
10550
|
this.confirmModal = page.locator(".sw-bulk-edit-save-modal");
|
|
10413
10551
|
this.confirmModalApplyChangesButton = this.confirmModal.getByRole("button", { name: translate("administration:customer:bulkEdit.applyChanges") });
|
|
10414
10552
|
this.confirmModalLoadingSpinner = this.confirmModal.locator(".sw-bulk-edit-save-modal__loading-icon");
|
|
@@ -10422,11 +10560,6 @@ class CustomerBulkEdit {
|
|
|
10422
10560
|
async getCustomFieldInputByName(customFieldName) {
|
|
10423
10561
|
return this.page.getByRole("textbox", { name: customFieldName });
|
|
10424
10562
|
}
|
|
10425
|
-
async getCustomFieldLinkByName(customFieldSetName) {
|
|
10426
|
-
return this.page.locator("a").filter({
|
|
10427
|
-
hasText: `${customFieldSetName}`
|
|
10428
|
-
});
|
|
10429
|
-
}
|
|
10430
10563
|
url() {
|
|
10431
10564
|
return "#/sw/bulk/edit/customer";
|
|
10432
10565
|
}
|
|
@@ -11307,8 +11440,8 @@ const test$6 = test$e.extend({
|
|
|
11307
11440
|
AdminProductBulkEdit: async ({ AdminPage }, use) => {
|
|
11308
11441
|
await use(new ProductBulkEdit(AdminPage));
|
|
11309
11442
|
},
|
|
11310
|
-
AdminCustomerBulkEdit: async ({ AdminPage }, use) => {
|
|
11311
|
-
await use(new CustomerBulkEdit(AdminPage));
|
|
11443
|
+
AdminCustomerBulkEdit: async ({ AdminPage, InstanceMeta }, use) => {
|
|
11444
|
+
await use(new CustomerBulkEdit(AdminPage, InstanceMeta));
|
|
11312
11445
|
},
|
|
11313
11446
|
AdminSettingsListing: async ({ AdminPage }, use) => {
|
|
11314
11447
|
await use(new SettingsListing(AdminPage));
|
|
@@ -12144,7 +12277,7 @@ const BulkEditCustomers = test$e.extend({
|
|
|
12144
12277
|
if (accountData.language) {
|
|
12145
12278
|
await AdminCustomerBulkEdit.changeLanguageCheckbox.click();
|
|
12146
12279
|
await AdminCustomerBulkEdit.changeLanguageInput.click();
|
|
12147
|
-
await AdminCustomerBulkEdit.
|
|
12280
|
+
await AdminCustomerBulkEdit.filtersResultPopoverItemList.getByText(accountData.language, { exact: true }).click();
|
|
12148
12281
|
}
|
|
12149
12282
|
if (accountData.replyToCustomerGroupRequest) {
|
|
12150
12283
|
await AdminCustomerBulkEdit.replyToCustomerGroupRequest.click();
|
|
@@ -12165,7 +12298,7 @@ const BulkEditCustomers = test$e.extend({
|
|
|
12165
12298
|
}
|
|
12166
12299
|
}
|
|
12167
12300
|
if (customFieldData) {
|
|
12168
|
-
const customFieldSet =
|
|
12301
|
+
const customFieldSet = AdminCustomerBulkEdit.customFieldSet(customFieldData.customFieldSetName);
|
|
12169
12302
|
while (!await customFieldSet.isVisible()) {
|
|
12170
12303
|
await AdminCustomerBulkEdit.customFieldArrowRightButton.click();
|
|
12171
12304
|
}
|