@shopware-ag/acceptance-test-suite 5.4.0 → 6.0.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 +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.mjs +142 -7
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -256,6 +256,9 @@ type Currency$1 = components['schemas']['Currency'] & {
|
|
|
256
256
|
type Country = components['schemas']['Country'] & {
|
|
257
257
|
id: string;
|
|
258
258
|
};
|
|
259
|
+
type SystemConfig = components['schemas']['SystemConfig'] & {
|
|
260
|
+
id: string;
|
|
261
|
+
};
|
|
259
262
|
interface CalculatedTaxes {
|
|
260
263
|
tax: number;
|
|
261
264
|
taxRate: number;
|
|
@@ -565,6 +568,14 @@ declare class TestDataService {
|
|
|
565
568
|
* @param overrides - Specific data overrides that will be applied to the customer group data struct.
|
|
566
569
|
*/
|
|
567
570
|
createCustomerGroup(overrides?: Partial<CustomerGroup>): Promise<CustomerGroup>;
|
|
571
|
+
/**
|
|
572
|
+
* Creates a system config entry
|
|
573
|
+
*
|
|
574
|
+
* @param configurationKey - Config key for shop configurations.
|
|
575
|
+
* @param configurationValue - Config value as object for shop configurations (see {@link https://shopware.stoplight.io/docs/admin-api/9174d032146f8-create-a-new-system-config-resources|AdminApi Stoplight}).
|
|
576
|
+
* @param salesChannelId - Unique identity of sales channel.
|
|
577
|
+
*/
|
|
578
|
+
createSystemConfigEntry(configurationKey: string, configurationValue?: {}, salesChannelId?: string): Promise<SystemConfig>;
|
|
568
579
|
/**
|
|
569
580
|
* Assigns a media resource as the download of a digital product.
|
|
570
581
|
*
|
|
@@ -923,6 +934,16 @@ declare class Home implements PageObject {
|
|
|
923
934
|
readonly productListItems: Locator;
|
|
924
935
|
readonly languagesDropdown: Locator;
|
|
925
936
|
readonly currenciesDropdown: Locator;
|
|
937
|
+
readonly consentOnlyTechnicallyRequiredButton: Locator;
|
|
938
|
+
readonly consentConfigureButton: Locator;
|
|
939
|
+
readonly consentAcceptAllCookiesButton: Locator;
|
|
940
|
+
readonly consentCookiePreferences: Locator;
|
|
941
|
+
readonly consentCookiePermissionContent: Locator;
|
|
942
|
+
readonly consentDialog: Locator;
|
|
943
|
+
readonly consentDialogTechnicallyRequiredCheckbox: Locator;
|
|
944
|
+
readonly consentDialogAcceptAllCookiesButton: Locator;
|
|
945
|
+
readonly consentDialogSaveButton: Locator;
|
|
946
|
+
readonly consentCookieBannerContainer: Locator;
|
|
926
947
|
constructor(page: Page);
|
|
927
948
|
getListingItemByProductId(productId: string): Promise<Record<string, Locator>>;
|
|
928
949
|
url(): string;
|
|
@@ -1100,7 +1121,12 @@ declare class AccountOrder implements PageObject {
|
|
|
1100
1121
|
readonly cartLineItemImages: Locator;
|
|
1101
1122
|
readonly orderExpandButton: Locator;
|
|
1102
1123
|
readonly digitalProductDownloadButton: Locator;
|
|
1124
|
+
readonly dialogOrderCancel: Locator;
|
|
1125
|
+
readonly dialogOrderCancelButton: Locator;
|
|
1126
|
+
readonly dialogBackButton: Locator;
|
|
1103
1127
|
constructor(page: Page);
|
|
1128
|
+
getOrderByOrderNumber(orderNumber: string): Promise<Record<string, Locator>>;
|
|
1129
|
+
getViewSubscriptionLink: (orderNumber: string) => Locator;
|
|
1104
1130
|
url(): string;
|
|
1105
1131
|
}
|
|
1106
1132
|
|
|
@@ -1500,6 +1526,7 @@ declare class Categories implements PageObject {
|
|
|
1500
1526
|
readonly categoryMenuItemList: Locator;
|
|
1501
1527
|
readonly createCategoryInput: Locator;
|
|
1502
1528
|
readonly confirmCategoryCreationButton: Locator;
|
|
1529
|
+
readonly confirmCategoryCancelButton: Locator;
|
|
1503
1530
|
readonly categoryItems: Locator;
|
|
1504
1531
|
/**
|
|
1505
1532
|
* General
|
|
@@ -1510,6 +1537,7 @@ declare class Categories implements PageObject {
|
|
|
1510
1537
|
readonly filtersResultPopoverItemList: Locator;
|
|
1511
1538
|
readonly saveButton: Locator;
|
|
1512
1539
|
readonly loadingSpinner: Locator;
|
|
1540
|
+
readonly fadingBar: Locator;
|
|
1513
1541
|
/**
|
|
1514
1542
|
* Customisable link
|
|
1515
1543
|
*/
|
|
@@ -1782,6 +1810,8 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
1782
1810
|
SaveProduct: Task;
|
|
1783
1811
|
} & {
|
|
1784
1812
|
ExpectNotification: Task;
|
|
1813
|
+
} & {
|
|
1814
|
+
CreateLinkTypeCategory: Task;
|
|
1785
1815
|
} & {
|
|
1786
1816
|
Login: Task;
|
|
1787
1817
|
} & {
|
|
@@ -1822,4 +1852,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
1822
1852
|
ValidateAccessibility: (pageName: string, assertViolations?: number | boolean | undefined, createReport?: boolean | undefined, ruleTags?: string[] | undefined, outputDir?: string | undefined) => () => Promise<axe_core.Result[]>;
|
|
1823
1853
|
}, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
|
|
1824
1854
|
|
|
1825
|
-
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 CustomerGroup, 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 };
|
|
1855
|
+
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 CustomerGroup, 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 SystemConfig, 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
|
@@ -256,6 +256,9 @@ type Currency$1 = components['schemas']['Currency'] & {
|
|
|
256
256
|
type Country = components['schemas']['Country'] & {
|
|
257
257
|
id: string;
|
|
258
258
|
};
|
|
259
|
+
type SystemConfig = components['schemas']['SystemConfig'] & {
|
|
260
|
+
id: string;
|
|
261
|
+
};
|
|
259
262
|
interface CalculatedTaxes {
|
|
260
263
|
tax: number;
|
|
261
264
|
taxRate: number;
|
|
@@ -565,6 +568,14 @@ declare class TestDataService {
|
|
|
565
568
|
* @param overrides - Specific data overrides that will be applied to the customer group data struct.
|
|
566
569
|
*/
|
|
567
570
|
createCustomerGroup(overrides?: Partial<CustomerGroup>): Promise<CustomerGroup>;
|
|
571
|
+
/**
|
|
572
|
+
* Creates a system config entry
|
|
573
|
+
*
|
|
574
|
+
* @param configurationKey - Config key for shop configurations.
|
|
575
|
+
* @param configurationValue - Config value as object for shop configurations (see {@link https://shopware.stoplight.io/docs/admin-api/9174d032146f8-create-a-new-system-config-resources|AdminApi Stoplight}).
|
|
576
|
+
* @param salesChannelId - Unique identity of sales channel.
|
|
577
|
+
*/
|
|
578
|
+
createSystemConfigEntry(configurationKey: string, configurationValue?: {}, salesChannelId?: string): Promise<SystemConfig>;
|
|
568
579
|
/**
|
|
569
580
|
* Assigns a media resource as the download of a digital product.
|
|
570
581
|
*
|
|
@@ -923,6 +934,16 @@ declare class Home implements PageObject {
|
|
|
923
934
|
readonly productListItems: Locator;
|
|
924
935
|
readonly languagesDropdown: Locator;
|
|
925
936
|
readonly currenciesDropdown: Locator;
|
|
937
|
+
readonly consentOnlyTechnicallyRequiredButton: Locator;
|
|
938
|
+
readonly consentConfigureButton: Locator;
|
|
939
|
+
readonly consentAcceptAllCookiesButton: Locator;
|
|
940
|
+
readonly consentCookiePreferences: Locator;
|
|
941
|
+
readonly consentCookiePermissionContent: Locator;
|
|
942
|
+
readonly consentDialog: Locator;
|
|
943
|
+
readonly consentDialogTechnicallyRequiredCheckbox: Locator;
|
|
944
|
+
readonly consentDialogAcceptAllCookiesButton: Locator;
|
|
945
|
+
readonly consentDialogSaveButton: Locator;
|
|
946
|
+
readonly consentCookieBannerContainer: Locator;
|
|
926
947
|
constructor(page: Page);
|
|
927
948
|
getListingItemByProductId(productId: string): Promise<Record<string, Locator>>;
|
|
928
949
|
url(): string;
|
|
@@ -1100,7 +1121,12 @@ declare class AccountOrder implements PageObject {
|
|
|
1100
1121
|
readonly cartLineItemImages: Locator;
|
|
1101
1122
|
readonly orderExpandButton: Locator;
|
|
1102
1123
|
readonly digitalProductDownloadButton: Locator;
|
|
1124
|
+
readonly dialogOrderCancel: Locator;
|
|
1125
|
+
readonly dialogOrderCancelButton: Locator;
|
|
1126
|
+
readonly dialogBackButton: Locator;
|
|
1103
1127
|
constructor(page: Page);
|
|
1128
|
+
getOrderByOrderNumber(orderNumber: string): Promise<Record<string, Locator>>;
|
|
1129
|
+
getViewSubscriptionLink: (orderNumber: string) => Locator;
|
|
1104
1130
|
url(): string;
|
|
1105
1131
|
}
|
|
1106
1132
|
|
|
@@ -1500,6 +1526,7 @@ declare class Categories implements PageObject {
|
|
|
1500
1526
|
readonly categoryMenuItemList: Locator;
|
|
1501
1527
|
readonly createCategoryInput: Locator;
|
|
1502
1528
|
readonly confirmCategoryCreationButton: Locator;
|
|
1529
|
+
readonly confirmCategoryCancelButton: Locator;
|
|
1503
1530
|
readonly categoryItems: Locator;
|
|
1504
1531
|
/**
|
|
1505
1532
|
* General
|
|
@@ -1510,6 +1537,7 @@ declare class Categories implements PageObject {
|
|
|
1510
1537
|
readonly filtersResultPopoverItemList: Locator;
|
|
1511
1538
|
readonly saveButton: Locator;
|
|
1512
1539
|
readonly loadingSpinner: Locator;
|
|
1540
|
+
readonly fadingBar: Locator;
|
|
1513
1541
|
/**
|
|
1514
1542
|
* Customisable link
|
|
1515
1543
|
*/
|
|
@@ -1782,6 +1810,8 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
1782
1810
|
SaveProduct: Task;
|
|
1783
1811
|
} & {
|
|
1784
1812
|
ExpectNotification: Task;
|
|
1813
|
+
} & {
|
|
1814
|
+
CreateLinkTypeCategory: Task;
|
|
1785
1815
|
} & {
|
|
1786
1816
|
Login: Task;
|
|
1787
1817
|
} & {
|
|
@@ -1822,4 +1852,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
1822
1852
|
ValidateAccessibility: (pageName: string, assertViolations?: number | boolean | undefined, createReport?: boolean | undefined, ruleTags?: string[] | undefined, outputDir?: string | undefined) => () => Promise<axe_core.Result[]>;
|
|
1823
1853
|
}, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
|
|
1824
1854
|
|
|
1825
|
-
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 CustomerGroup, 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 };
|
|
1855
|
+
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 CustomerGroup, 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 SystemConfig, 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
|
@@ -1519,6 +1519,28 @@ class TestDataService {
|
|
|
1519
1519
|
this.addCreatedRecord("customer_group", customerGroup.id);
|
|
1520
1520
|
return customerGroup;
|
|
1521
1521
|
}
|
|
1522
|
+
/**
|
|
1523
|
+
* Creates a system config entry
|
|
1524
|
+
*
|
|
1525
|
+
* @param configurationKey - Config key for shop configurations.
|
|
1526
|
+
* @param configurationValue - Config value as object for shop configurations (see {@link https://shopware.stoplight.io/docs/admin-api/9174d032146f8-create-a-new-system-config-resources|AdminApi Stoplight}).
|
|
1527
|
+
* @param salesChannelId - Unique identity of sales channel.
|
|
1528
|
+
*/
|
|
1529
|
+
async createSystemConfigEntry(configurationKey, configurationValue = {}, salesChannelId = "") {
|
|
1530
|
+
const systemConfigStruct = {
|
|
1531
|
+
id: this.IdProvider.getIdPair().uuid,
|
|
1532
|
+
configurationKey,
|
|
1533
|
+
configurationValue,
|
|
1534
|
+
salesChannelId: salesChannelId || null
|
|
1535
|
+
};
|
|
1536
|
+
const response = await this.AdminApiClient.post("system-config?_response=detail", {
|
|
1537
|
+
data: systemConfigStruct
|
|
1538
|
+
});
|
|
1539
|
+
expect(response.ok()).toBeTruthy();
|
|
1540
|
+
const { data: systemConfigEntry } = await response.json();
|
|
1541
|
+
this.addCreatedRecord("system_config", systemConfigEntry.id);
|
|
1542
|
+
return systemConfigEntry;
|
|
1543
|
+
}
|
|
1522
1544
|
/**
|
|
1523
1545
|
* Assigns a media resource as the download of a digital product.
|
|
1524
1546
|
*
|
|
@@ -2743,10 +2765,30 @@ class Home {
|
|
|
2743
2765
|
__publicField$G(this, "productListItems");
|
|
2744
2766
|
__publicField$G(this, "languagesDropdown");
|
|
2745
2767
|
__publicField$G(this, "currenciesDropdown");
|
|
2768
|
+
__publicField$G(this, "consentOnlyTechnicallyRequiredButton");
|
|
2769
|
+
__publicField$G(this, "consentConfigureButton");
|
|
2770
|
+
__publicField$G(this, "consentAcceptAllCookiesButton");
|
|
2771
|
+
__publicField$G(this, "consentCookiePreferences");
|
|
2772
|
+
__publicField$G(this, "consentCookiePermissionContent");
|
|
2773
|
+
__publicField$G(this, "consentDialog");
|
|
2774
|
+
__publicField$G(this, "consentDialogTechnicallyRequiredCheckbox");
|
|
2775
|
+
__publicField$G(this, "consentDialogAcceptAllCookiesButton");
|
|
2776
|
+
__publicField$G(this, "consentDialogSaveButton");
|
|
2777
|
+
__publicField$G(this, "consentCookieBannerContainer");
|
|
2746
2778
|
this.productImages = page.locator(".product-image-link");
|
|
2747
2779
|
this.productListItems = page.getByRole("listitem");
|
|
2748
2780
|
this.languagesDropdown = page.getByLabel("Shop settings").locator(".languages-menu");
|
|
2749
2781
|
this.currenciesDropdown = page.getByLabel("Shop settings").locator(".currencies-menu");
|
|
2782
|
+
this.consentCookieBannerContainer = page.locator(".cookie-permission-container");
|
|
2783
|
+
this.consentOnlyTechnicallyRequiredButton = page.getByRole("button", { name: "Only technically required" });
|
|
2784
|
+
this.consentConfigureButton = page.getByRole("button", { name: "Configure" });
|
|
2785
|
+
this.consentAcceptAllCookiesButton = page.getByRole("button", { name: "Accept all cookies" });
|
|
2786
|
+
this.consentCookiePreferences = page.getByLabel("Cookie preferences");
|
|
2787
|
+
this.consentCookiePermissionContent = page.locator(".cookie-permission-content");
|
|
2788
|
+
this.consentDialog = page.getByRole("dialog").filter({ hasText: "Cookie preferences" });
|
|
2789
|
+
this.consentDialogTechnicallyRequiredCheckbox = this.consentDialog.getByRole("checkbox", { name: "Technically required" });
|
|
2790
|
+
this.consentDialogSaveButton = this.consentDialog.getByRole("button", { name: "Save" });
|
|
2791
|
+
this.consentDialogAcceptAllCookiesButton = this.consentDialog.getByRole("button", { name: "Accept all cookies" });
|
|
2750
2792
|
}
|
|
2751
2793
|
async getListingItemByProductId(productId) {
|
|
2752
2794
|
const listingItem = this.page.getByRole("listitem").filter({ has: this.page.locator(`[value="${productId}"]`) });
|
|
@@ -3208,9 +3250,48 @@ class AccountOrder {
|
|
|
3208
3250
|
__publicField$v(this, "cartLineItemImages");
|
|
3209
3251
|
__publicField$v(this, "orderExpandButton");
|
|
3210
3252
|
__publicField$v(this, "digitalProductDownloadButton");
|
|
3253
|
+
__publicField$v(this, "dialogOrderCancel");
|
|
3254
|
+
__publicField$v(this, "dialogOrderCancelButton");
|
|
3255
|
+
__publicField$v(this, "dialogBackButton");
|
|
3256
|
+
__publicField$v(this, "getViewSubscriptionLink", (orderNumber) => {
|
|
3257
|
+
const orderContainer = this.page.locator(".order-item-header", { hasText: `Order Number: ${orderNumber}` });
|
|
3258
|
+
return orderContainer.getByText("View Subscription");
|
|
3259
|
+
});
|
|
3211
3260
|
this.orderExpandButton = page.getByRole("button", { name: /Expand|Show details/ }).first();
|
|
3212
3261
|
this.cartLineItemImages = page.locator(".line-item-img-link");
|
|
3213
3262
|
this.digitalProductDownloadButton = page.getByRole("link", { name: "Download" }).first();
|
|
3263
|
+
this.dialogOrderCancel = page.getByRole("dialog", { name: "Cancel order" });
|
|
3264
|
+
this.dialogOrderCancelButton = this.dialogOrderCancel.getByRole("button", { name: "Cancel order" });
|
|
3265
|
+
this.dialogBackButton = this.dialogOrderCancel.getByRole("button", { name: "Back" });
|
|
3266
|
+
}
|
|
3267
|
+
async getOrderByOrderNumber(orderNumber) {
|
|
3268
|
+
const orderItem = this.page.getByRole("listitem").getByLabel(`Order number ${orderNumber}`);
|
|
3269
|
+
const orderStatus = orderItem.locator(".order-table-header-order-status");
|
|
3270
|
+
const orderHeading = orderItem.locator(".order-table-header-heading");
|
|
3271
|
+
const orderActionsButton = orderItem.getByLabel("Actions");
|
|
3272
|
+
const orderCancelButton = orderItem.getByRole("button", { name: "Cancel order" });
|
|
3273
|
+
const orderRepeatButton = orderItem.getByRole("button", { name: "Repeat order" });
|
|
3274
|
+
const orderChangePaymentMethodButton = orderItem.getByRole("link", { name: "Change payment method" });
|
|
3275
|
+
const orderShippingStatus = orderItem.locator(".order-table-body-value").nth(1);
|
|
3276
|
+
const orderPaymentStatus = orderItem.locator(".order-table-body-value").nth(2);
|
|
3277
|
+
const orderPaymentMethod = orderItem.locator(".order-table-body-value").nth(3);
|
|
3278
|
+
const orderShippingMethod = orderItem.locator(".order-table-body-value").nth(4);
|
|
3279
|
+
const orderDetailButton = orderItem.getByRole("button", { name: /Expand|Show details/ });
|
|
3280
|
+
const orderImage = orderItem.locator(".line-item-img-link");
|
|
3281
|
+
return {
|
|
3282
|
+
orderStatus,
|
|
3283
|
+
orderHeading,
|
|
3284
|
+
orderActionsButton,
|
|
3285
|
+
orderCancelButton,
|
|
3286
|
+
orderRepeatButton,
|
|
3287
|
+
orderChangePaymentMethodButton,
|
|
3288
|
+
orderShippingStatus,
|
|
3289
|
+
orderPaymentStatus,
|
|
3290
|
+
orderPaymentMethod,
|
|
3291
|
+
orderShippingMethod,
|
|
3292
|
+
orderDetailButton,
|
|
3293
|
+
orderImage
|
|
3294
|
+
};
|
|
3214
3295
|
}
|
|
3215
3296
|
url() {
|
|
3216
3297
|
return "account/order";
|
|
@@ -3440,11 +3521,11 @@ class ProductDetail {
|
|
|
3440
3521
|
this.uploadMediaButton = page.getByRole("button", { name: "Upload file" });
|
|
3441
3522
|
this.coverImage = page.locator(".sw-product-media-form__cover-image");
|
|
3442
3523
|
this.productImage = page.locator(".sw-media-preview-v2__item");
|
|
3443
|
-
this.variantsTabLink = page.getByRole("
|
|
3524
|
+
this.variantsTabLink = page.getByRole("tab", { name: "Variants" });
|
|
3444
3525
|
this.generateVariantsButton = page.getByRole("button", { name: "Generate variants" });
|
|
3445
3526
|
this.variantsModal = page.getByRole("dialog", { name: "Generate variants" });
|
|
3446
3527
|
this.variantsModalHeadline = this.variantsModal.getByRole("heading", { name: "Generate variants" });
|
|
3447
|
-
this.variantsNextButton = this.variantsModal.getByRole("button", { name: "Next" });
|
|
3528
|
+
this.variantsNextButton = this.variantsModal.getByRole("button", { name: "Next", exact: true });
|
|
3448
3529
|
this.variantsSaveButton = this.variantsModal.getByRole("button", { name: "Save variants" });
|
|
3449
3530
|
this.propertyGroupColor = this.variantsModal.getByText("Color").first();
|
|
3450
3531
|
this.propertyGroupSize = this.variantsModal.getByText("Size").first();
|
|
@@ -3455,7 +3536,7 @@ class ProductDetail {
|
|
|
3455
3536
|
this.propertyOptionSizeSmall = this.propertyOptionGrid.getByLabel("Small");
|
|
3456
3537
|
this.propertyOptionSizeMedium = this.propertyOptionGrid.getByLabel("Medium");
|
|
3457
3538
|
this.propertyOptionSizeLarge = this.propertyOptionGrid.getByLabel("Large");
|
|
3458
|
-
this.specificationsTabLink = page.getByRole("
|
|
3539
|
+
this.specificationsTabLink = page.getByRole("tab", { name: "Specifications" });
|
|
3459
3540
|
this.customFieldCard = page.locator(".sw-card").getByText("Custom fields");
|
|
3460
3541
|
}
|
|
3461
3542
|
async getCustomFieldSetCardContentByName(customFieldSetName) {
|
|
@@ -3991,7 +4072,7 @@ class LandingPageCreate {
|
|
|
3991
4072
|
this.salesChannelSelectionList = page.locator(".sw-select").filter({ hasText: "Sales Channels" }).locator(".sw-select-selection-list");
|
|
3992
4073
|
this.filtersResultPopoverItemList = page.locator(".sw-select-result-list__content").getByRole("listitem");
|
|
3993
4074
|
this.seoUrlInput = page.getByLabel("SEO URL");
|
|
3994
|
-
this.layoutTab = page.getByRole("
|
|
4075
|
+
this.layoutTab = page.getByRole("tab", { name: "Layout" });
|
|
3995
4076
|
const layoutCardPreview = page.locator(".sw-category-layout-card__preview");
|
|
3996
4077
|
this.layoutEmptyState = layoutCardPreview.locator(".is--empty");
|
|
3997
4078
|
this.assignLayoutButton = page.getByRole("button", { name: "Assign layout" });
|
|
@@ -4045,7 +4126,7 @@ class LandingPageDetail {
|
|
|
4045
4126
|
this.salesChannelSelectionList = page.locator(".sw-select").filter({ hasText: "Sales Channels" }).locator(".sw-select-selection-list");
|
|
4046
4127
|
this.filtersResultPopoverItemList = page.locator(".sw-select-result-list__content").getByRole("listitem");
|
|
4047
4128
|
this.seoUrlInput = page.getByLabel("SEO URL");
|
|
4048
|
-
this.layoutTab = page.getByRole("
|
|
4129
|
+
this.layoutTab = page.getByRole("tab", { name: "Layout" });
|
|
4049
4130
|
this.changeLayoutButton = page.getByRole("button", { name: "Change layout" });
|
|
4050
4131
|
this.editInDesignerButton = page.getByRole("button", { name: "Edit in designer" });
|
|
4051
4132
|
const layoutAssignmentCard = page.locator(".sw-category-layout-card");
|
|
@@ -4086,6 +4167,7 @@ class Categories {
|
|
|
4086
4167
|
__publicField$a(this, "categoryMenuItemList");
|
|
4087
4168
|
__publicField$a(this, "createCategoryInput");
|
|
4088
4169
|
__publicField$a(this, "confirmCategoryCreationButton");
|
|
4170
|
+
__publicField$a(this, "confirmCategoryCancelButton");
|
|
4089
4171
|
__publicField$a(this, "categoryItems");
|
|
4090
4172
|
/**
|
|
4091
4173
|
* General
|
|
@@ -4096,6 +4178,7 @@ class Categories {
|
|
|
4096
4178
|
__publicField$a(this, "filtersResultPopoverItemList");
|
|
4097
4179
|
__publicField$a(this, "saveButton");
|
|
4098
4180
|
__publicField$a(this, "loadingSpinner");
|
|
4181
|
+
__publicField$a(this, "fadingBar");
|
|
4099
4182
|
/**
|
|
4100
4183
|
* Customisable link
|
|
4101
4184
|
*/
|
|
@@ -4117,7 +4200,8 @@ class Categories {
|
|
|
4117
4200
|
this.categoryMenuItemList = page.locator(".sw-context-button__menu-popover").locator(".sw-context-menu-item");
|
|
4118
4201
|
this.createCategoryInput = page.getByPlaceholder("Create category").getByRole("textbox");
|
|
4119
4202
|
this.confirmCategoryCreationButton = page.locator(".sw-confirm-field").locator(".sw-button--primary");
|
|
4120
|
-
this.categoryItems = this.categoryTree.locator(".
|
|
4203
|
+
this.categoryItems = this.categoryTree.locator(".tree-link");
|
|
4204
|
+
this.confirmCategoryCancelButton = page.locator(".sw-confirm-field").locator(".sw-confirm-field__button--cancel");
|
|
4121
4205
|
this.nameInput = page.getByLabel("Name");
|
|
4122
4206
|
this.activeCheckbox = page.getByRole("checkbox", { name: "Active" });
|
|
4123
4207
|
this.saveButton = page.getByRole("button", { name: "Save" });
|
|
@@ -4132,6 +4216,7 @@ class Categories {
|
|
|
4132
4216
|
this.filterResultPopoverTreeCheckboxItemList = this.popoverCategoryTree.locator(".sw-tree__content").locator(".sw-tree-item");
|
|
4133
4217
|
this.openInNewTabCheckbox = page.getByRole("checkbox", { name: "Open in new tab" });
|
|
4134
4218
|
this.loadingSpinner = page.locator(".sw-loader");
|
|
4219
|
+
this.fadingBar = page.locator(".fade-leave-active");
|
|
4135
4220
|
}
|
|
4136
4221
|
async getLandingPageByName(landingPageName) {
|
|
4137
4222
|
return this.landingPageItems.locator(`text="${landingPageName}"`);
|
|
@@ -5155,9 +5240,59 @@ const ExpectNotification = test$e.extend({
|
|
|
5155
5240
|
}
|
|
5156
5241
|
});
|
|
5157
5242
|
|
|
5243
|
+
const CreateLinkTypeCategory = test$e.extend({
|
|
5244
|
+
CreateLinkTypeCategory: async ({ AdminCategories, AdminCategoryDetail, TestDataService }, use) => {
|
|
5245
|
+
const task = (categoryData, categoryCustomizableLinkData) => {
|
|
5246
|
+
return async function CreateLinkTypeCategory2() {
|
|
5247
|
+
await AdminCategories.homeCategoryContextButton.click();
|
|
5248
|
+
await AdminCategories.categoryMenuItemList.filter({ hasText: "New category after" }).click();
|
|
5249
|
+
await AdminCategories.createCategoryInput.fill(categoryData.name);
|
|
5250
|
+
await AdminCategories.confirmCategoryCreationButton.click();
|
|
5251
|
+
await AdminCategories.fadingBar.first().waitFor({ state: "hidden" });
|
|
5252
|
+
await AdminCategories.confirmCategoryCancelButton.click();
|
|
5253
|
+
await AdminCategories.categoryItems.filter({ hasText: categoryData.name }).click();
|
|
5254
|
+
await AdminCategories.nameInput.fill(categoryData.name);
|
|
5255
|
+
await AdminCategories.activeCheckbox.setChecked(categoryData.status);
|
|
5256
|
+
await AdminCategories.categoryTypeSelectionList.click();
|
|
5257
|
+
await AdminCategories.filtersResultPopoverItemList.filter({ hasText: categoryData.categoryType }).click();
|
|
5258
|
+
await AdminCategories.linkTypeSelectionList.click();
|
|
5259
|
+
await AdminCategories.filtersResultPopoverItemList.filter({ hasText: categoryCustomizableLinkData.linkType }).click();
|
|
5260
|
+
await AdminCategories.entitySelectionList.click();
|
|
5261
|
+
await AdminCategories.filtersResultPopoverItemList.filter({ hasText: categoryCustomizableLinkData.entity }).click();
|
|
5262
|
+
let locator;
|
|
5263
|
+
switch (categoryCustomizableLinkData.entity) {
|
|
5264
|
+
case "Category":
|
|
5265
|
+
await AdminCategories.categorySelectionList.click();
|
|
5266
|
+
locator = await AdminCategories.getPopOverCategoryByName(categoryCustomizableLinkData.category);
|
|
5267
|
+
await locator.getByRole("checkbox").click();
|
|
5268
|
+
break;
|
|
5269
|
+
case "Product":
|
|
5270
|
+
await AdminCategories.productSelectionList.click();
|
|
5271
|
+
await AdminCategories.filtersResultPopoverItemList.filter({ hasText: categoryCustomizableLinkData.product }).click();
|
|
5272
|
+
break;
|
|
5273
|
+
case "Landing page":
|
|
5274
|
+
await AdminCategories.landingPageSelectionList.click();
|
|
5275
|
+
await AdminCategories.filtersResultPopoverItemList.filter({ hasText: categoryCustomizableLinkData.landingPage }).click();
|
|
5276
|
+
break;
|
|
5277
|
+
default:
|
|
5278
|
+
throw new Error("Entity type not found");
|
|
5279
|
+
}
|
|
5280
|
+
await AdminCategories.openInNewTabCheckbox.setChecked(categoryCustomizableLinkData.openInNewTab);
|
|
5281
|
+
await AdminCategories.saveButton.click();
|
|
5282
|
+
await AdminCategories.loadingSpinner.waitFor({ state: "hidden" });
|
|
5283
|
+
const url = AdminCategoryDetail.page.url();
|
|
5284
|
+
const categoryId = url.split("/")[url.split("/").length - 2];
|
|
5285
|
+
TestDataService.addCreatedRecord("category", categoryId);
|
|
5286
|
+
};
|
|
5287
|
+
};
|
|
5288
|
+
await use(task);
|
|
5289
|
+
}
|
|
5290
|
+
});
|
|
5291
|
+
|
|
5158
5292
|
const test$3 = mergeTests(
|
|
5159
5293
|
SaveProduct,
|
|
5160
|
-
ExpectNotification
|
|
5294
|
+
ExpectNotification,
|
|
5295
|
+
CreateLinkTypeCategory
|
|
5161
5296
|
);
|
|
5162
5297
|
|
|
5163
5298
|
const Login = test$e.extend({
|