@shopware-ag/acceptance-test-suite 11.3.1 → 11.3.2
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 +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.mjs +38 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1111,12 +1111,17 @@ declare class Home implements PageObject {
|
|
|
1111
1111
|
readonly consentDialog: Locator;
|
|
1112
1112
|
readonly consentDialogTechnicallyRequiredCheckbox: Locator;
|
|
1113
1113
|
readonly consentDialogStatisticsCheckbox: Locator;
|
|
1114
|
+
/**
|
|
1115
|
+
* @deprecated Use 'consentDialogMarketingCheckbox' instead
|
|
1116
|
+
*/
|
|
1114
1117
|
readonly consentDialogMarketingdCheckbox: Locator;
|
|
1118
|
+
readonly consentDialogMarketingCheckbox: Locator;
|
|
1115
1119
|
readonly consentDialogAcceptAllCookiesButton: Locator;
|
|
1116
1120
|
readonly consentDialogSaveButton: Locator;
|
|
1117
1121
|
readonly consentCookieBannerContainer: Locator;
|
|
1118
1122
|
readonly offcanvasBackdrop: Locator;
|
|
1119
1123
|
constructor(page: Page);
|
|
1124
|
+
getMenuItemByCategoryName(categoryName: string): Promise<Record<string, Locator>>;
|
|
1120
1125
|
getListingItemByProductId(productId: string): Promise<Record<string, Locator>>;
|
|
1121
1126
|
url(): string;
|
|
1122
1127
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1111,12 +1111,17 @@ declare class Home implements PageObject {
|
|
|
1111
1111
|
readonly consentDialog: Locator;
|
|
1112
1112
|
readonly consentDialogTechnicallyRequiredCheckbox: Locator;
|
|
1113
1113
|
readonly consentDialogStatisticsCheckbox: Locator;
|
|
1114
|
+
/**
|
|
1115
|
+
* @deprecated Use 'consentDialogMarketingCheckbox' instead
|
|
1116
|
+
*/
|
|
1114
1117
|
readonly consentDialogMarketingdCheckbox: Locator;
|
|
1118
|
+
readonly consentDialogMarketingCheckbox: Locator;
|
|
1115
1119
|
readonly consentDialogAcceptAllCookiesButton: Locator;
|
|
1116
1120
|
readonly consentDialogSaveButton: Locator;
|
|
1117
1121
|
readonly consentCookieBannerContainer: Locator;
|
|
1118
1122
|
readonly offcanvasBackdrop: Locator;
|
|
1119
1123
|
constructor(page: Page);
|
|
1124
|
+
getMenuItemByCategoryName(categoryName: string): Promise<Record<string, Locator>>;
|
|
1120
1125
|
getListingItemByProductId(productId: string): Promise<Record<string, Locator>>;
|
|
1121
1126
|
url(): string;
|
|
1122
1127
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -3042,7 +3042,11 @@ class Home {
|
|
|
3042
3042
|
__publicField$P(this, "consentDialog");
|
|
3043
3043
|
__publicField$P(this, "consentDialogTechnicallyRequiredCheckbox");
|
|
3044
3044
|
__publicField$P(this, "consentDialogStatisticsCheckbox");
|
|
3045
|
+
/**
|
|
3046
|
+
* @deprecated Use 'consentDialogMarketingCheckbox' instead
|
|
3047
|
+
*/
|
|
3045
3048
|
__publicField$P(this, "consentDialogMarketingdCheckbox");
|
|
3049
|
+
__publicField$P(this, "consentDialogMarketingCheckbox");
|
|
3046
3050
|
__publicField$P(this, "consentDialogAcceptAllCookiesButton");
|
|
3047
3051
|
__publicField$P(this, "consentDialogSaveButton");
|
|
3048
3052
|
__publicField$P(this, "consentCookieBannerContainer");
|
|
@@ -3062,13 +3066,40 @@ class Home {
|
|
|
3062
3066
|
this.consentCookiePreferences = page.getByLabel("Cookie preferences");
|
|
3063
3067
|
this.consentCookiePermissionContent = page.locator(".cookie-permission-content");
|
|
3064
3068
|
this.consentDialog = page.getByRole("dialog").filter({ hasText: "Cookie preferences" });
|
|
3065
|
-
this.consentDialogTechnicallyRequiredCheckbox = this.consentDialog.getByRole("checkbox", {
|
|
3066
|
-
|
|
3069
|
+
this.consentDialogTechnicallyRequiredCheckbox = this.consentDialog.getByRole("checkbox", {
|
|
3070
|
+
name: "Technically required",
|
|
3071
|
+
exact: true
|
|
3072
|
+
});
|
|
3073
|
+
this.consentDialogStatisticsCheckbox = this.consentDialog.getByRole("checkbox", {
|
|
3074
|
+
name: "Statistics",
|
|
3075
|
+
exact: true
|
|
3076
|
+
});
|
|
3067
3077
|
this.consentDialogMarketingdCheckbox = this.consentDialog.getByRole("checkbox", { name: "Marketing", exact: true });
|
|
3068
|
-
this.
|
|
3069
|
-
this.
|
|
3078
|
+
this.consentDialogMarketingCheckbox = this.consentDialog.getByRole("checkbox", { name: "Marketing", exact: true });
|
|
3079
|
+
this.consentDialogSaveButton = this.consentDialog.getByRole("button", {
|
|
3080
|
+
name: "Save",
|
|
3081
|
+
exact: true
|
|
3082
|
+
});
|
|
3083
|
+
this.consentDialogAcceptAllCookiesButton = this.consentDialog.getByRole("button", {
|
|
3084
|
+
name: "Accept all cookies",
|
|
3085
|
+
exact: true
|
|
3086
|
+
});
|
|
3070
3087
|
this.offcanvasBackdrop = page.locator(".offcanvas-backdrop");
|
|
3071
3088
|
}
|
|
3089
|
+
async getMenuItemByCategoryName(categoryName) {
|
|
3090
|
+
const menuNavigationItem = this.page.locator(".nav-main").getByText(categoryName, { exact: true });
|
|
3091
|
+
const offcanvasNavigationItem = this.page.locator(".js-navigation-offcanvas-initial-content").getByText(categoryName, { exact: true });
|
|
3092
|
+
const breadcrumbNavigationItem = this.page.locator(".cms-breadcrumb").getByText(categoryName, { exact: true });
|
|
3093
|
+
const breadcrumbNavigationLinkItem = this.page.locator(".breadcrumb-item").filter({ has: this.page.getByText(categoryName, { exact: true }) }).getByRole("link");
|
|
3094
|
+
const flyoutCategoryLink = this.page.locator(".nav-main").locator(".navigation-flyout-category-link").getByText(categoryName);
|
|
3095
|
+
return {
|
|
3096
|
+
menuNavigationItem,
|
|
3097
|
+
offcanvasNavigationItem,
|
|
3098
|
+
breadcrumbNavigationItem,
|
|
3099
|
+
breadcrumbNavigationLinkItem,
|
|
3100
|
+
flyoutCategoryLink
|
|
3101
|
+
};
|
|
3102
|
+
}
|
|
3072
3103
|
async getListingItemByProductId(productId) {
|
|
3073
3104
|
const listingItem = this.page.getByRole("listitem").filter({ has: this.page.locator(`[value="${productId}"]`) });
|
|
3074
3105
|
const productImage = listingItem.locator(".product-image-link");
|
|
@@ -3079,7 +3110,9 @@ class Home {
|
|
|
3079
3110
|
const productCheapestPrice = listingItem.locator(".product-cheapest-price");
|
|
3080
3111
|
const productPrice = listingItem.locator(".product-price");
|
|
3081
3112
|
const productName = listingItem.locator(".product-name");
|
|
3082
|
-
const productAddToShoppingCart = listingItem.getByRole("button", {
|
|
3113
|
+
const productAddToShoppingCart = listingItem.getByRole("button", {
|
|
3114
|
+
name: "Add to shopping cart"
|
|
3115
|
+
});
|
|
3083
3116
|
return {
|
|
3084
3117
|
productImage,
|
|
3085
3118
|
productRating,
|