@shopware-ag/acceptance-test-suite 5.1.0 → 5.2.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 +78 -2
- package/dist/index.d.ts +78 -2
- package/dist/index.mjs +276 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -171,9 +171,27 @@ declare class IdProvider {
|
|
|
171
171
|
type SalesChannel = components['schemas']['SalesChannel'] & {
|
|
172
172
|
id: string;
|
|
173
173
|
};
|
|
174
|
-
type Customer = components['schemas']['Customer'] & {
|
|
174
|
+
type Customer = Omit<components['schemas']['Customer'], 'defaultShippingAddress' | 'defaultBillingAddress'> & {
|
|
175
175
|
id: string;
|
|
176
176
|
password: string;
|
|
177
|
+
defaultShippingAddress: {
|
|
178
|
+
firstName: string;
|
|
179
|
+
lastName: string;
|
|
180
|
+
city: string;
|
|
181
|
+
street: string;
|
|
182
|
+
zipcode: string;
|
|
183
|
+
countryId: string;
|
|
184
|
+
salutationId: string;
|
|
185
|
+
};
|
|
186
|
+
defaultBillingAddress: {
|
|
187
|
+
firstName: string;
|
|
188
|
+
lastName: string;
|
|
189
|
+
city: string;
|
|
190
|
+
street: string;
|
|
191
|
+
zipcode: string;
|
|
192
|
+
countryId: string;
|
|
193
|
+
salutationId: string;
|
|
194
|
+
};
|
|
177
195
|
};
|
|
178
196
|
type CustomerAddress = components['schemas']['CustomerAddress'] & {
|
|
179
197
|
id: string;
|
|
@@ -235,6 +253,9 @@ type Rule = components['schemas']['Rule'] & {
|
|
|
235
253
|
type Currency$1 = components['schemas']['Currency'] & {
|
|
236
254
|
id: string;
|
|
237
255
|
};
|
|
256
|
+
type Country = components['schemas']['Country'] & {
|
|
257
|
+
id: string;
|
|
258
|
+
};
|
|
238
259
|
interface CalculatedTaxes {
|
|
239
260
|
tax: number;
|
|
240
261
|
taxRate: number;
|
|
@@ -522,6 +543,19 @@ declare class TestDataService {
|
|
|
522
543
|
* @param overrides - Specific data overrides that will be applied to the cms page layout data struct.
|
|
523
544
|
*/
|
|
524
545
|
createBasicPageLayout(cmsPageType: string, overrides?: Partial<CmsPage>): Promise<CmsPage>;
|
|
546
|
+
/**
|
|
547
|
+
* Creates a random country
|
|
548
|
+
*
|
|
549
|
+
* @param overrides - Specific data overrides that will be applied to the country data struct.
|
|
550
|
+
*/
|
|
551
|
+
createCountry(overrides?: Partial<Country>): Promise<Country>;
|
|
552
|
+
/**
|
|
553
|
+
* Creates a random currency with default rounding of 2 decimals
|
|
554
|
+
*
|
|
555
|
+
* @param roundingDecimals - Decimals of the rounding shown in Storefront, default value 2
|
|
556
|
+
* @param overrides - Specific data overrides that will be applied to the currency data struct.
|
|
557
|
+
*/
|
|
558
|
+
createCurrency(overrides?: Partial<Currency$1>, roundingDecimals?: number): Promise<Currency$1>;
|
|
525
559
|
/**
|
|
526
560
|
* Assigns a media resource as the download of a digital product.
|
|
527
561
|
*
|
|
@@ -543,6 +577,14 @@ declare class TestDataService {
|
|
|
543
577
|
* @param manufacturerId - The uuid of the manufacturer.
|
|
544
578
|
*/
|
|
545
579
|
assignProductManufacturer(productId: string, manufacturerId: string): Promise<void>;
|
|
580
|
+
/**
|
|
581
|
+
* Assigns a country to a currency with default roundings of 2.
|
|
582
|
+
*
|
|
583
|
+
* @param currencyId - The uuid of currency.
|
|
584
|
+
* @param countryId - The uuid of country.
|
|
585
|
+
* @param roundingDecimals - The roundings of item and total values in storefront, default 2 decimals
|
|
586
|
+
*/
|
|
587
|
+
assignCurrencyCountryRounding(currencyId: string, countryId: string, roundingDecimals?: number): Promise<any>;
|
|
546
588
|
/**
|
|
547
589
|
* Assigns a product to a category.
|
|
548
590
|
*
|
|
@@ -573,6 +615,20 @@ declare class TestDataService {
|
|
|
573
615
|
* @param productId - The uuid of the product.
|
|
574
616
|
*/
|
|
575
617
|
assignManufacturerProduct(manufacturerId: string, productId: string): Promise<void>;
|
|
618
|
+
/**
|
|
619
|
+
* Assigns a currency to a sales channel.
|
|
620
|
+
*
|
|
621
|
+
* @param salesChannelId - The uuid of the sales channel.
|
|
622
|
+
* @param currencyId - The uuid of the currency.
|
|
623
|
+
*/
|
|
624
|
+
assignSalesChannelCurrency(salesChannelId: string, currencyId: string): Promise<any>;
|
|
625
|
+
/**
|
|
626
|
+
* Assigns a country to a sales channel.
|
|
627
|
+
*
|
|
628
|
+
* @param salesChannelId - The uuid of the sales channel.
|
|
629
|
+
* @param countryId - The uuid of the country.
|
|
630
|
+
*/
|
|
631
|
+
assignSalesChannelCountry(salesChannelId: string, countryId: string): Promise<any>;
|
|
576
632
|
/**
|
|
577
633
|
* Assigns a media resource to a payment method as a logo.
|
|
578
634
|
*
|
|
@@ -691,6 +747,14 @@ declare class TestDataService {
|
|
|
691
747
|
* @param array
|
|
692
748
|
*/
|
|
693
749
|
combineAll: (array: Record<string, string>[][]) => Record<string, string>[][];
|
|
750
|
+
/**
|
|
751
|
+
* Retrieves a country Id based on its iso2 code.
|
|
752
|
+
*
|
|
753
|
+
* @param iso2 - The iso2 code of the country, for example "DE".
|
|
754
|
+
*/
|
|
755
|
+
getCountryId(iso2: string): Promise<Country>;
|
|
756
|
+
getCountryStruct(overrides?: Partial<Country>): Partial<Country>;
|
|
757
|
+
getCurrencyStruct(overrides: Partial<Currency$1> | undefined, roundingDecimals: number): Partial<Currency$1>;
|
|
694
758
|
getBasicProductStruct(taxId?: string, currencyId?: string, overrides?: Partial<Product>): Partial<Product>;
|
|
695
759
|
getBasicRuleStruct(overrides: Partial<Rule> | undefined, conditionType: string, operator: string, amount: number): Partial<Rule>;
|
|
696
760
|
getProductPriceRangeStruct(currencyId: string, ruleId: string): Partial<Product>;
|
|
@@ -847,7 +911,10 @@ declare class Home implements PageObject {
|
|
|
847
911
|
readonly page: Page;
|
|
848
912
|
readonly productImages: Locator;
|
|
849
913
|
readonly productListItems: Locator;
|
|
914
|
+
readonly languagesDropdown: Locator;
|
|
915
|
+
readonly currenciesDropdown: Locator;
|
|
850
916
|
constructor(page: Page);
|
|
917
|
+
getListingItemByProductId(productId: string): Promise<Record<string, Locator>>;
|
|
851
918
|
url(): string;
|
|
852
919
|
}
|
|
853
920
|
|
|
@@ -916,6 +983,7 @@ declare class CheckoutConfirm implements PageObject {
|
|
|
916
983
|
readonly termsAndConditionsCheckbox: Locator;
|
|
917
984
|
readonly immediateAccessToDigitalProductCheckbox: Locator;
|
|
918
985
|
readonly grandTotalPrice: Locator;
|
|
986
|
+
readonly taxPrice: Locator;
|
|
919
987
|
readonly submitOrderButton: Locator;
|
|
920
988
|
/**
|
|
921
989
|
* Payment options
|
|
@@ -941,6 +1009,7 @@ declare class CheckoutFinish implements PageObject {
|
|
|
941
1009
|
readonly headline: Locator;
|
|
942
1010
|
readonly orderNumberText: Locator;
|
|
943
1011
|
readonly grandTotalPrice: Locator;
|
|
1012
|
+
readonly taxPrice: Locator;
|
|
944
1013
|
readonly cartLineItemImages: Locator;
|
|
945
1014
|
private readonly orderNumberRegex;
|
|
946
1015
|
constructor(page: Page);
|
|
@@ -1365,6 +1434,7 @@ declare class Categories implements PageObject {
|
|
|
1365
1434
|
readonly categoryTypeSelectionList: Locator;
|
|
1366
1435
|
readonly filtersResultPopoverItemList: Locator;
|
|
1367
1436
|
readonly saveButton: Locator;
|
|
1437
|
+
readonly loadingSpinner: Locator;
|
|
1368
1438
|
/**
|
|
1369
1439
|
* Customisable link
|
|
1370
1440
|
*/
|
|
@@ -1375,8 +1445,10 @@ declare class Categories implements PageObject {
|
|
|
1375
1445
|
readonly landingPageSelectionList: Locator;
|
|
1376
1446
|
readonly filterResultPopoverTreeCheckboxItemList: Locator;
|
|
1377
1447
|
readonly openInNewTabCheckbox: Locator;
|
|
1448
|
+
readonly popoverCategoryTree: Locator;
|
|
1378
1449
|
constructor(page: Page);
|
|
1379
1450
|
getLandingPageByName(landingPageName: string): Promise<Locator>;
|
|
1451
|
+
getPopOverCategoryByName(categoryName: string): Promise<Locator>;
|
|
1380
1452
|
url(): string;
|
|
1381
1453
|
}
|
|
1382
1454
|
|
|
@@ -1597,6 +1669,10 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
1597
1669
|
Logout: Task;
|
|
1598
1670
|
} & {
|
|
1599
1671
|
Register: Task;
|
|
1672
|
+
} & {
|
|
1673
|
+
RegisterGuest: Task;
|
|
1674
|
+
} & {
|
|
1675
|
+
ChangeStorefrontCurrency: Task;
|
|
1600
1676
|
} & {
|
|
1601
1677
|
AddProductToCart: Task;
|
|
1602
1678
|
} & {
|
|
@@ -1627,4 +1703,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
1627
1703
|
ValidateAccessibility: (pageName: string, assertViolations?: number | boolean | undefined, createReport?: boolean | undefined, ruleTags?: string[] | undefined, outputDir?: string | undefined) => () => Promise<axe_core.Result[]>;
|
|
1628
1704
|
}, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
|
|
1629
1705
|
|
|
1630
|
-
export { AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CmsPage, type CreatedRecord, type Currency$1 as Currency, type Customer, type CustomerAddress, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type Rule, type SalesChannel, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type Tag, type Task, type TaxRules, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
|
|
1706
|
+
export { AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CmsPage, type Country, type CreatedRecord, type Currency$1 as Currency, type Customer, type CustomerAddress, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type Rule, type SalesChannel, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type Tag, type Task, type TaxRules, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
|
package/dist/index.d.ts
CHANGED
|
@@ -171,9 +171,27 @@ declare class IdProvider {
|
|
|
171
171
|
type SalesChannel = components['schemas']['SalesChannel'] & {
|
|
172
172
|
id: string;
|
|
173
173
|
};
|
|
174
|
-
type Customer = components['schemas']['Customer'] & {
|
|
174
|
+
type Customer = Omit<components['schemas']['Customer'], 'defaultShippingAddress' | 'defaultBillingAddress'> & {
|
|
175
175
|
id: string;
|
|
176
176
|
password: string;
|
|
177
|
+
defaultShippingAddress: {
|
|
178
|
+
firstName: string;
|
|
179
|
+
lastName: string;
|
|
180
|
+
city: string;
|
|
181
|
+
street: string;
|
|
182
|
+
zipcode: string;
|
|
183
|
+
countryId: string;
|
|
184
|
+
salutationId: string;
|
|
185
|
+
};
|
|
186
|
+
defaultBillingAddress: {
|
|
187
|
+
firstName: string;
|
|
188
|
+
lastName: string;
|
|
189
|
+
city: string;
|
|
190
|
+
street: string;
|
|
191
|
+
zipcode: string;
|
|
192
|
+
countryId: string;
|
|
193
|
+
salutationId: string;
|
|
194
|
+
};
|
|
177
195
|
};
|
|
178
196
|
type CustomerAddress = components['schemas']['CustomerAddress'] & {
|
|
179
197
|
id: string;
|
|
@@ -235,6 +253,9 @@ type Rule = components['schemas']['Rule'] & {
|
|
|
235
253
|
type Currency$1 = components['schemas']['Currency'] & {
|
|
236
254
|
id: string;
|
|
237
255
|
};
|
|
256
|
+
type Country = components['schemas']['Country'] & {
|
|
257
|
+
id: string;
|
|
258
|
+
};
|
|
238
259
|
interface CalculatedTaxes {
|
|
239
260
|
tax: number;
|
|
240
261
|
taxRate: number;
|
|
@@ -522,6 +543,19 @@ declare class TestDataService {
|
|
|
522
543
|
* @param overrides - Specific data overrides that will be applied to the cms page layout data struct.
|
|
523
544
|
*/
|
|
524
545
|
createBasicPageLayout(cmsPageType: string, overrides?: Partial<CmsPage>): Promise<CmsPage>;
|
|
546
|
+
/**
|
|
547
|
+
* Creates a random country
|
|
548
|
+
*
|
|
549
|
+
* @param overrides - Specific data overrides that will be applied to the country data struct.
|
|
550
|
+
*/
|
|
551
|
+
createCountry(overrides?: Partial<Country>): Promise<Country>;
|
|
552
|
+
/**
|
|
553
|
+
* Creates a random currency with default rounding of 2 decimals
|
|
554
|
+
*
|
|
555
|
+
* @param roundingDecimals - Decimals of the rounding shown in Storefront, default value 2
|
|
556
|
+
* @param overrides - Specific data overrides that will be applied to the currency data struct.
|
|
557
|
+
*/
|
|
558
|
+
createCurrency(overrides?: Partial<Currency$1>, roundingDecimals?: number): Promise<Currency$1>;
|
|
525
559
|
/**
|
|
526
560
|
* Assigns a media resource as the download of a digital product.
|
|
527
561
|
*
|
|
@@ -543,6 +577,14 @@ declare class TestDataService {
|
|
|
543
577
|
* @param manufacturerId - The uuid of the manufacturer.
|
|
544
578
|
*/
|
|
545
579
|
assignProductManufacturer(productId: string, manufacturerId: string): Promise<void>;
|
|
580
|
+
/**
|
|
581
|
+
* Assigns a country to a currency with default roundings of 2.
|
|
582
|
+
*
|
|
583
|
+
* @param currencyId - The uuid of currency.
|
|
584
|
+
* @param countryId - The uuid of country.
|
|
585
|
+
* @param roundingDecimals - The roundings of item and total values in storefront, default 2 decimals
|
|
586
|
+
*/
|
|
587
|
+
assignCurrencyCountryRounding(currencyId: string, countryId: string, roundingDecimals?: number): Promise<any>;
|
|
546
588
|
/**
|
|
547
589
|
* Assigns a product to a category.
|
|
548
590
|
*
|
|
@@ -573,6 +615,20 @@ declare class TestDataService {
|
|
|
573
615
|
* @param productId - The uuid of the product.
|
|
574
616
|
*/
|
|
575
617
|
assignManufacturerProduct(manufacturerId: string, productId: string): Promise<void>;
|
|
618
|
+
/**
|
|
619
|
+
* Assigns a currency to a sales channel.
|
|
620
|
+
*
|
|
621
|
+
* @param salesChannelId - The uuid of the sales channel.
|
|
622
|
+
* @param currencyId - The uuid of the currency.
|
|
623
|
+
*/
|
|
624
|
+
assignSalesChannelCurrency(salesChannelId: string, currencyId: string): Promise<any>;
|
|
625
|
+
/**
|
|
626
|
+
* Assigns a country to a sales channel.
|
|
627
|
+
*
|
|
628
|
+
* @param salesChannelId - The uuid of the sales channel.
|
|
629
|
+
* @param countryId - The uuid of the country.
|
|
630
|
+
*/
|
|
631
|
+
assignSalesChannelCountry(salesChannelId: string, countryId: string): Promise<any>;
|
|
576
632
|
/**
|
|
577
633
|
* Assigns a media resource to a payment method as a logo.
|
|
578
634
|
*
|
|
@@ -691,6 +747,14 @@ declare class TestDataService {
|
|
|
691
747
|
* @param array
|
|
692
748
|
*/
|
|
693
749
|
combineAll: (array: Record<string, string>[][]) => Record<string, string>[][];
|
|
750
|
+
/**
|
|
751
|
+
* Retrieves a country Id based on its iso2 code.
|
|
752
|
+
*
|
|
753
|
+
* @param iso2 - The iso2 code of the country, for example "DE".
|
|
754
|
+
*/
|
|
755
|
+
getCountryId(iso2: string): Promise<Country>;
|
|
756
|
+
getCountryStruct(overrides?: Partial<Country>): Partial<Country>;
|
|
757
|
+
getCurrencyStruct(overrides: Partial<Currency$1> | undefined, roundingDecimals: number): Partial<Currency$1>;
|
|
694
758
|
getBasicProductStruct(taxId?: string, currencyId?: string, overrides?: Partial<Product>): Partial<Product>;
|
|
695
759
|
getBasicRuleStruct(overrides: Partial<Rule> | undefined, conditionType: string, operator: string, amount: number): Partial<Rule>;
|
|
696
760
|
getProductPriceRangeStruct(currencyId: string, ruleId: string): Partial<Product>;
|
|
@@ -847,7 +911,10 @@ declare class Home implements PageObject {
|
|
|
847
911
|
readonly page: Page;
|
|
848
912
|
readonly productImages: Locator;
|
|
849
913
|
readonly productListItems: Locator;
|
|
914
|
+
readonly languagesDropdown: Locator;
|
|
915
|
+
readonly currenciesDropdown: Locator;
|
|
850
916
|
constructor(page: Page);
|
|
917
|
+
getListingItemByProductId(productId: string): Promise<Record<string, Locator>>;
|
|
851
918
|
url(): string;
|
|
852
919
|
}
|
|
853
920
|
|
|
@@ -916,6 +983,7 @@ declare class CheckoutConfirm implements PageObject {
|
|
|
916
983
|
readonly termsAndConditionsCheckbox: Locator;
|
|
917
984
|
readonly immediateAccessToDigitalProductCheckbox: Locator;
|
|
918
985
|
readonly grandTotalPrice: Locator;
|
|
986
|
+
readonly taxPrice: Locator;
|
|
919
987
|
readonly submitOrderButton: Locator;
|
|
920
988
|
/**
|
|
921
989
|
* Payment options
|
|
@@ -941,6 +1009,7 @@ declare class CheckoutFinish implements PageObject {
|
|
|
941
1009
|
readonly headline: Locator;
|
|
942
1010
|
readonly orderNumberText: Locator;
|
|
943
1011
|
readonly grandTotalPrice: Locator;
|
|
1012
|
+
readonly taxPrice: Locator;
|
|
944
1013
|
readonly cartLineItemImages: Locator;
|
|
945
1014
|
private readonly orderNumberRegex;
|
|
946
1015
|
constructor(page: Page);
|
|
@@ -1365,6 +1434,7 @@ declare class Categories implements PageObject {
|
|
|
1365
1434
|
readonly categoryTypeSelectionList: Locator;
|
|
1366
1435
|
readonly filtersResultPopoverItemList: Locator;
|
|
1367
1436
|
readonly saveButton: Locator;
|
|
1437
|
+
readonly loadingSpinner: Locator;
|
|
1368
1438
|
/**
|
|
1369
1439
|
* Customisable link
|
|
1370
1440
|
*/
|
|
@@ -1375,8 +1445,10 @@ declare class Categories implements PageObject {
|
|
|
1375
1445
|
readonly landingPageSelectionList: Locator;
|
|
1376
1446
|
readonly filterResultPopoverTreeCheckboxItemList: Locator;
|
|
1377
1447
|
readonly openInNewTabCheckbox: Locator;
|
|
1448
|
+
readonly popoverCategoryTree: Locator;
|
|
1378
1449
|
constructor(page: Page);
|
|
1379
1450
|
getLandingPageByName(landingPageName: string): Promise<Locator>;
|
|
1451
|
+
getPopOverCategoryByName(categoryName: string): Promise<Locator>;
|
|
1380
1452
|
url(): string;
|
|
1381
1453
|
}
|
|
1382
1454
|
|
|
@@ -1597,6 +1669,10 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
1597
1669
|
Logout: Task;
|
|
1598
1670
|
} & {
|
|
1599
1671
|
Register: Task;
|
|
1672
|
+
} & {
|
|
1673
|
+
RegisterGuest: Task;
|
|
1674
|
+
} & {
|
|
1675
|
+
ChangeStorefrontCurrency: Task;
|
|
1600
1676
|
} & {
|
|
1601
1677
|
AddProductToCart: Task;
|
|
1602
1678
|
} & {
|
|
@@ -1627,4 +1703,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
1627
1703
|
ValidateAccessibility: (pageName: string, assertViolations?: number | boolean | undefined, createReport?: boolean | undefined, ruleTags?: string[] | undefined, outputDir?: string | undefined) => () => Promise<axe_core.Result[]>;
|
|
1628
1704
|
}, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
|
|
1629
1705
|
|
|
1630
|
-
export { AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CmsPage, type CreatedRecord, type Currency$1 as Currency, type Customer, type CustomerAddress, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type Rule, type SalesChannel, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type Tag, type Task, type TaxRules, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
|
|
1706
|
+
export { AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CmsPage, type Country, type CreatedRecord, type Currency$1 as Currency, type Customer, type CustomerAddress, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type Rule, type SalesChannel, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type Tag, type Task, type TaxRules, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
|
package/dist/index.mjs
CHANGED
|
@@ -1473,6 +1473,37 @@ class TestDataService {
|
|
|
1473
1473
|
this.addCreatedRecord("cms_page", layout.id);
|
|
1474
1474
|
return layout;
|
|
1475
1475
|
}
|
|
1476
|
+
/**
|
|
1477
|
+
* Creates a random country
|
|
1478
|
+
*
|
|
1479
|
+
* @param overrides - Specific data overrides that will be applied to the country data struct.
|
|
1480
|
+
*/
|
|
1481
|
+
async createCountry(overrides = {}) {
|
|
1482
|
+
const basicCountry = this.getCountryStruct(overrides);
|
|
1483
|
+
const countryResponse = await this.AdminApiClient.post("country?_response=detail", {
|
|
1484
|
+
data: basicCountry
|
|
1485
|
+
});
|
|
1486
|
+
expect(countryResponse.ok()).toBeTruthy();
|
|
1487
|
+
const { data: country } = await countryResponse.json();
|
|
1488
|
+
this.addCreatedRecord("country", country.id);
|
|
1489
|
+
return country;
|
|
1490
|
+
}
|
|
1491
|
+
/**
|
|
1492
|
+
* Creates a random currency with default rounding of 2 decimals
|
|
1493
|
+
*
|
|
1494
|
+
* @param roundingDecimals - Decimals of the rounding shown in Storefront, default value 2
|
|
1495
|
+
* @param overrides - Specific data overrides that will be applied to the currency data struct.
|
|
1496
|
+
*/
|
|
1497
|
+
async createCurrency(overrides = {}, roundingDecimals = 2) {
|
|
1498
|
+
const basicCurrency = this.getCurrencyStruct(overrides, roundingDecimals);
|
|
1499
|
+
const currencyResponse = await this.AdminApiClient.post("currency?_response=detail", {
|
|
1500
|
+
data: basicCurrency
|
|
1501
|
+
});
|
|
1502
|
+
expect(currencyResponse.ok()).toBeTruthy();
|
|
1503
|
+
const { data: currency } = await currencyResponse.json();
|
|
1504
|
+
this.addCreatedRecord("currency", currency.id);
|
|
1505
|
+
return currency;
|
|
1506
|
+
}
|
|
1476
1507
|
/**
|
|
1477
1508
|
* Assigns a media resource as the download of a digital product.
|
|
1478
1509
|
*
|
|
@@ -1528,6 +1559,43 @@ class TestDataService {
|
|
|
1528
1559
|
}
|
|
1529
1560
|
});
|
|
1530
1561
|
}
|
|
1562
|
+
/**
|
|
1563
|
+
* Assigns a country to a currency with default roundings of 2.
|
|
1564
|
+
*
|
|
1565
|
+
* @param currencyId - The uuid of currency.
|
|
1566
|
+
* @param countryId - The uuid of country.
|
|
1567
|
+
* @param roundingDecimals - The roundings of item and total values in storefront, default 2 decimals
|
|
1568
|
+
*/
|
|
1569
|
+
async assignCurrencyCountryRounding(currencyId, countryId, roundingDecimals = 2) {
|
|
1570
|
+
const syncCurrencyCountryRoundingResponse = await this.AdminApiClient.post("./_action/sync", {
|
|
1571
|
+
data: {
|
|
1572
|
+
"write-currency-country-rounding": {
|
|
1573
|
+
entity: "currency_country_rounding",
|
|
1574
|
+
action: "upsert",
|
|
1575
|
+
payload: [
|
|
1576
|
+
{
|
|
1577
|
+
id: this.IdProvider.getIdPair().uuid,
|
|
1578
|
+
currencyId,
|
|
1579
|
+
countryId,
|
|
1580
|
+
itemRounding: {
|
|
1581
|
+
decimals: roundingDecimals,
|
|
1582
|
+
interval: 0.01,
|
|
1583
|
+
roundForNet: true
|
|
1584
|
+
},
|
|
1585
|
+
totalRounding: {
|
|
1586
|
+
decimals: roundingDecimals,
|
|
1587
|
+
interval: 0.01,
|
|
1588
|
+
roundForNet: true
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
]
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
});
|
|
1595
|
+
expect(syncCurrencyCountryRoundingResponse.ok()).toBeTruthy();
|
|
1596
|
+
const { data: currencyCountry } = await syncCurrencyCountryRoundingResponse.json();
|
|
1597
|
+
return currencyCountry;
|
|
1598
|
+
}
|
|
1531
1599
|
/**
|
|
1532
1600
|
* Assigns a product to a category.
|
|
1533
1601
|
*
|
|
@@ -1585,6 +1653,56 @@ class TestDataService {
|
|
|
1585
1653
|
async assignManufacturerProduct(manufacturerId, productId) {
|
|
1586
1654
|
await this.assignProductManufacturer(productId, manufacturerId);
|
|
1587
1655
|
}
|
|
1656
|
+
/**
|
|
1657
|
+
* Assigns a currency to a sales channel.
|
|
1658
|
+
*
|
|
1659
|
+
* @param salesChannelId - The uuid of the sales channel.
|
|
1660
|
+
* @param currencyId - The uuid of the currency.
|
|
1661
|
+
*/
|
|
1662
|
+
async assignSalesChannelCurrency(salesChannelId, currencyId) {
|
|
1663
|
+
const syncSalesChannelResponse = await this.AdminApiClient.post("./_action/sync", {
|
|
1664
|
+
data: {
|
|
1665
|
+
"write-sales-channel": {
|
|
1666
|
+
entity: "sales_channel",
|
|
1667
|
+
action: "upsert",
|
|
1668
|
+
payload: [
|
|
1669
|
+
{
|
|
1670
|
+
id: salesChannelId,
|
|
1671
|
+
currencies: [{ id: currencyId }]
|
|
1672
|
+
}
|
|
1673
|
+
]
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
});
|
|
1677
|
+
expect(syncSalesChannelResponse.ok()).toBeTruthy();
|
|
1678
|
+
const { data: salesChannel } = await syncSalesChannelResponse.json();
|
|
1679
|
+
return salesChannel;
|
|
1680
|
+
}
|
|
1681
|
+
/**
|
|
1682
|
+
* Assigns a country to a sales channel.
|
|
1683
|
+
*
|
|
1684
|
+
* @param salesChannelId - The uuid of the sales channel.
|
|
1685
|
+
* @param countryId - The uuid of the country.
|
|
1686
|
+
*/
|
|
1687
|
+
async assignSalesChannelCountry(salesChannelId, countryId) {
|
|
1688
|
+
const syncSalesChannelResponse = await this.AdminApiClient.post("./_action/sync", {
|
|
1689
|
+
data: {
|
|
1690
|
+
"write-sales-channel": {
|
|
1691
|
+
entity: "sales_channel",
|
|
1692
|
+
action: "upsert",
|
|
1693
|
+
payload: [
|
|
1694
|
+
{
|
|
1695
|
+
id: salesChannelId,
|
|
1696
|
+
countries: [{ id: countryId }]
|
|
1697
|
+
}
|
|
1698
|
+
]
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
});
|
|
1702
|
+
expect(syncSalesChannelResponse.ok()).toBeTruthy();
|
|
1703
|
+
const { data: salesChannel } = await syncSalesChannelResponse.json();
|
|
1704
|
+
return salesChannel;
|
|
1705
|
+
}
|
|
1588
1706
|
/**
|
|
1589
1707
|
* Assigns a media resource to a payment method as a logo.
|
|
1590
1708
|
*
|
|
@@ -1898,6 +2016,60 @@ class TestDataService {
|
|
|
1898
2016
|
convertDateTime(date) {
|
|
1899
2017
|
return date.toISOString().slice(0, 19).replace("T", " ");
|
|
1900
2018
|
}
|
|
2019
|
+
/**
|
|
2020
|
+
* Retrieves a country Id based on its iso2 code.
|
|
2021
|
+
*
|
|
2022
|
+
* @param iso2 - The iso2 code of the country, for example "DE".
|
|
2023
|
+
*/
|
|
2024
|
+
async getCountryId(iso2) {
|
|
2025
|
+
const countryResponse = await this.AdminApiClient.post("search/country", {
|
|
2026
|
+
data: {
|
|
2027
|
+
limit: 1,
|
|
2028
|
+
filter: [{
|
|
2029
|
+
type: "equals",
|
|
2030
|
+
field: "iso",
|
|
2031
|
+
value: iso2
|
|
2032
|
+
}]
|
|
2033
|
+
}
|
|
2034
|
+
});
|
|
2035
|
+
const { data: result } = await countryResponse.json();
|
|
2036
|
+
return result[0];
|
|
2037
|
+
}
|
|
2038
|
+
getCountryStruct(overrides = {}) {
|
|
2039
|
+
const { uuid: countryUuid, id: countryId } = this.IdProvider.getIdPair();
|
|
2040
|
+
const basicCountry = {
|
|
2041
|
+
id: countryUuid,
|
|
2042
|
+
name: "Country-" + countryId,
|
|
2043
|
+
iso: "" + countryId.substring(0, 2),
|
|
2044
|
+
iso3: "" + countryId.substring(0, 3),
|
|
2045
|
+
active: true,
|
|
2046
|
+
shippingAvailable: true
|
|
2047
|
+
};
|
|
2048
|
+
return Object.assign({}, basicCountry, overrides);
|
|
2049
|
+
}
|
|
2050
|
+
getCurrencyStruct(overrides = {}, roundingDecimals) {
|
|
2051
|
+
const { uuid: currencyUuid, id: currencyId } = this.IdProvider.getIdPair();
|
|
2052
|
+
const basicCurrency = {
|
|
2053
|
+
id: currencyUuid,
|
|
2054
|
+
name: "Currency-" + currencyId,
|
|
2055
|
+
shortName: "CUR" + currencyId,
|
|
2056
|
+
isoCode: "" + currencyId.substring(0, 3),
|
|
2057
|
+
symbol: "C$",
|
|
2058
|
+
factor: 2.4,
|
|
2059
|
+
itemRounding: {
|
|
2060
|
+
decimals: roundingDecimals,
|
|
2061
|
+
interval: 0.01,
|
|
2062
|
+
roundForNet: true
|
|
2063
|
+
},
|
|
2064
|
+
totalRounding: {
|
|
2065
|
+
decimals: roundingDecimals,
|
|
2066
|
+
interval: 0.01,
|
|
2067
|
+
roundForNet: true
|
|
2068
|
+
},
|
|
2069
|
+
taxFreeFrom: 0
|
|
2070
|
+
};
|
|
2071
|
+
return Object.assign({}, basicCurrency, overrides);
|
|
2072
|
+
}
|
|
1901
2073
|
getBasicProductStruct(taxId = this.defaultTaxId, currencyId = this.defaultCurrencyId, overrides = {}) {
|
|
1902
2074
|
const { id: productId, uuid: productUuid } = this.IdProvider.getIdPair();
|
|
1903
2075
|
const productName = `${this.namePrefix}Product-${productId}${this.nameSuffix}`;
|
|
@@ -2535,8 +2707,35 @@ class Home {
|
|
|
2535
2707
|
this.page = page;
|
|
2536
2708
|
__publicField$z(this, "productImages");
|
|
2537
2709
|
__publicField$z(this, "productListItems");
|
|
2710
|
+
__publicField$z(this, "languagesDropdown");
|
|
2711
|
+
__publicField$z(this, "currenciesDropdown");
|
|
2538
2712
|
this.productImages = page.locator(".product-image-link");
|
|
2539
2713
|
this.productListItems = page.getByRole("listitem");
|
|
2714
|
+
this.languagesDropdown = page.getByLabel("Shop settings").locator(".languages-menu");
|
|
2715
|
+
this.currenciesDropdown = page.getByLabel("Shop settings").locator(".currencies-menu");
|
|
2716
|
+
}
|
|
2717
|
+
async getListingItemByProductId(productId) {
|
|
2718
|
+
const listingItem = this.page.getByRole("listitem").filter({ has: this.page.locator(`[value="${productId}"]`) });
|
|
2719
|
+
const productImage = listingItem.locator(".product-image-link");
|
|
2720
|
+
const productRating = listingItem.locator(".product-rating");
|
|
2721
|
+
const productVariantCharacteristics = listingItem.locator(".product-variant-characteristics");
|
|
2722
|
+
const productDescription = listingItem.locator(".product-description");
|
|
2723
|
+
const productPriceUnit = listingItem.locator(".product-price-unit");
|
|
2724
|
+
const productCheapestPrice = listingItem.locator(".product-cheapest-price");
|
|
2725
|
+
const productPrice = listingItem.locator(".product-price");
|
|
2726
|
+
const productName = listingItem.locator(".product-name");
|
|
2727
|
+
const productAddToShoppingCart = listingItem.getByRole("button", { name: "Add to shopping cart" });
|
|
2728
|
+
return {
|
|
2729
|
+
productImage,
|
|
2730
|
+
productRating,
|
|
2731
|
+
productVariantCharacteristics,
|
|
2732
|
+
productDescription,
|
|
2733
|
+
productPriceUnit,
|
|
2734
|
+
productCheapestPrice,
|
|
2735
|
+
productPrice,
|
|
2736
|
+
productName,
|
|
2737
|
+
productAddToShoppingCart
|
|
2738
|
+
};
|
|
2540
2739
|
}
|
|
2541
2740
|
url() {
|
|
2542
2741
|
return "./";
|
|
@@ -2736,6 +2935,7 @@ class CheckoutConfirm {
|
|
|
2736
2935
|
__publicField$u(this, "termsAndConditionsCheckbox");
|
|
2737
2936
|
__publicField$u(this, "immediateAccessToDigitalProductCheckbox");
|
|
2738
2937
|
__publicField$u(this, "grandTotalPrice");
|
|
2938
|
+
__publicField$u(this, "taxPrice");
|
|
2739
2939
|
__publicField$u(this, "submitOrderButton");
|
|
2740
2940
|
/**
|
|
2741
2941
|
* Payment options
|
|
@@ -2756,6 +2956,7 @@ class CheckoutConfirm {
|
|
|
2756
2956
|
this.termsAndConditionsCheckbox = page.getByLabel("I have read and accepted the general terms and conditions.");
|
|
2757
2957
|
this.immediateAccessToDigitalProductCheckbox = page.getByLabel("I want immediate access to the digital content and I acknowledge that thereby I waive my right to cancel.");
|
|
2758
2958
|
this.grandTotalPrice = page.locator(`dt:has-text('Grand total') + dd`);
|
|
2959
|
+
this.taxPrice = page.locator(`dt:text-matches('plus [0-9]\\+\\?% VAT') + dd`);
|
|
2759
2960
|
this.submitOrderButton = page.getByRole("button", { name: "Submit order" });
|
|
2760
2961
|
this.paymentCashOnDelivery = page.getByLabel("Cash on delivery");
|
|
2761
2962
|
this.paymentPaidInAdvance = page.getByLabel("Paid in advance");
|
|
@@ -2781,11 +2982,13 @@ class CheckoutFinish {
|
|
|
2781
2982
|
__publicField$t(this, "headline");
|
|
2782
2983
|
__publicField$t(this, "orderNumberText");
|
|
2783
2984
|
__publicField$t(this, "grandTotalPrice");
|
|
2985
|
+
__publicField$t(this, "taxPrice");
|
|
2784
2986
|
__publicField$t(this, "cartLineItemImages");
|
|
2785
2987
|
__publicField$t(this, "orderNumberRegex", /Your order number: #(\d+)/);
|
|
2786
2988
|
this.headline = page.getByRole("heading", { name: "Thank you for your order" });
|
|
2787
2989
|
this.orderNumberText = page.getByText(this.orderNumberRegex);
|
|
2788
2990
|
this.grandTotalPrice = page.locator('dt:has-text("Grand total") + dd');
|
|
2991
|
+
this.taxPrice = page.locator(`dt:text-matches('plus [0-9]\\+\\?% VAT') + dd`);
|
|
2789
2992
|
this.cartLineItemImages = page.locator(".line-item-img-link");
|
|
2790
2993
|
}
|
|
2791
2994
|
url() {
|
|
@@ -3687,6 +3890,7 @@ class Categories {
|
|
|
3687
3890
|
__publicField$7(this, "categoryTypeSelectionList");
|
|
3688
3891
|
__publicField$7(this, "filtersResultPopoverItemList");
|
|
3689
3892
|
__publicField$7(this, "saveButton");
|
|
3893
|
+
__publicField$7(this, "loadingSpinner");
|
|
3690
3894
|
/**
|
|
3691
3895
|
* Customisable link
|
|
3692
3896
|
*/
|
|
@@ -3697,6 +3901,7 @@ class Categories {
|
|
|
3697
3901
|
__publicField$7(this, "landingPageSelectionList");
|
|
3698
3902
|
__publicField$7(this, "filterResultPopoverTreeCheckboxItemList");
|
|
3699
3903
|
__publicField$7(this, "openInNewTabCheckbox");
|
|
3904
|
+
__publicField$7(this, "popoverCategoryTree");
|
|
3700
3905
|
this.landingPageArea = page.locator(".sw-category-detail__landing-page-collapse");
|
|
3701
3906
|
this.landingPageHeadline = this.landingPageArea.getByRole("heading", { name: "Landing pages" });
|
|
3702
3907
|
this.addLandingPageButton = this.landingPageArea.getByText("Add landing page");
|
|
@@ -3714,16 +3919,21 @@ class Categories {
|
|
|
3714
3919
|
this.categoryTypeSelectionList = page.locator(".sw-select").filter({ hasText: "Category type" }).locator(".sw-select__selection");
|
|
3715
3920
|
this.linkTypeSelectionList = page.locator(".sw-select").filter({ hasText: "Link type" }).locator(".sw-select__selection");
|
|
3716
3921
|
this.entitySelectionList = page.locator(".sw-select").filter({ hasText: "Entity" }).locator(".sw-select__selection");
|
|
3717
|
-
this.categorySelectionList = page.locator(".sw-
|
|
3718
|
-
this.productSelectionList = page.locator(".sw-
|
|
3719
|
-
this.landingPageSelectionList = page.locator(".sw-
|
|
3922
|
+
this.categorySelectionList = page.locator(".sw-category-link-settings__selection-category");
|
|
3923
|
+
this.productSelectionList = page.locator(".sw-category-link-settings__selection-product");
|
|
3924
|
+
this.landingPageSelectionList = page.locator(".sw-category-link-settings__selection-landing-page");
|
|
3720
3925
|
this.filtersResultPopoverItemList = page.locator(".sw-select-result-list__content").getByRole("listitem");
|
|
3721
|
-
this.
|
|
3926
|
+
this.popoverCategoryTree = page.locator(".sw-category-tree-field__results_popover");
|
|
3927
|
+
this.filterResultPopoverTreeCheckboxItemList = this.popoverCategoryTree.locator(".sw-tree__content").locator(".sw-tree-item");
|
|
3722
3928
|
this.openInNewTabCheckbox = page.getByRole("checkbox", { name: "Open in new tab" });
|
|
3929
|
+
this.loadingSpinner = page.locator(".sw-loader");
|
|
3723
3930
|
}
|
|
3724
3931
|
async getLandingPageByName(landingPageName) {
|
|
3725
3932
|
return this.landingPageItems.locator(`text="${landingPageName}"`);
|
|
3726
3933
|
}
|
|
3934
|
+
async getPopOverCategoryByName(categoryName) {
|
|
3935
|
+
return this.popoverCategoryTree.locator(".sw-tree-item__element").filter({ hasText: `${categoryName}` });
|
|
3936
|
+
}
|
|
3727
3937
|
url() {
|
|
3728
3938
|
return `#/sw/category/index`;
|
|
3729
3939
|
}
|
|
@@ -4694,6 +4904,66 @@ const Register = test$e.extend({
|
|
|
4694
4904
|
}
|
|
4695
4905
|
});
|
|
4696
4906
|
|
|
4907
|
+
const RegisterGuest = test$e.extend({
|
|
4908
|
+
RegisterGuest: async ({ StorefrontAccountLogin, AdminApiContext }, use) => {
|
|
4909
|
+
const registrationData = {
|
|
4910
|
+
firstName: "Jeff",
|
|
4911
|
+
lastName: "Goldblum",
|
|
4912
|
+
email: "invalid",
|
|
4913
|
+
password: "shopware",
|
|
4914
|
+
street: "Ebbinghof 10",
|
|
4915
|
+
city: "Sch\xF6ppingen",
|
|
4916
|
+
country: "Germany",
|
|
4917
|
+
postalCode: "48624"
|
|
4918
|
+
};
|
|
4919
|
+
const task = (email, country = "Germany") => {
|
|
4920
|
+
return async function RegisterGuest2() {
|
|
4921
|
+
registrationData.email = email;
|
|
4922
|
+
await StorefrontAccountLogin.firstNameInput.fill(registrationData.firstName);
|
|
4923
|
+
await StorefrontAccountLogin.lastNameInput.fill(registrationData.lastName);
|
|
4924
|
+
await StorefrontAccountLogin.registerEmailInput.fill(registrationData.email);
|
|
4925
|
+
await StorefrontAccountLogin.streetAddressInput.fill(registrationData.street);
|
|
4926
|
+
await StorefrontAccountLogin.cityInput.fill(registrationData.city);
|
|
4927
|
+
if (country != "Germany") {
|
|
4928
|
+
await StorefrontAccountLogin.countryInput.selectOption(country);
|
|
4929
|
+
} else {
|
|
4930
|
+
await StorefrontAccountLogin.countryInput.selectOption(registrationData.country);
|
|
4931
|
+
}
|
|
4932
|
+
await StorefrontAccountLogin.postalCodeInput.fill(registrationData.postalCode);
|
|
4933
|
+
await StorefrontAccountLogin.registerButton.click();
|
|
4934
|
+
};
|
|
4935
|
+
};
|
|
4936
|
+
await use(task);
|
|
4937
|
+
const customerResponse = await AdminApiContext.post("search/customer", {
|
|
4938
|
+
data: {
|
|
4939
|
+
limit: 1,
|
|
4940
|
+
filter: [{
|
|
4941
|
+
type: "equals",
|
|
4942
|
+
field: "email",
|
|
4943
|
+
value: registrationData.email
|
|
4944
|
+
}]
|
|
4945
|
+
}
|
|
4946
|
+
});
|
|
4947
|
+
expect(customerResponse.ok()).toBeTruthy();
|
|
4948
|
+
const customerResponseData = await customerResponse.json();
|
|
4949
|
+
for (const customer of customerResponseData.data) {
|
|
4950
|
+
await AdminApiContext.delete(`customer/${customer.id}`);
|
|
4951
|
+
}
|
|
4952
|
+
}
|
|
4953
|
+
});
|
|
4954
|
+
|
|
4955
|
+
const ChangeStorefrontCurrency = test$e.extend({
|
|
4956
|
+
ChangeStorefrontCurrency: async ({ StorefrontHome }, use) => {
|
|
4957
|
+
const task = (isoCode) => {
|
|
4958
|
+
return async function ChangeStorefrontCurrency2() {
|
|
4959
|
+
await StorefrontHome.currenciesDropdown.click();
|
|
4960
|
+
await StorefrontHome.currenciesDropdown.getByText(" " + isoCode).click();
|
|
4961
|
+
};
|
|
4962
|
+
};
|
|
4963
|
+
await use(task);
|
|
4964
|
+
}
|
|
4965
|
+
});
|
|
4966
|
+
|
|
4697
4967
|
const AddProductToCart = test$e.extend({
|
|
4698
4968
|
AddProductToCart: async ({ ShopCustomer, StorefrontProductDetail }, use) => {
|
|
4699
4969
|
const task = (ProductData, quantity = "1") => {
|
|
@@ -4893,6 +5163,8 @@ const test$2 = mergeTests(
|
|
|
4893
5163
|
Login,
|
|
4894
5164
|
Logout,
|
|
4895
5165
|
Register,
|
|
5166
|
+
RegisterGuest,
|
|
5167
|
+
ChangeStorefrontCurrency,
|
|
4896
5168
|
AddProductToCart,
|
|
4897
5169
|
ChangeProductQuantity,
|
|
4898
5170
|
ProceedFromProductToCheckout,
|