@shopware-ag/acceptance-test-suite 12.20.0 → 12.21.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 +66 -5
- package/dist/index.d.ts +66 -5
- package/dist/index.mjs +198 -32
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -6,7 +6,6 @@ import * as axe_core from 'axe-core';
|
|
|
6
6
|
import * as playwright_test from '@playwright/test';
|
|
7
7
|
import { Page as Page$1, Locator as Locator$1, Browser } from '@playwright/test';
|
|
8
8
|
export { expect, mergeTests } from '@playwright/test';
|
|
9
|
-
import { Image } from 'image-js';
|
|
10
9
|
|
|
11
10
|
interface RequestOptions$1<PAYLOAD> {
|
|
12
11
|
[key: string]: unknown;
|
|
@@ -139,6 +138,13 @@ interface ApiContextTypes {
|
|
|
139
138
|
MailpitApiContext: MailpitApiContext;
|
|
140
139
|
}
|
|
141
140
|
|
|
141
|
+
type NewsletterRecipient = components["schemas"]["NewsletterRecipient"] & {
|
|
142
|
+
id: string;
|
|
143
|
+
email: string;
|
|
144
|
+
salesChannelId: string;
|
|
145
|
+
firstName: string;
|
|
146
|
+
lastName: string;
|
|
147
|
+
};
|
|
142
148
|
type SalesChannel = components["schemas"]["SalesChannel"] & {
|
|
143
149
|
id: string;
|
|
144
150
|
};
|
|
@@ -260,6 +266,11 @@ type Tag = components["schemas"]["Tag"] & {
|
|
|
260
266
|
type Rule = components["schemas"]["Rule"] & {
|
|
261
267
|
id: string;
|
|
262
268
|
};
|
|
269
|
+
interface BasicRuleCondition {
|
|
270
|
+
type: string;
|
|
271
|
+
value: Record<string, unknown>;
|
|
272
|
+
children?: BasicRuleCondition[];
|
|
273
|
+
}
|
|
263
274
|
type Currency$2 = components["schemas"]["Currency"] & {
|
|
264
275
|
id: string;
|
|
265
276
|
};
|
|
@@ -335,6 +346,16 @@ type Promotion = Omit<components["schemas"]["Promotion"], "discounts"> & {
|
|
|
335
346
|
type PromotionDiscount = components["schemas"]["PromotionDiscount"] & {
|
|
336
347
|
id: string;
|
|
337
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
|
+
}
|
|
338
359
|
type OrderLineItem = components["schemas"]["OrderLineItem"] & {
|
|
339
360
|
id: string;
|
|
340
361
|
};
|
|
@@ -584,6 +605,14 @@ declare class TestDataService {
|
|
|
584
605
|
*/
|
|
585
606
|
private createdSalesChannelRecords;
|
|
586
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>;
|
|
587
616
|
/**
|
|
588
617
|
* Creates a basic product without images or other special configuration.
|
|
589
618
|
* The product will be added to the default sales channel category if configured.
|
|
@@ -756,6 +785,13 @@ declare class TestDataService {
|
|
|
756
785
|
* @param salesChannelId - The uuid of the sales channel in which the promotion should be active.
|
|
757
786
|
*/
|
|
758
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>;
|
|
759
795
|
/**
|
|
760
796
|
* Creates a new basic payment method.
|
|
761
797
|
*
|
|
@@ -781,11 +817,13 @@ declare class TestDataService {
|
|
|
781
817
|
*/
|
|
782
818
|
createShippingMethodWithImage(overrides?: Partial<ShippingMethod$1>): Promise<ShippingMethod$1>;
|
|
783
819
|
/**
|
|
784
|
-
* 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.
|
|
785
822
|
*
|
|
786
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.
|
|
787
825
|
*/
|
|
788
|
-
createBasicRule(overrides?: Partial<Rule>,
|
|
826
|
+
createBasicRule(overrides?: Partial<Rule>, condition?: BasicRuleCondition | string, operator?: string, amount?: number): Promise<Rule>;
|
|
789
827
|
/**
|
|
790
828
|
* Creates a new basic page layout.
|
|
791
829
|
*
|
|
@@ -971,6 +1009,11 @@ declare class TestDataService {
|
|
|
971
1009
|
|
|
972
1010
|
*/
|
|
973
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>;
|
|
974
1017
|
/**
|
|
975
1018
|
* Retrieves a language based on its code.
|
|
976
1019
|
* @param languageCode
|
|
@@ -1154,7 +1197,7 @@ declare class TestDataService {
|
|
|
1154
1197
|
getCountryStruct(overrides?: Partial<Country$1>): Partial<Country$1>;
|
|
1155
1198
|
getCurrencyStruct(overrides: Partial<Currency$2> | undefined, roundingDecimals: number): Partial<Currency$2>;
|
|
1156
1199
|
getBasicProductStruct(taxId?: string, currencyId?: string, overrides?: Partial<Product>): Partial<Product>;
|
|
1157
|
-
getBasicRuleStruct(overrides
|
|
1200
|
+
getBasicRuleStruct(overrides?: Partial<Rule>, condition?: BasicRuleCondition | string, operator?: string, amount?: number): Partial<Rule>;
|
|
1158
1201
|
getProductPriceRangeStruct(currencyId: string, ruleId: string): Partial<Product>;
|
|
1159
1202
|
getBasicManufacturerStruct(overrides?: Partial<Manufacturer>): Partial<Manufacturer>;
|
|
1160
1203
|
getBasicPaymentMethodStruct(overrides?: Partial<PaymentMethod$1>): {
|
|
@@ -1531,6 +1574,7 @@ declare const BUNDLED_RESOURCES: {
|
|
|
1531
1574
|
};
|
|
1532
1575
|
userMenu: {
|
|
1533
1576
|
logout: string;
|
|
1577
|
+
offCanvasToggle: string;
|
|
1534
1578
|
};
|
|
1535
1579
|
order: {
|
|
1536
1580
|
orderTitle: string;
|
|
@@ -2433,6 +2477,7 @@ declare const BUNDLED_RESOURCES: {
|
|
|
2433
2477
|
};
|
|
2434
2478
|
userMenu: {
|
|
2435
2479
|
logout: string;
|
|
2480
|
+
offCanvasToggle: string;
|
|
2436
2481
|
};
|
|
2437
2482
|
order: {
|
|
2438
2483
|
orderTitle: string;
|
|
@@ -3663,6 +3708,7 @@ declare const baseNamespaces: {
|
|
|
3663
3708
|
};
|
|
3664
3709
|
userMenu: {
|
|
3665
3710
|
logout: string;
|
|
3711
|
+
offCanvasToggle: string;
|
|
3666
3712
|
};
|
|
3667
3713
|
order: {
|
|
3668
3714
|
orderTitle: string;
|
|
@@ -4663,6 +4709,7 @@ declare class OffCanvasCart implements PageObject {
|
|
|
4663
4709
|
constructor(page: Page);
|
|
4664
4710
|
url(): string;
|
|
4665
4711
|
getLineItemByProductNumber(productNumber: string): Promise<Record<string, Locator>>;
|
|
4712
|
+
getLineItemByPromotionName(name: string): Promise<Record<string, Locator>>;
|
|
4666
4713
|
}
|
|
4667
4714
|
|
|
4668
4715
|
declare class CheckoutConfirm implements PageObject {
|
|
@@ -4697,7 +4744,10 @@ declare class CheckoutConfirm implements PageObject {
|
|
|
4697
4744
|
*/
|
|
4698
4745
|
readonly cartLineItemImages: Locator;
|
|
4699
4746
|
readonly page: Page;
|
|
4747
|
+
readonly confirmProductTable: Locator;
|
|
4700
4748
|
constructor(page: Page);
|
|
4749
|
+
getLineItemByProductName(productName: string): Record<string, Locator>;
|
|
4750
|
+
getLineItemByPromotionName(promotionName: string): Record<string, Locator>;
|
|
4701
4751
|
url(): string;
|
|
4702
4752
|
}
|
|
4703
4753
|
|
|
@@ -5437,6 +5487,7 @@ declare class FlowBuilderCreate implements PageObject {
|
|
|
5437
5487
|
readonly saveButton: Locator;
|
|
5438
5488
|
readonly header: Locator;
|
|
5439
5489
|
readonly smartBarHeader: Locator;
|
|
5490
|
+
readonly skeletonLoader: Locator;
|
|
5440
5491
|
readonly generalTab: Locator;
|
|
5441
5492
|
readonly flowTab: Locator;
|
|
5442
5493
|
readonly nameField: Locator;
|
|
@@ -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;
|
|
@@ -6637,6 +6689,13 @@ declare const isSaaSInstance: (adminApiContext: AdminApiContext) => Promise<bool
|
|
|
6637
6689
|
declare const isPaaSInstance: () => boolean;
|
|
6638
6690
|
declare const isThemeCompiled: (context: StoreApiContext, storefrontUrl: string) => Promise<boolean>;
|
|
6639
6691
|
|
|
6692
|
+
interface Image {
|
|
6693
|
+
width: number;
|
|
6694
|
+
height: number;
|
|
6695
|
+
data: Uint8Array;
|
|
6696
|
+
channels: 3;
|
|
6697
|
+
depth: 8;
|
|
6698
|
+
}
|
|
6640
6699
|
declare function createRandomImage(width?: number, height?: number): Image;
|
|
6641
6700
|
declare function createSolidColorImage(width?: number, height?: number, color?: [number, number, number]): Image;
|
|
6642
6701
|
declare function encodeImage(image: Image): Buffer<ArrayBuffer>;
|
|
@@ -6813,6 +6872,8 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
|
|
|
6813
6872
|
CheckVisibilityOfServicesBanner: Task;
|
|
6814
6873
|
} & {
|
|
6815
6874
|
DeactivateShopwareServices: Task;
|
|
6875
|
+
} & {
|
|
6876
|
+
SelectExtensionCategory: Task;
|
|
6816
6877
|
} & {
|
|
6817
6878
|
Login: Task;
|
|
6818
6879
|
} & {
|
|
@@ -6882,4 +6943,4 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
|
|
|
6882
6943
|
}>;
|
|
6883
6944
|
|
|
6884
6945
|
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 };
|
|
6885
|
-
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, 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 };
|
|
6946
|
+
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
|
@@ -6,7 +6,6 @@ import * as axe_core from 'axe-core';
|
|
|
6
6
|
import * as playwright_test from '@playwright/test';
|
|
7
7
|
import { Page as Page$1, Locator as Locator$1, Browser } from '@playwright/test';
|
|
8
8
|
export { expect, mergeTests } from '@playwright/test';
|
|
9
|
-
import { Image } from 'image-js';
|
|
10
9
|
|
|
11
10
|
interface RequestOptions$1<PAYLOAD> {
|
|
12
11
|
[key: string]: unknown;
|
|
@@ -139,6 +138,13 @@ interface ApiContextTypes {
|
|
|
139
138
|
MailpitApiContext: MailpitApiContext;
|
|
140
139
|
}
|
|
141
140
|
|
|
141
|
+
type NewsletterRecipient = components["schemas"]["NewsletterRecipient"] & {
|
|
142
|
+
id: string;
|
|
143
|
+
email: string;
|
|
144
|
+
salesChannelId: string;
|
|
145
|
+
firstName: string;
|
|
146
|
+
lastName: string;
|
|
147
|
+
};
|
|
142
148
|
type SalesChannel = components["schemas"]["SalesChannel"] & {
|
|
143
149
|
id: string;
|
|
144
150
|
};
|
|
@@ -260,6 +266,11 @@ type Tag = components["schemas"]["Tag"] & {
|
|
|
260
266
|
type Rule = components["schemas"]["Rule"] & {
|
|
261
267
|
id: string;
|
|
262
268
|
};
|
|
269
|
+
interface BasicRuleCondition {
|
|
270
|
+
type: string;
|
|
271
|
+
value: Record<string, unknown>;
|
|
272
|
+
children?: BasicRuleCondition[];
|
|
273
|
+
}
|
|
263
274
|
type Currency$2 = components["schemas"]["Currency"] & {
|
|
264
275
|
id: string;
|
|
265
276
|
};
|
|
@@ -335,6 +346,16 @@ type Promotion = Omit<components["schemas"]["Promotion"], "discounts"> & {
|
|
|
335
346
|
type PromotionDiscount = components["schemas"]["PromotionDiscount"] & {
|
|
336
347
|
id: string;
|
|
337
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
|
+
}
|
|
338
359
|
type OrderLineItem = components["schemas"]["OrderLineItem"] & {
|
|
339
360
|
id: string;
|
|
340
361
|
};
|
|
@@ -584,6 +605,14 @@ declare class TestDataService {
|
|
|
584
605
|
*/
|
|
585
606
|
private createdSalesChannelRecords;
|
|
586
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>;
|
|
587
616
|
/**
|
|
588
617
|
* Creates a basic product without images or other special configuration.
|
|
589
618
|
* The product will be added to the default sales channel category if configured.
|
|
@@ -756,6 +785,13 @@ declare class TestDataService {
|
|
|
756
785
|
* @param salesChannelId - The uuid of the sales channel in which the promotion should be active.
|
|
757
786
|
*/
|
|
758
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>;
|
|
759
795
|
/**
|
|
760
796
|
* Creates a new basic payment method.
|
|
761
797
|
*
|
|
@@ -781,11 +817,13 @@ declare class TestDataService {
|
|
|
781
817
|
*/
|
|
782
818
|
createShippingMethodWithImage(overrides?: Partial<ShippingMethod$1>): Promise<ShippingMethod$1>;
|
|
783
819
|
/**
|
|
784
|
-
* 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.
|
|
785
822
|
*
|
|
786
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.
|
|
787
825
|
*/
|
|
788
|
-
createBasicRule(overrides?: Partial<Rule>,
|
|
826
|
+
createBasicRule(overrides?: Partial<Rule>, condition?: BasicRuleCondition | string, operator?: string, amount?: number): Promise<Rule>;
|
|
789
827
|
/**
|
|
790
828
|
* Creates a new basic page layout.
|
|
791
829
|
*
|
|
@@ -971,6 +1009,11 @@ declare class TestDataService {
|
|
|
971
1009
|
|
|
972
1010
|
*/
|
|
973
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>;
|
|
974
1017
|
/**
|
|
975
1018
|
* Retrieves a language based on its code.
|
|
976
1019
|
* @param languageCode
|
|
@@ -1154,7 +1197,7 @@ declare class TestDataService {
|
|
|
1154
1197
|
getCountryStruct(overrides?: Partial<Country$1>): Partial<Country$1>;
|
|
1155
1198
|
getCurrencyStruct(overrides: Partial<Currency$2> | undefined, roundingDecimals: number): Partial<Currency$2>;
|
|
1156
1199
|
getBasicProductStruct(taxId?: string, currencyId?: string, overrides?: Partial<Product>): Partial<Product>;
|
|
1157
|
-
getBasicRuleStruct(overrides
|
|
1200
|
+
getBasicRuleStruct(overrides?: Partial<Rule>, condition?: BasicRuleCondition | string, operator?: string, amount?: number): Partial<Rule>;
|
|
1158
1201
|
getProductPriceRangeStruct(currencyId: string, ruleId: string): Partial<Product>;
|
|
1159
1202
|
getBasicManufacturerStruct(overrides?: Partial<Manufacturer>): Partial<Manufacturer>;
|
|
1160
1203
|
getBasicPaymentMethodStruct(overrides?: Partial<PaymentMethod$1>): {
|
|
@@ -1531,6 +1574,7 @@ declare const BUNDLED_RESOURCES: {
|
|
|
1531
1574
|
};
|
|
1532
1575
|
userMenu: {
|
|
1533
1576
|
logout: string;
|
|
1577
|
+
offCanvasToggle: string;
|
|
1534
1578
|
};
|
|
1535
1579
|
order: {
|
|
1536
1580
|
orderTitle: string;
|
|
@@ -2433,6 +2477,7 @@ declare const BUNDLED_RESOURCES: {
|
|
|
2433
2477
|
};
|
|
2434
2478
|
userMenu: {
|
|
2435
2479
|
logout: string;
|
|
2480
|
+
offCanvasToggle: string;
|
|
2436
2481
|
};
|
|
2437
2482
|
order: {
|
|
2438
2483
|
orderTitle: string;
|
|
@@ -3663,6 +3708,7 @@ declare const baseNamespaces: {
|
|
|
3663
3708
|
};
|
|
3664
3709
|
userMenu: {
|
|
3665
3710
|
logout: string;
|
|
3711
|
+
offCanvasToggle: string;
|
|
3666
3712
|
};
|
|
3667
3713
|
order: {
|
|
3668
3714
|
orderTitle: string;
|
|
@@ -4663,6 +4709,7 @@ declare class OffCanvasCart implements PageObject {
|
|
|
4663
4709
|
constructor(page: Page);
|
|
4664
4710
|
url(): string;
|
|
4665
4711
|
getLineItemByProductNumber(productNumber: string): Promise<Record<string, Locator>>;
|
|
4712
|
+
getLineItemByPromotionName(name: string): Promise<Record<string, Locator>>;
|
|
4666
4713
|
}
|
|
4667
4714
|
|
|
4668
4715
|
declare class CheckoutConfirm implements PageObject {
|
|
@@ -4697,7 +4744,10 @@ declare class CheckoutConfirm implements PageObject {
|
|
|
4697
4744
|
*/
|
|
4698
4745
|
readonly cartLineItemImages: Locator;
|
|
4699
4746
|
readonly page: Page;
|
|
4747
|
+
readonly confirmProductTable: Locator;
|
|
4700
4748
|
constructor(page: Page);
|
|
4749
|
+
getLineItemByProductName(productName: string): Record<string, Locator>;
|
|
4750
|
+
getLineItemByPromotionName(promotionName: string): Record<string, Locator>;
|
|
4701
4751
|
url(): string;
|
|
4702
4752
|
}
|
|
4703
4753
|
|
|
@@ -5437,6 +5487,7 @@ declare class FlowBuilderCreate implements PageObject {
|
|
|
5437
5487
|
readonly saveButton: Locator;
|
|
5438
5488
|
readonly header: Locator;
|
|
5439
5489
|
readonly smartBarHeader: Locator;
|
|
5490
|
+
readonly skeletonLoader: Locator;
|
|
5440
5491
|
readonly generalTab: Locator;
|
|
5441
5492
|
readonly flowTab: Locator;
|
|
5442
5493
|
readonly nameField: Locator;
|
|
@@ -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;
|
|
@@ -6637,6 +6689,13 @@ declare const isSaaSInstance: (adminApiContext: AdminApiContext) => Promise<bool
|
|
|
6637
6689
|
declare const isPaaSInstance: () => boolean;
|
|
6638
6690
|
declare const isThemeCompiled: (context: StoreApiContext, storefrontUrl: string) => Promise<boolean>;
|
|
6639
6691
|
|
|
6692
|
+
interface Image {
|
|
6693
|
+
width: number;
|
|
6694
|
+
height: number;
|
|
6695
|
+
data: Uint8Array;
|
|
6696
|
+
channels: 3;
|
|
6697
|
+
depth: 8;
|
|
6698
|
+
}
|
|
6640
6699
|
declare function createRandomImage(width?: number, height?: number): Image;
|
|
6641
6700
|
declare function createSolidColorImage(width?: number, height?: number, color?: [number, number, number]): Image;
|
|
6642
6701
|
declare function encodeImage(image: Image): Buffer<ArrayBuffer>;
|
|
@@ -6813,6 +6872,8 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
|
|
|
6813
6872
|
CheckVisibilityOfServicesBanner: Task;
|
|
6814
6873
|
} & {
|
|
6815
6874
|
DeactivateShopwareServices: Task;
|
|
6875
|
+
} & {
|
|
6876
|
+
SelectExtensionCategory: Task;
|
|
6816
6877
|
} & {
|
|
6817
6878
|
Login: Task;
|
|
6818
6879
|
} & {
|
|
@@ -6882,4 +6943,4 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
|
|
|
6882
6943
|
}>;
|
|
6883
6944
|
|
|
6884
6945
|
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 };
|
|
6885
|
-
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, 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 };
|
|
6946
|
+
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
|
@@ -2,7 +2,7 @@ import { test as test$e, expect, request, mergeTests } from '@playwright/test';
|
|
|
2
2
|
export { expect, mergeTests } from '@playwright/test';
|
|
3
3
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
4
4
|
import { createInstance } from 'i18next';
|
|
5
|
-
import {
|
|
5
|
+
import { encode } from 'fast-png';
|
|
6
6
|
import crypto from 'crypto';
|
|
7
7
|
import { stringify } from 'uuid';
|
|
8
8
|
import { satisfies } from 'compare-versions';
|
|
@@ -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",
|
|
@@ -4165,11 +4167,13 @@ function createRandomImage(width = 800, height = 600) {
|
|
|
4165
4167
|
for (let i = 0; i < data.length; i++) {
|
|
4166
4168
|
data[i] = Math.random() * 256 | 0;
|
|
4167
4169
|
}
|
|
4168
|
-
return
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
data
|
|
4172
|
-
|
|
4170
|
+
return {
|
|
4171
|
+
width,
|
|
4172
|
+
height,
|
|
4173
|
+
data,
|
|
4174
|
+
channels: 3,
|
|
4175
|
+
depth: 8
|
|
4176
|
+
};
|
|
4173
4177
|
}
|
|
4174
4178
|
function createSolidColorImage(width = 800, height = 600, color = [255, 0, 0]) {
|
|
4175
4179
|
const channels = 3;
|
|
@@ -4180,14 +4184,24 @@ function createSolidColorImage(width = 800, height = 600, color = [255, 0, 0]) {
|
|
|
4180
4184
|
data[i + 1] = g;
|
|
4181
4185
|
data[i + 2] = b;
|
|
4182
4186
|
}
|
|
4183
|
-
return
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
data
|
|
4187
|
-
|
|
4187
|
+
return {
|
|
4188
|
+
width,
|
|
4189
|
+
height,
|
|
4190
|
+
data,
|
|
4191
|
+
channels: 3,
|
|
4192
|
+
depth: 8
|
|
4193
|
+
};
|
|
4188
4194
|
}
|
|
4189
4195
|
function encodeImage(image) {
|
|
4190
|
-
return Buffer.from(
|
|
4196
|
+
return Buffer.from(
|
|
4197
|
+
encode({
|
|
4198
|
+
width: image.width,
|
|
4199
|
+
height: image.height,
|
|
4200
|
+
data: image.data,
|
|
4201
|
+
channels: image.channels,
|
|
4202
|
+
depth: image.depth
|
|
4203
|
+
})
|
|
4204
|
+
);
|
|
4191
4205
|
}
|
|
4192
4206
|
|
|
4193
4207
|
class TestDataService {
|
|
@@ -4264,6 +4278,35 @@ class TestDataService {
|
|
|
4264
4278
|
this.nameSuffix = options.nameSuffix;
|
|
4265
4279
|
}
|
|
4266
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
|
+
}
|
|
4267
4310
|
/**
|
|
4268
4311
|
* Creates a basic product without images or other special configuration.
|
|
4269
4312
|
* The product will be added to the default sales channel category if configured.
|
|
@@ -4793,6 +4836,48 @@ class TestDataService {
|
|
|
4793
4836
|
this.addCreatedRecord("promotion", promotion.id);
|
|
4794
4837
|
return promotionWithDiscount;
|
|
4795
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
|
+
}
|
|
4796
4881
|
/**
|
|
4797
4882
|
* Creates a new basic payment method.
|
|
4798
4883
|
*
|
|
@@ -4848,12 +4933,14 @@ class TestDataService {
|
|
|
4848
4933
|
return shippingMethod;
|
|
4849
4934
|
}
|
|
4850
4935
|
/**
|
|
4851
|
-
* 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.
|
|
4852
4938
|
*
|
|
4853
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.
|
|
4854
4941
|
*/
|
|
4855
|
-
async createBasicRule(overrides = {},
|
|
4856
|
-
const basicRule = this.getBasicRuleStruct(overrides,
|
|
4942
|
+
async createBasicRule(overrides = {}, condition = "cartCartAmount", operator = ">=", amount = 1) {
|
|
4943
|
+
const basicRule = this.getBasicRuleStruct(overrides, condition, operator, amount);
|
|
4857
4944
|
const ruleResponse = await this.AdminApiClient.post("rule?_response=detail", {
|
|
4858
4945
|
data: basicRule
|
|
4859
4946
|
});
|
|
@@ -5398,6 +5485,32 @@ class TestDataService {
|
|
|
5398
5485
|
const { data: aclUser } = await syncAclUserResponse.json();
|
|
5399
5486
|
return aclUser;
|
|
5400
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
|
+
}
|
|
5401
5514
|
/**
|
|
5402
5515
|
* Retrieves a language based on its code.
|
|
5403
5516
|
* @param languageCode
|
|
@@ -6017,9 +6130,16 @@ class TestDataService {
|
|
|
6017
6130
|
}
|
|
6018
6131
|
return Object.assign({}, basicProduct, overrides);
|
|
6019
6132
|
}
|
|
6020
|
-
getBasicRuleStruct(overrides = {},
|
|
6133
|
+
getBasicRuleStruct(overrides = {}, condition = "cartCartAmount", operator = ">=", amount = 1) {
|
|
6021
6134
|
const { id: ruleId, uuid: ruleUuid } = this.IdProvider.getIdPair();
|
|
6022
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;
|
|
6023
6143
|
const description = `
|
|
6024
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.
|
|
6025
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.
|
|
@@ -6036,15 +6156,7 @@ class TestDataService {
|
|
|
6036
6156
|
children: [
|
|
6037
6157
|
{
|
|
6038
6158
|
type: "andContainer",
|
|
6039
|
-
children: [
|
|
6040
|
-
{
|
|
6041
|
-
type: conditionType,
|
|
6042
|
-
value: {
|
|
6043
|
-
operator,
|
|
6044
|
-
amount
|
|
6045
|
-
}
|
|
6046
|
-
}
|
|
6047
|
-
]
|
|
6159
|
+
children: [ruleCondition]
|
|
6048
6160
|
}
|
|
6049
6161
|
]
|
|
6050
6162
|
}
|
|
@@ -7360,6 +7472,16 @@ class OffCanvasCart {
|
|
|
7360
7472
|
lineItemGaranLabel
|
|
7361
7473
|
};
|
|
7362
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
|
+
}
|
|
7363
7485
|
}
|
|
7364
7486
|
|
|
7365
7487
|
class CheckoutConfirm {
|
|
@@ -7394,6 +7516,7 @@ class CheckoutConfirm {
|
|
|
7394
7516
|
*/
|
|
7395
7517
|
cartLineItemImages;
|
|
7396
7518
|
page;
|
|
7519
|
+
confirmProductTable;
|
|
7397
7520
|
constructor(page) {
|
|
7398
7521
|
this.page = page;
|
|
7399
7522
|
this.headline = page.getByRole("heading", { name: translate("storefront:checkout:confirm.completeOrder") });
|
|
@@ -7415,6 +7538,27 @@ class CheckoutConfirm {
|
|
|
7415
7538
|
this.termsAndConditionsWithLegalGuaranteeRightsLabel = page.getByLabel(translate("storefront:checkout:confirm.termsAndConditionsWithLegalGuaranteeRights"));
|
|
7416
7539
|
this.legalGuaranteeNoticeLink = page.locator("#legalGuaranteeNoticeModal a");
|
|
7417
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
|
+
};
|
|
7418
7562
|
}
|
|
7419
7563
|
url() {
|
|
7420
7564
|
return "checkout/confirm";
|
|
@@ -8996,7 +9140,7 @@ class FirstRunWizard {
|
|
|
8996
9140
|
this.dataImportCard = page.locator(".sw-first-run-wizard-data-import__card");
|
|
8997
9141
|
this.defaultValuesHeader = page.locator(".sw-modal__title", { hasText: translate("administration:firstRunWizard:headers.defaultValues") });
|
|
8998
9142
|
this.salesChannelSelectionMultiSelect = page.getByPlaceholder(translate("administration:firstRunWizard:placeholders.selectSalesChannels"));
|
|
8999
|
-
this.salesChannelSelectionList = page.locator(".sw-popover__wrapper").getByRole("listitem");
|
|
9143
|
+
this.salesChannelSelectionList = page.locator(".sw-popover__wrapper, .sw-select-result-list-popover-wrapper").getByRole("listitem");
|
|
9000
9144
|
this.mailerConfigurationHeader = page.locator(".sw-modal__title", { hasText: translate("administration:firstRunWizard:headers.mailerConfiguration") });
|
|
9001
9145
|
this.smtpServerButton = page.getByText(translate("administration:firstRunWizard:buttons.configureOwnSmtpServer"), { exact: true });
|
|
9002
9146
|
this.smtpServerTitle = page.getByText(translate("administration:firstRunWizard:text.smtpServer"), { exact: true });
|
|
@@ -9056,6 +9200,7 @@ class FlowBuilderCreate {
|
|
|
9056
9200
|
saveButton;
|
|
9057
9201
|
header;
|
|
9058
9202
|
smartBarHeader;
|
|
9203
|
+
skeletonLoader;
|
|
9059
9204
|
//tabs
|
|
9060
9205
|
generalTab;
|
|
9061
9206
|
flowTab;
|
|
@@ -9102,6 +9247,7 @@ class FlowBuilderCreate {
|
|
|
9102
9247
|
this.saveButton = page.locator(".sw-flow-detail__save");
|
|
9103
9248
|
this.header = page.locator("h2");
|
|
9104
9249
|
this.smartBarHeader = page.locator(".smart-bar__header");
|
|
9250
|
+
this.skeletonLoader = page.locator(".sw-skeleton");
|
|
9105
9251
|
this.triggerSelectField = page.locator(".sw-flow-detail-flow__trigger-card").getByRole("textbox");
|
|
9106
9252
|
if (instanceMeta.features["V6_8_0_0"]) {
|
|
9107
9253
|
this.generalTab = page.locator('.mt-tabs__item[data-item-name="sw.flow.create.general"]');
|
|
@@ -9352,6 +9498,7 @@ class DataSharing {
|
|
|
9352
9498
|
class Dashboard {
|
|
9353
9499
|
contentView;
|
|
9354
9500
|
adminMenuView;
|
|
9501
|
+
adminMenuOffCanvasToggle;
|
|
9355
9502
|
adminMenuCatalog;
|
|
9356
9503
|
adminMenuOrder;
|
|
9357
9504
|
adminMenuOrderOverview;
|
|
@@ -9384,6 +9531,7 @@ class Dashboard {
|
|
|
9384
9531
|
constructor(page) {
|
|
9385
9532
|
this.page = page;
|
|
9386
9533
|
this.adminMenuView = page.locator(".sw-admin-menu");
|
|
9534
|
+
this.adminMenuOffCanvasToggle = page.getByRole("button", { name: translate("administration:dashboard:userMenu.offCanvasToggle") });
|
|
9387
9535
|
this.contentView = page.locator(".sw-desktop__content");
|
|
9388
9536
|
this.adminMenuCatalog = page.locator(".sw-catalogue");
|
|
9389
9537
|
this.adminMenuOrder = page.locator(".sw-order");
|
|
@@ -9414,7 +9562,7 @@ class Dashboard {
|
|
|
9414
9562
|
name: translate("administration:dashboard:shopwareServices.exploreNow")
|
|
9415
9563
|
});
|
|
9416
9564
|
this.adminMenuUserActions = page.locator(".sw-admin-menu__user-actions-toggle");
|
|
9417
|
-
this.adminMenuLogoutButton = page.
|
|
9565
|
+
this.adminMenuLogoutButton = page.getByText(translate("administration:dashboard:userMenu.logout"));
|
|
9418
9566
|
}
|
|
9419
9567
|
url() {
|
|
9420
9568
|
return "#/sw/dashboard/index";
|
|
@@ -11625,7 +11773,7 @@ const MediaData = test$e.extend({
|
|
|
11625
11773
|
console.error(err);
|
|
11626
11774
|
}
|
|
11627
11775
|
}
|
|
11628
|
-
fs.writeFileSync(imageFilePath,
|
|
11776
|
+
fs.writeFileSync(imageFilePath, encodeImage(image));
|
|
11629
11777
|
const mediaResponse = await AdminApiContext.post("media?_response", {
|
|
11630
11778
|
data: {
|
|
11631
11779
|
private: false
|
|
@@ -12130,7 +12278,7 @@ const BulkEditCustomers = test$e.extend({
|
|
|
12130
12278
|
if (accountData.language) {
|
|
12131
12279
|
await AdminCustomerBulkEdit.changeLanguageCheckbox.click();
|
|
12132
12280
|
await AdminCustomerBulkEdit.changeLanguageInput.click();
|
|
12133
|
-
await AdminCustomerBulkEdit.
|
|
12281
|
+
await AdminCustomerBulkEdit.filtersResultPopoverItemList.getByText(accountData.language, { exact: true }).click();
|
|
12134
12282
|
}
|
|
12135
12283
|
if (accountData.replyToCustomerGroupRequest) {
|
|
12136
12284
|
await AdminCustomerBulkEdit.replyToCustomerGroupRequest.click();
|
|
@@ -12225,8 +12373,12 @@ const CreateFlow = test$e.extend({
|
|
|
12225
12373
|
CreateFlow: async ({ AdminFlowBuilderCreate, AdminFlowBuilderDetail, AdminFlowBuilderListing, ShopAdmin, TestDataService }, use) => {
|
|
12226
12374
|
const task = (flowConfig) => {
|
|
12227
12375
|
return async function createFlow() {
|
|
12376
|
+
await ShopAdmin.expects(AdminFlowBuilderListing.createFlowButton).toBeEnabled();
|
|
12228
12377
|
const flowActionsLoaded = AdminFlowBuilderCreate.page.waitForResponse((response) => response.url().includes("/_info/flow-actions.json") && response.ok());
|
|
12378
|
+
const navigatedToCreate = AdminFlowBuilderCreate.page.waitForURL((url) => url.hash.includes("/sw/flow/create/"));
|
|
12229
12379
|
await AdminFlowBuilderListing.createFlowButton.click();
|
|
12380
|
+
await navigatedToCreate;
|
|
12381
|
+
await ShopAdmin.expects(AdminFlowBuilderCreate.skeletonLoader).toHaveCount(0);
|
|
12230
12382
|
await ShopAdmin.expects(AdminFlowBuilderCreate.smartBarHeader).toHaveText(translate("administration:flowBuilder:create.newFlow"));
|
|
12231
12383
|
await AdminFlowBuilderCreate.nameField.fill(`${flowConfig.name}`);
|
|
12232
12384
|
await AdminFlowBuilderCreate.descriptionField.fill(`${flowConfig.description}`);
|
|
@@ -12364,6 +12516,19 @@ const CheckAccessToShopwareServices = test$e.extend({
|
|
|
12364
12516
|
}
|
|
12365
12517
|
});
|
|
12366
12518
|
|
|
12519
|
+
const SelectExtensionCategory = test$e.extend({
|
|
12520
|
+
SelectExtensionCategory: async ({ AdminFirstRunWizard }, use) => {
|
|
12521
|
+
const task = (category) => {
|
|
12522
|
+
return async function SelectExtensionCategory2() {
|
|
12523
|
+
const recommendationsLoaded = AdminFirstRunWizard.page.waitForResponse((response) => response.url().includes("/_action/store/recommendations") && response.ok());
|
|
12524
|
+
await category.click();
|
|
12525
|
+
await recommendationsLoaded;
|
|
12526
|
+
};
|
|
12527
|
+
};
|
|
12528
|
+
await use(task);
|
|
12529
|
+
}
|
|
12530
|
+
});
|
|
12531
|
+
|
|
12367
12532
|
const test$4 = mergeTests(
|
|
12368
12533
|
SaveProduct,
|
|
12369
12534
|
ExpectNotification,
|
|
@@ -12375,7 +12540,8 @@ const test$4 = mergeTests(
|
|
|
12375
12540
|
LoginViaReviewsTab,
|
|
12376
12541
|
CheckAccessToShopwareServices,
|
|
12377
12542
|
CheckVisibilityOfServicesBanner,
|
|
12378
|
-
DeactivateShopwareServices
|
|
12543
|
+
DeactivateShopwareServices,
|
|
12544
|
+
SelectExtensionCategory
|
|
12379
12545
|
);
|
|
12380
12546
|
|
|
12381
12547
|
const Login = test$e.extend({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopware-ag/acceptance-test-suite",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.21.0",
|
|
4
4
|
"description": "Shopware Acceptance Test Suite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fixtures",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"@shopware/api-client": "1.5.1",
|
|
44
44
|
"axe-html-reporter": "2.2.11",
|
|
45
45
|
"compare-versions": "6.1.1",
|
|
46
|
+
"fast-png": "8.0.0",
|
|
46
47
|
"i18next": "26.3.1",
|
|
47
|
-
"image-js": "1.3.0",
|
|
48
48
|
"uuid": "14.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|