@shopware-ag/acceptance-test-suite 11.3.1 → 11.3.3

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 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
  }
@@ -1361,11 +1366,18 @@ declare class Search implements PageObject {
1361
1366
  url(searchTerm: string): string;
1362
1367
  }
1363
1368
 
1364
- declare class SearchSuggest implements PageObject {
1369
+ declare class SearchSuggest extends Home implements PageObject {
1365
1370
  readonly page: Page;
1366
1371
  readonly searchSuggestLineItemImages: Locator;
1372
+ readonly searchInput: Locator;
1373
+ readonly searchIcon: Locator;
1374
+ readonly searchSuggestNoResult: Locator;
1375
+ readonly searchSuggestLineItemName: Locator;
1376
+ readonly searchSuggestLineItemPrice: Locator;
1377
+ readonly searchSuggestTotalLink: Locator;
1378
+ readonly searchHeadline: Locator;
1367
1379
  constructor(page: Page);
1368
- url(searchTerm: string): string;
1380
+ url(searchTerm?: string): string;
1369
1381
  }
1370
1382
 
1371
1383
  declare class CustomRegister extends AccountLogin implements PageObject {
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
  }
@@ -1361,11 +1366,18 @@ declare class Search implements PageObject {
1361
1366
  url(searchTerm: string): string;
1362
1367
  }
1363
1368
 
1364
- declare class SearchSuggest implements PageObject {
1369
+ declare class SearchSuggest extends Home implements PageObject {
1365
1370
  readonly page: Page;
1366
1371
  readonly searchSuggestLineItemImages: Locator;
1372
+ readonly searchInput: Locator;
1373
+ readonly searchIcon: Locator;
1374
+ readonly searchSuggestNoResult: Locator;
1375
+ readonly searchSuggestLineItemName: Locator;
1376
+ readonly searchSuggestLineItemPrice: Locator;
1377
+ readonly searchSuggestTotalLink: Locator;
1378
+ readonly searchHeadline: Locator;
1367
1379
  constructor(page: Page);
1368
- url(searchTerm: string): string;
1380
+ url(searchTerm?: string): string;
1369
1381
  }
1370
1382
 
1371
1383
  declare class CustomRegister extends AccountLogin implements PageObject {
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", { name: "Technically required", exact: true });
3066
- this.consentDialogStatisticsCheckbox = this.consentDialog.getByRole("checkbox", { name: "Statistics", exact: true });
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.consentDialogSaveButton = this.consentDialog.getByRole("button", { name: "Save", exact: true });
3069
- this.consentDialogAcceptAllCookiesButton = this.consentDialog.getByRole("button", { name: "Accept all cookies", exact: true });
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", { name: "Add to shopping cart" });
3113
+ const productAddToShoppingCart = listingItem.getByRole("button", {
3114
+ name: "Add to shopping cart"
3115
+ });
3083
3116
  return {
3084
3117
  productImage,
3085
3118
  productRating,
@@ -3732,11 +3765,26 @@ var __publicField$z = (obj, key, value) => {
3732
3765
  __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
3733
3766
  return value;
3734
3767
  };
3735
- class SearchSuggest {
3768
+ class SearchSuggest extends Home {
3736
3769
  constructor(page) {
3770
+ super(page);
3737
3771
  this.page = page;
3738
3772
  __publicField$z(this, "searchSuggestLineItemImages");
3773
+ __publicField$z(this, "searchInput");
3774
+ __publicField$z(this, "searchIcon");
3775
+ __publicField$z(this, "searchSuggestNoResult");
3776
+ __publicField$z(this, "searchSuggestLineItemName");
3777
+ __publicField$z(this, "searchSuggestLineItemPrice");
3778
+ __publicField$z(this, "searchSuggestTotalLink");
3779
+ __publicField$z(this, "searchHeadline");
3739
3780
  this.searchSuggestLineItemImages = page.locator(".search-suggest-product-image-container");
3781
+ this.searchInput = page.locator(".header-search-input");
3782
+ this.searchIcon = page.locator(".header-search-icon");
3783
+ this.searchSuggestNoResult = page.locator(".search-suggest-no-result");
3784
+ this.searchSuggestLineItemName = page.locator(".search-suggest-product-name");
3785
+ this.searchSuggestLineItemPrice = page.locator(".col-auto.search-suggest-product-price");
3786
+ this.searchSuggestTotalLink = page.locator(".search-suggest-total-link");
3787
+ this.searchHeadline = page.locator(".search-headline");
3740
3788
  }
3741
3789
  url(searchTerm) {
3742
3790
  return `suggest?search=${searchTerm}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "11.3.1",
3
+ "version": "11.3.3",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",