@shopware-ag/acceptance-test-suite 12.2.3 → 12.4.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 CHANGED
@@ -5706,7 +5706,8 @@ declare class Home implements PageObject {
5706
5706
  readonly productRatingButton: Locator;
5707
5707
  readonly productRatingList: Locator;
5708
5708
  readonly page: Page;
5709
- constructor(page: Page);
5709
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
5710
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
5710
5711
  getRatingItemLocatorByRating(rating: number): Promise<Locator>;
5711
5712
  getFilterItemByFilterName(filterName: string): Promise<Locator>;
5712
5713
  getFilterButtonByFilterName(filterName: string): Promise<Locator>;
@@ -6061,7 +6062,7 @@ declare class SearchSuggest extends Home implements PageObject {
6061
6062
  readonly searchResultTotal: Locator;
6062
6063
  readonly searchHeadline: Locator;
6063
6064
  readonly page: Page;
6064
- constructor(page: Page);
6065
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
6065
6066
  getTotalSearchResultCount(): Promise<number>;
6066
6067
  url(searchTerm?: string): string;
6067
6068
  }
@@ -6173,7 +6174,7 @@ declare class Wishlist extends Home implements PageObject {
6173
6174
  readonly removeAlert: Locator;
6174
6175
  readonly emptyListing: Locator;
6175
6176
  readonly page: Page;
6176
- constructor(page: Page);
6177
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
6177
6178
  getListingItemByProductName(productListingName: string): Promise<Record<string, Locator>>;
6178
6179
  url(): string;
6179
6180
  }
@@ -6298,6 +6299,8 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
6298
6299
  AddNewAddress: Task;
6299
6300
  } & {
6300
6301
  AddProductToCart: Task;
6302
+ } & {
6303
+ CloseTheOffCanvasCart: Task;
6301
6304
  } & {
6302
6305
  ChangeProductQuantity: Task;
6303
6306
  } & {
package/dist/index.d.ts CHANGED
@@ -5706,7 +5706,8 @@ declare class Home implements PageObject {
5706
5706
  readonly productRatingButton: Locator;
5707
5707
  readonly productRatingList: Locator;
5708
5708
  readonly page: Page;
5709
- constructor(page: Page);
5709
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
5710
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
5710
5711
  getRatingItemLocatorByRating(rating: number): Promise<Locator>;
5711
5712
  getFilterItemByFilterName(filterName: string): Promise<Locator>;
5712
5713
  getFilterButtonByFilterName(filterName: string): Promise<Locator>;
@@ -6061,7 +6062,7 @@ declare class SearchSuggest extends Home implements PageObject {
6061
6062
  readonly searchResultTotal: Locator;
6062
6063
  readonly searchHeadline: Locator;
6063
6064
  readonly page: Page;
6064
- constructor(page: Page);
6065
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
6065
6066
  getTotalSearchResultCount(): Promise<number>;
6066
6067
  url(searchTerm?: string): string;
6067
6068
  }
@@ -6173,7 +6174,7 @@ declare class Wishlist extends Home implements PageObject {
6173
6174
  readonly removeAlert: Locator;
6174
6175
  readonly emptyListing: Locator;
6175
6176
  readonly page: Page;
6176
- constructor(page: Page);
6177
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
6177
6178
  getListingItemByProductName(productListingName: string): Promise<Record<string, Locator>>;
6178
6179
  url(): string;
6179
6180
  }
@@ -6298,6 +6299,8 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
6298
6299
  AddNewAddress: Task;
6299
6300
  } & {
6300
6301
  AddProductToCart: Task;
6302
+ } & {
6303
+ CloseTheOffCanvasCart: Task;
6301
6304
  } & {
6302
6305
  ChangeProductQuantity: Task;
6303
6306
  } & {
package/dist/index.mjs CHANGED
@@ -6526,8 +6526,10 @@ class Home {
6526
6526
  productRatingButton;
6527
6527
  productRatingList;
6528
6528
  page;
6529
- constructor(page) {
6529
+ instanceMeta;
6530
+ constructor(page, instanceMeta) {
6530
6531
  this.page = page;
6532
+ this.instanceMeta = instanceMeta;
6531
6533
  this.categoryTitle = page.getByRole("heading", { level: 1 });
6532
6534
  this.accountMenuButton = page.getByLabel(translate("storefront:home:account.yourAccount"));
6533
6535
  this.closeGuestSessionButton = page.locator(".account-aside-btn");
@@ -6545,16 +6547,6 @@ class Home {
6545
6547
  this.consentCookiePermissionContent = page.locator(".cookie-permission-content");
6546
6548
  this.consentDialog = page.getByRole("dialog").filter({ hasText: translate("storefront:home:consent.cookiePreferences") });
6547
6549
  this.consentDialogCloseButton = this.consentDialog.getByRole("button", { name: translate("storefront:home:consent.close") });
6548
- this.consentDialogTechnicallyRequiredCheckbox = this.consentDialog.getByRole("checkbox", {
6549
- name: translate("storefront:home:consent.technicallyRequired"),
6550
- exact: true
6551
- });
6552
- this.consentDialogStatisticsCheckbox = this.consentDialog.getByRole("checkbox", {
6553
- name: translate("storefront:home:consent.statistics"),
6554
- exact: true
6555
- });
6556
- this.consentDialogMarketingdCheckbox = this.consentDialog.getByRole("checkbox", { name: translate("storefront:home:consent.marketing"), exact: true });
6557
- this.consentDialogMarketingCheckbox = this.consentDialog.getByRole("checkbox", { name: translate("storefront:home:consent.marketing"), exact: true });
6558
6550
  this.consentDialogSaveButton = this.consentDialog.getByRole("button", {
6559
6551
  name: translate("storefront:home:consent.save"),
6560
6552
  exact: true
@@ -6563,6 +6555,29 @@ class Home {
6563
6555
  name: translate("storefront:home:consent.acceptAllCookies"),
6564
6556
  exact: true
6565
6557
  });
6558
+ if (satisfies(instanceMeta.version, "<6.7.6.0")) {
6559
+ this.consentDialogTechnicallyRequiredCheckbox = this.consentDialog.getByRole("checkbox", {
6560
+ name: translate("storefront:home:consent.technicallyRequired"),
6561
+ exact: true
6562
+ });
6563
+ this.consentDialogStatisticsCheckbox = this.consentDialog.getByRole("checkbox", {
6564
+ name: translate("storefront:home:consent.statistics"),
6565
+ exact: true
6566
+ });
6567
+ this.consentDialogMarketingdCheckbox = this.consentDialog.getByRole("checkbox", { name: translate("storefront:home:consent.marketing"), exact: true });
6568
+ this.consentDialogMarketingCheckbox = this.consentDialog.getByRole("checkbox", { name: translate("storefront:home:consent.marketing"), exact: true });
6569
+ } else {
6570
+ this.consentDialogTechnicallyRequiredCheckbox = this.consentDialog.getByRole("switch", {
6571
+ name: translate("storefront:home:consent.technicallyRequired"),
6572
+ exact: true
6573
+ });
6574
+ this.consentDialogStatisticsCheckbox = this.consentDialog.getByRole("switch", {
6575
+ name: translate("storefront:home:consent.statistics"),
6576
+ exact: true
6577
+ });
6578
+ this.consentDialogMarketingdCheckbox = this.consentDialog.getByRole("switch", { name: translate("storefront:home:consent.marketing"), exact: true });
6579
+ this.consentDialogMarketingCheckbox = this.consentDialog.getByRole("switch", { name: translate("storefront:home:consent.marketing"), exact: true });
6580
+ }
6566
6581
  this.offcanvasBackdrop = page.locator(".offcanvas-backdrop");
6567
6582
  this.mainNavigationLink = page.locator(".main-navigation-link-text");
6568
6583
  this.contactFormLink = this.page.getByRole("listitem").getByTitle(translate("storefront:contact:link.contactForm"), { exact: true });
@@ -6735,7 +6750,8 @@ let ProductDetail$1 = class ProductDetail {
6735
6750
  constructor(page) {
6736
6751
  this.page = page;
6737
6752
  this.addToCartButton = page.getByRole("button", { name: translate("storefront:product:addToCart") });
6738
- this.quantitySelect = page.getByLabel(translate("storefront:product:quantity"), { exact: true });
6753
+ const form = page.locator(".buy-widget:not(.d-none)");
6754
+ this.quantitySelect = form.getByLabel(translate("storefront:product:quantity"), { exact: true });
6739
6755
  this.productSingleImage = page.locator(".gallery-slider-single-image");
6740
6756
  this.productSinglePrice = page.locator(".product-detail-price");
6741
6757
  this.productPriceRangesRow = page.locator(".product-block-prices-row");
@@ -7444,8 +7460,8 @@ class SearchSuggest extends Home {
7444
7460
  searchResultTotal;
7445
7461
  searchHeadline;
7446
7462
  page;
7447
- constructor(page) {
7448
- super(page);
7463
+ constructor(page, instanceMeta) {
7464
+ super(page, instanceMeta);
7449
7465
  this.page = page;
7450
7466
  this.searchSuggestLineItemImages = page.locator(".search-suggest-product-image-container");
7451
7467
  this.searchInput = page.locator(".header-search-input");
@@ -7611,7 +7627,7 @@ class ContactForm extends Home {
7611
7627
  greCaptchaProtectionInformation;
7612
7628
  instanceMeta;
7613
7629
  constructor(page, instanceMeta) {
7614
- super(page);
7630
+ super(page, instanceMeta);
7615
7631
  this.instanceMeta = instanceMeta;
7616
7632
  this.contactWrapper = this.page.locator(".card").filter({ has: this.page.getByText(translate("storefront:contact:title")) });
7617
7633
  this.formFieldFeedback = this.contactWrapper.locator(".form-field-feedback");
@@ -7652,8 +7668,8 @@ class Wishlist extends Home {
7652
7668
  removeAlert;
7653
7669
  emptyListing;
7654
7670
  page;
7655
- constructor(page) {
7656
- super(page);
7671
+ constructor(page, instanceMeta) {
7672
+ super(page, instanceMeta);
7657
7673
  this.page = page;
7658
7674
  this.wishListHeader = page.locator(".wishlist-headline");
7659
7675
  this.removeAlert = page.locator(".alert-success");
@@ -7753,8 +7769,8 @@ const StorefrontPageObjects = {
7753
7769
  Header
7754
7770
  };
7755
7771
  const test$7 = test$e.extend({
7756
- StorefrontHome: async ({ StorefrontPage }, use) => {
7757
- await use(new Home(StorefrontPage));
7772
+ StorefrontHome: async ({ StorefrontPage, InstanceMeta }, use) => {
7773
+ await use(new Home(StorefrontPage, InstanceMeta));
7758
7774
  },
7759
7775
  StorefrontProductDetail: async ({ StorefrontPage }, use) => {
7760
7776
  await use(new ProductDetail$1(StorefrontPage));
@@ -7804,8 +7820,8 @@ const test$7 = test$e.extend({
7804
7820
  StorefrontSearch: async ({ StorefrontPage }, use) => {
7805
7821
  await use(new Search(StorefrontPage));
7806
7822
  },
7807
- StorefrontSearchSuggest: async ({ StorefrontPage }, use) => {
7808
- await use(new SearchSuggest(StorefrontPage));
7823
+ StorefrontSearchSuggest: async ({ StorefrontPage, InstanceMeta }, use) => {
7824
+ await use(new SearchSuggest(StorefrontPage, InstanceMeta));
7809
7825
  },
7810
7826
  StorefrontCustomRegister: async ({ StorefrontPage }, use) => {
7811
7827
  await use(new CustomRegister(StorefrontPage));
@@ -7819,8 +7835,8 @@ const test$7 = test$e.extend({
7819
7835
  StorefrontContactForm: async ({ StorefrontPage, InstanceMeta }, use) => {
7820
7836
  await use(new ContactForm(StorefrontPage, InstanceMeta));
7821
7837
  },
7822
- StorefrontWishlist: async ({ StorefrontPage }, use) => {
7823
- await use(new Wishlist(StorefrontPage));
7838
+ StorefrontWishlist: async ({ StorefrontPage, InstanceMeta }, use) => {
7839
+ await use(new Wishlist(StorefrontPage, InstanceMeta));
7824
7840
  },
7825
7841
  StorefrontFooter: async ({ StorefrontPage }, use) => {
7826
7842
  await use(new Footer(StorefrontPage));
@@ -11734,6 +11750,21 @@ const ProceedFromProductToCheckout = test$e.extend({
11734
11750
  }
11735
11751
  });
11736
11752
 
11753
+ const CloseTheOffCanvasCart = test$e.extend({
11754
+ CloseTheOffCanvasCart: async ({
11755
+ ShopCustomer,
11756
+ StorefrontOffCanvasCart
11757
+ }, use) => {
11758
+ const task = () => {
11759
+ return async function CloseTheOffCanvasCart2() {
11760
+ await StorefrontOffCanvasCart.continueShoppingButton.scrollIntoViewIfNeeded();
11761
+ await ShopCustomer.presses(StorefrontOffCanvasCart.continueShoppingButton);
11762
+ };
11763
+ };
11764
+ await use(task);
11765
+ }
11766
+ });
11767
+
11737
11768
  const ProceedFromCartToCheckout = test$e.extend({
11738
11769
  ProceedFromCartToCheckout: async ({
11739
11770
  ShopCustomer,
@@ -12031,6 +12062,7 @@ const test$3 = mergeTests(
12031
12062
  ChangeStorefrontCurrency,
12032
12063
  AddNewAddress,
12033
12064
  AddProductToCart,
12065
+ CloseTheOffCanvasCart,
12034
12066
  ChangeProductQuantity,
12035
12067
  ProceedFromProductToCheckout,
12036
12068
  ProceedFromCartToCheckout,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "12.2.3",
3
+ "version": "12.4.0",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",