@shopware-ag/acceptance-test-suite 1.1.4 → 1.3.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/README.md CHANGED
@@ -1,6 +1,21 @@
1
+ [![NPM Version](https://img.shields.io/npm/v/%40shopware-ag%2Facceptance-test-suite)](https://www.npmjs.com/package/@shopware-ag/acceptance-test-suite)
2
+ [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
3
+ [![License](https://img.shields.io/github/license/shopware/acceptance-test-suite.svg)](https://github.com/shopware/acceptance-test-suite/blob/trunk/LICENSE)
4
+
1
5
  # Shopware Acceptance Test Suite
2
6
  This test suite is an extension to [Playwright](https://playwright.dev/) to easily create end-to-end and API acceptance tests for [Shopware](https://github.com/shopware/shopware). It provides several useful Playwright [fixtures](https://playwright.dev/docs/test-fixtures) to start testing with Shopware right away, including page contexts and [page objects](https://playwright.dev/docs/pom) for Storefront and Administration, API clients, test data creation and reusable test logic.
3
7
 
8
+ ## Table of contents
9
+
10
+ * [Installation](#installation)
11
+ * [Configuration](#configuration)
12
+ * [Usage](#usage)
13
+ * [General Fixtures](#general-fixtures)
14
+ * [Page Objects](#page-objects)
15
+ * [Actor Pattern](#actor-pattern)
16
+ * [Data Fixtures](#data-fixtures)
17
+ * [Code Contribution](#code-contribution)
18
+
4
19
  ## Installation
5
20
  Start by creating your own [Playwright](https://playwright.dev/docs/intro) project.
6
21
 
@@ -354,4 +369,9 @@ test('Property group test scenario', async ({ PropertiesData }) => {
354
369
  });
355
370
  ```
356
371
 
357
- If you create your own data fixtures make sure to import and merge them in your base test file with other fixtures you created.
372
+ If you create your own data fixtures make sure to import and merge them in your base test file with other fixtures you created.
373
+
374
+ ## Code Contribution
375
+ You can contribute to this project via its [official repository](https://github.com/shopware/acceptance-test-suite/) on GitHub.
376
+
377
+ This project uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). Please make sure to form your commits accordingly to the spec.
package/dist/index.d.mts CHANGED
@@ -164,6 +164,16 @@ declare class ProductDetail$1 implements PageObject {
164
164
  goTo(productData?: components['schemas']['Product']): Promise<void>;
165
165
  }
166
166
 
167
+ declare class Category implements PageObject {
168
+ readonly page: Page;
169
+ readonly categoryData: components['schemas']['Category'];
170
+ readonly sortingSelect: Locator;
171
+ readonly firstProductBuyButton: Locator;
172
+ readonly noProductsFoundAlert: Locator;
173
+ constructor(page: Page, CategoryData: components['schemas']['Category']);
174
+ goTo(): Promise<void>;
175
+ }
176
+
167
177
  declare class CheckoutCart implements PageObject {
168
178
  readonly page: Page;
169
179
  readonly headline: Locator;
@@ -228,6 +238,11 @@ declare class Account implements PageObject {
228
238
  readonly page: Page;
229
239
  readonly headline: Locator;
230
240
  readonly personalDataCardTitle: Locator;
241
+ readonly paymentMethodCardTitle: Locator;
242
+ readonly billingAddressCardTitle: Locator;
243
+ readonly shippingAddressCardTitle: Locator;
244
+ readonly newsletterCheckbox: Locator;
245
+ readonly newsletterRegistrationSuccessMessage: Locator;
231
246
  constructor(page: Page);
232
247
  goTo(): Promise<void>;
233
248
  }
@@ -253,6 +268,26 @@ declare class AccountLogin implements PageObject {
253
268
  goTo(): Promise<void>;
254
269
  }
255
270
 
271
+ declare class AccountProfile implements PageObject {
272
+ readonly page: Page;
273
+ readonly salutationSelect: Locator;
274
+ readonly firstNameInput: Locator;
275
+ readonly lastNameInput: Locator;
276
+ readonly saveProfileButton: Locator;
277
+ readonly changeEmailButton: Locator;
278
+ readonly emailAddressInput: Locator;
279
+ readonly emailAddressConfirmInput: Locator;
280
+ readonly emailConfirmPasswordInput: Locator;
281
+ readonly saveEmailAddressButton: Locator;
282
+ readonly changePasswordButton: Locator;
283
+ readonly newPasswordInput: Locator;
284
+ readonly newPasswordConfirmInput: Locator;
285
+ readonly currentPasswordInput: Locator;
286
+ readonly saveNewPasswordButton: Locator;
287
+ constructor(page: Page);
288
+ goTo(): Promise<void>;
289
+ }
290
+
256
291
  declare class AccountOrder implements PageObject {
257
292
  readonly page: Page;
258
293
  readonly cartLineItemImages: Locator;
@@ -262,6 +297,27 @@ declare class AccountOrder implements PageObject {
262
297
  goTo(): Promise<void>;
263
298
  }
264
299
 
300
+ declare class AccountAddresses implements PageObject {
301
+ readonly page: Page;
302
+ readonly addNewAddressButton: Locator;
303
+ readonly editBillingAddressButton: Locator;
304
+ readonly editShippingAddressButton: Locator;
305
+ readonly useDefaultBillingAddressButton: Locator;
306
+ readonly useDefaultShippingAddressButton: Locator;
307
+ constructor(page: Page);
308
+ goTo(): Promise<void>;
309
+ }
310
+
311
+ declare class AccountPayment implements PageObject {
312
+ readonly page: Page;
313
+ readonly cashOnDeliveryOption: Locator;
314
+ readonly paidInAdvanceOption: Locator;
315
+ readonly invoiceOption: Locator;
316
+ readonly changeDefaultPaymentButton: Locator;
317
+ constructor(page: Page);
318
+ goTo(): Promise<void>;
319
+ }
320
+
265
321
  declare class Search implements PageObject {
266
322
  readonly page: Page;
267
323
  readonly productImages: Locator;
@@ -279,26 +335,34 @@ declare class SearchSuggest implements PageObject {
279
335
  interface StorefrontPageTypes {
280
336
  StorefrontHome: Home;
281
337
  StorefrontProductDetail: ProductDetail$1;
338
+ StorefrontCategory: Category;
282
339
  StorefrontCheckoutCart: CheckoutCart;
283
340
  StorefrontCheckoutConfirm: CheckoutConfirm;
284
341
  StorefrontCheckoutFinish: CheckoutFinish;
285
342
  StorefrontCheckoutRegister: CheckoutRegister;
286
343
  StorefrontAccount: Account;
287
344
  StorefrontAccountLogin: AccountLogin;
345
+ StorefrontAccountProfile: AccountProfile;
288
346
  StorefrontAccountOrder: AccountOrder;
347
+ StorefrontAccountAddresses: AccountAddresses;
348
+ StorefrontAccountPayment: AccountPayment;
289
349
  StorefrontSearch: Search;
290
350
  StorefrontSearchSuggest: SearchSuggest;
291
351
  }
292
352
  declare const StorefrontPageObjects: {
293
353
  Home: typeof Home;
294
354
  ProductDetail: typeof ProductDetail$1;
355
+ Category: typeof Category;
295
356
  CheckoutCart: typeof CheckoutCart;
296
357
  CheckoutConfirm: typeof CheckoutConfirm;
297
358
  CheckoutFinish: typeof CheckoutFinish;
298
359
  CheckoutRegister: typeof CheckoutRegister;
299
360
  Account: typeof Account;
300
361
  AccountLogin: typeof AccountLogin;
362
+ AccountProfile: typeof AccountProfile;
301
363
  AccountOrder: typeof AccountOrder;
364
+ AccountAddresses: typeof AccountAddresses;
365
+ AccountPayment: typeof AccountPayment;
302
366
  Search: typeof Search;
303
367
  SearchSuggest: typeof SearchSuggest;
304
368
  };
@@ -452,6 +516,7 @@ declare const AdminPageObjects: {
452
516
 
453
517
  interface DataFixtureTypes {
454
518
  ProductData: components['schemas']['Product'];
519
+ CategoryData: components['schemas']['Category'];
455
520
  DigitalProductData: {
456
521
  product: components['schemas']['Product'];
457
522
  fileContent: string;
@@ -525,6 +590,8 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
525
590
  OpenSearchResultPage: Task;
526
591
  } & {
527
592
  OpenSearchSuggestPage: Task;
593
+ } & {
594
+ ValidateAccessibility: (pageName: string, assertViolations?: boolean | undefined, createReport?: boolean | undefined, ruleTags?: string[] | undefined, outputDir?: string | undefined) => () => Promise<void>;
528
595
  }, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & HelperFixtureTypes & FixtureTypes>;
529
596
 
530
597
  export { AdminPageObjects, type FixtureTypes, type PageObject, StorefrontPageObjects, type Task, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, test };
package/dist/index.d.ts CHANGED
@@ -164,6 +164,16 @@ declare class ProductDetail$1 implements PageObject {
164
164
  goTo(productData?: components['schemas']['Product']): Promise<void>;
165
165
  }
166
166
 
167
+ declare class Category implements PageObject {
168
+ readonly page: Page;
169
+ readonly categoryData: components['schemas']['Category'];
170
+ readonly sortingSelect: Locator;
171
+ readonly firstProductBuyButton: Locator;
172
+ readonly noProductsFoundAlert: Locator;
173
+ constructor(page: Page, CategoryData: components['schemas']['Category']);
174
+ goTo(): Promise<void>;
175
+ }
176
+
167
177
  declare class CheckoutCart implements PageObject {
168
178
  readonly page: Page;
169
179
  readonly headline: Locator;
@@ -228,6 +238,11 @@ declare class Account implements PageObject {
228
238
  readonly page: Page;
229
239
  readonly headline: Locator;
230
240
  readonly personalDataCardTitle: Locator;
241
+ readonly paymentMethodCardTitle: Locator;
242
+ readonly billingAddressCardTitle: Locator;
243
+ readonly shippingAddressCardTitle: Locator;
244
+ readonly newsletterCheckbox: Locator;
245
+ readonly newsletterRegistrationSuccessMessage: Locator;
231
246
  constructor(page: Page);
232
247
  goTo(): Promise<void>;
233
248
  }
@@ -253,6 +268,26 @@ declare class AccountLogin implements PageObject {
253
268
  goTo(): Promise<void>;
254
269
  }
255
270
 
271
+ declare class AccountProfile implements PageObject {
272
+ readonly page: Page;
273
+ readonly salutationSelect: Locator;
274
+ readonly firstNameInput: Locator;
275
+ readonly lastNameInput: Locator;
276
+ readonly saveProfileButton: Locator;
277
+ readonly changeEmailButton: Locator;
278
+ readonly emailAddressInput: Locator;
279
+ readonly emailAddressConfirmInput: Locator;
280
+ readonly emailConfirmPasswordInput: Locator;
281
+ readonly saveEmailAddressButton: Locator;
282
+ readonly changePasswordButton: Locator;
283
+ readonly newPasswordInput: Locator;
284
+ readonly newPasswordConfirmInput: Locator;
285
+ readonly currentPasswordInput: Locator;
286
+ readonly saveNewPasswordButton: Locator;
287
+ constructor(page: Page);
288
+ goTo(): Promise<void>;
289
+ }
290
+
256
291
  declare class AccountOrder implements PageObject {
257
292
  readonly page: Page;
258
293
  readonly cartLineItemImages: Locator;
@@ -262,6 +297,27 @@ declare class AccountOrder implements PageObject {
262
297
  goTo(): Promise<void>;
263
298
  }
264
299
 
300
+ declare class AccountAddresses implements PageObject {
301
+ readonly page: Page;
302
+ readonly addNewAddressButton: Locator;
303
+ readonly editBillingAddressButton: Locator;
304
+ readonly editShippingAddressButton: Locator;
305
+ readonly useDefaultBillingAddressButton: Locator;
306
+ readonly useDefaultShippingAddressButton: Locator;
307
+ constructor(page: Page);
308
+ goTo(): Promise<void>;
309
+ }
310
+
311
+ declare class AccountPayment implements PageObject {
312
+ readonly page: Page;
313
+ readonly cashOnDeliveryOption: Locator;
314
+ readonly paidInAdvanceOption: Locator;
315
+ readonly invoiceOption: Locator;
316
+ readonly changeDefaultPaymentButton: Locator;
317
+ constructor(page: Page);
318
+ goTo(): Promise<void>;
319
+ }
320
+
265
321
  declare class Search implements PageObject {
266
322
  readonly page: Page;
267
323
  readonly productImages: Locator;
@@ -279,26 +335,34 @@ declare class SearchSuggest implements PageObject {
279
335
  interface StorefrontPageTypes {
280
336
  StorefrontHome: Home;
281
337
  StorefrontProductDetail: ProductDetail$1;
338
+ StorefrontCategory: Category;
282
339
  StorefrontCheckoutCart: CheckoutCart;
283
340
  StorefrontCheckoutConfirm: CheckoutConfirm;
284
341
  StorefrontCheckoutFinish: CheckoutFinish;
285
342
  StorefrontCheckoutRegister: CheckoutRegister;
286
343
  StorefrontAccount: Account;
287
344
  StorefrontAccountLogin: AccountLogin;
345
+ StorefrontAccountProfile: AccountProfile;
288
346
  StorefrontAccountOrder: AccountOrder;
347
+ StorefrontAccountAddresses: AccountAddresses;
348
+ StorefrontAccountPayment: AccountPayment;
289
349
  StorefrontSearch: Search;
290
350
  StorefrontSearchSuggest: SearchSuggest;
291
351
  }
292
352
  declare const StorefrontPageObjects: {
293
353
  Home: typeof Home;
294
354
  ProductDetail: typeof ProductDetail$1;
355
+ Category: typeof Category;
295
356
  CheckoutCart: typeof CheckoutCart;
296
357
  CheckoutConfirm: typeof CheckoutConfirm;
297
358
  CheckoutFinish: typeof CheckoutFinish;
298
359
  CheckoutRegister: typeof CheckoutRegister;
299
360
  Account: typeof Account;
300
361
  AccountLogin: typeof AccountLogin;
362
+ AccountProfile: typeof AccountProfile;
301
363
  AccountOrder: typeof AccountOrder;
364
+ AccountAddresses: typeof AccountAddresses;
365
+ AccountPayment: typeof AccountPayment;
302
366
  Search: typeof Search;
303
367
  SearchSuggest: typeof SearchSuggest;
304
368
  };
@@ -452,6 +516,7 @@ declare const AdminPageObjects: {
452
516
 
453
517
  interface DataFixtureTypes {
454
518
  ProductData: components['schemas']['Product'];
519
+ CategoryData: components['schemas']['Category'];
455
520
  DigitalProductData: {
456
521
  product: components['schemas']['Product'];
457
522
  fileContent: string;
@@ -525,6 +590,8 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
525
590
  OpenSearchResultPage: Task;
526
591
  } & {
527
592
  OpenSearchSuggestPage: Task;
593
+ } & {
594
+ ValidateAccessibility: (pageName: string, assertViolations?: boolean | undefined, createReport?: boolean | undefined, ruleTags?: string[] | undefined, outputDir?: string | undefined) => () => Promise<void>;
528
595
  }, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & HelperFixtureTypes & FixtureTypes>;
529
596
 
530
597
  export { AdminPageObjects, type FixtureTypes, type PageObject, StorefrontPageObjects, type Task, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, test };
package/dist/index.mjs CHANGED
@@ -4,6 +4,8 @@ import crypto, { createHash } from 'crypto';
4
4
  import { stringify } from 'uuid';
5
5
  import { Image } from 'image-js';
6
6
  import fs from 'fs';
7
+ import { AxeBuilder } from '@axe-core/playwright';
8
+ import { createHtmlReport } from 'axe-html-reporter';
7
9
 
8
10
  const getLanguageData = async (languageCode, adminApiContext) => {
9
11
  const resp = await adminApiContext.post("search/language", {
@@ -413,16 +415,16 @@ const test$a = test$c.extend({
413
415
  ]
414
416
  });
415
417
 
416
- var __defProp$k = Object.defineProperty;
417
- var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
418
- var __publicField$k = (obj, key, value) => {
419
- __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
418
+ var __defProp$o = Object.defineProperty;
419
+ var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
420
+ var __publicField$o = (obj, key, value) => {
421
+ __defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
420
422
  return value;
421
423
  };
422
424
  const _AdminApiContext = class _AdminApiContext {
423
425
  constructor(context, options) {
424
- __publicField$k(this, "context");
425
- __publicField$k(this, "options");
426
+ __publicField$o(this, "context");
427
+ __publicField$o(this, "options");
426
428
  this.context = context;
427
429
  this.options = options;
428
430
  }
@@ -514,7 +516,7 @@ const _AdminApiContext = class _AdminApiContext {
514
516
  return this.context.head(url, options);
515
517
  }
516
518
  };
517
- __publicField$k(_AdminApiContext, "defaultOptions", {
519
+ __publicField$o(_AdminApiContext, "defaultOptions", {
518
520
  app_url: process.env["APP_URL"],
519
521
  client_id: process.env["SHOPWARE_ACCESS_KEY_ID"],
520
522
  client_secret: process.env["SHOPWARE_SECRET_ACCESS_KEY"],
@@ -524,16 +526,16 @@ __publicField$k(_AdminApiContext, "defaultOptions", {
524
526
  });
525
527
  let AdminApiContext = _AdminApiContext;
526
528
 
527
- var __defProp$j = Object.defineProperty;
528
- var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
529
- var __publicField$j = (obj, key, value) => {
530
- __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
529
+ var __defProp$n = Object.defineProperty;
530
+ var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
531
+ var __publicField$n = (obj, key, value) => {
532
+ __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
531
533
  return value;
532
534
  };
533
535
  const _StoreApiContext = class _StoreApiContext {
534
536
  constructor(context, options) {
535
- __publicField$j(this, "context");
536
- __publicField$j(this, "options");
537
+ __publicField$n(this, "context");
538
+ __publicField$n(this, "options");
537
539
  this.context = context;
538
540
  this.options = options;
539
541
  }
@@ -592,7 +594,7 @@ const _StoreApiContext = class _StoreApiContext {
592
594
  return this.context.head(url, options);
593
595
  }
594
596
  };
595
- __publicField$j(_StoreApiContext, "defaultOptions", {
597
+ __publicField$n(_StoreApiContext, "defaultOptions", {
596
598
  app_url: process.env["APP_URL"],
597
599
  ignoreHTTPSErrors: true
598
600
  });
@@ -684,17 +686,17 @@ const test$8 = test$c.extend({
684
686
  }
685
687
  });
686
688
 
687
- var __defProp$i = Object.defineProperty;
688
- var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
689
- var __publicField$i = (obj, key, value) => {
690
- __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
689
+ var __defProp$m = Object.defineProperty;
690
+ var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
691
+ var __publicField$m = (obj, key, value) => {
692
+ __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
691
693
  return value;
692
694
  };
693
695
  class Actor {
694
696
  constructor(name, page) {
695
- __publicField$i(this, "page");
696
- __publicField$i(this, "name");
697
- __publicField$i(this, "expects", expect);
697
+ __publicField$m(this, "page");
698
+ __publicField$m(this, "name");
699
+ __publicField$m(this, "expects", expect);
698
700
  this.name = name;
699
701
  this.page = page;
700
702
  }
@@ -734,16 +736,16 @@ const test$7 = test$c.extend({
734
736
  }
735
737
  });
736
738
 
737
- var __defProp$h = Object.defineProperty;
738
- var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
739
- var __publicField$h = (obj, key, value) => {
740
- __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
739
+ var __defProp$l = Object.defineProperty;
740
+ var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
741
+ var __publicField$l = (obj, key, value) => {
742
+ __defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
741
743
  return value;
742
744
  };
743
745
  class IdProvider {
744
746
  constructor(workerIndex, seed) {
745
- __publicField$h(this, "workerIndex");
746
- __publicField$h(this, "seed");
747
+ __publicField$l(this, "workerIndex");
748
+ __publicField$l(this, "seed");
747
749
  this.workerIndex = workerIndex;
748
750
  this.seed = seed;
749
751
  }
@@ -783,16 +785,16 @@ const test$6 = test$c.extend({
783
785
  ]
784
786
  });
785
787
 
786
- var __defProp$g = Object.defineProperty;
787
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
788
- var __publicField$g = (obj, key, value) => {
789
- __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
788
+ var __defProp$k = Object.defineProperty;
789
+ var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
790
+ var __publicField$k = (obj, key, value) => {
791
+ __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
790
792
  return value;
791
793
  };
792
794
  class Home {
793
795
  constructor(page) {
794
796
  this.page = page;
795
- __publicField$g(this, "productImages");
797
+ __publicField$k(this, "productImages");
796
798
  this.productImages = page.locator(".product-image-link");
797
799
  }
798
800
  async goTo() {
@@ -800,25 +802,25 @@ class Home {
800
802
  }
801
803
  }
802
804
 
803
- var __defProp$f = Object.defineProperty;
804
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
805
- var __publicField$f = (obj, key, value) => {
806
- __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
805
+ var __defProp$j = Object.defineProperty;
806
+ var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
807
+ var __publicField$j = (obj, key, value) => {
808
+ __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
807
809
  return value;
808
810
  };
809
811
  let ProductDetail$1 = class ProductDetail {
810
812
  constructor(page, productData) {
811
813
  this.page = page;
812
814
  this.productData = productData;
813
- __publicField$f(this, "addToCartButton");
814
- __publicField$f(this, "offCanvasCartTitle");
815
- __publicField$f(this, "offCanvasCart");
816
- __publicField$f(this, "offCanvasCartGoToCheckoutButton");
817
- __publicField$f(this, "productSingleImage");
818
- __publicField$f(this, "offCanvasLineItemImages");
819
- __publicField$f(this, "quantitySelect");
820
- __publicField$f(this, "offCanvasSummaryTotalPrice");
821
- __publicField$f(this, "offCanvas");
815
+ __publicField$j(this, "addToCartButton");
816
+ __publicField$j(this, "offCanvasCartTitle");
817
+ __publicField$j(this, "offCanvasCart");
818
+ __publicField$j(this, "offCanvasCartGoToCheckoutButton");
819
+ __publicField$j(this, "productSingleImage");
820
+ __publicField$j(this, "offCanvasLineItemImages");
821
+ __publicField$j(this, "quantitySelect");
822
+ __publicField$j(this, "offCanvasSummaryTotalPrice");
823
+ __publicField$j(this, "offCanvas");
822
824
  this.addToCartButton = page.getByRole("button", { name: "Add to shopping cart" });
823
825
  this.offCanvasCartTitle = page.getByText("Shopping cart", { exact: true });
824
826
  this.offCanvasCart = page.getByRole("dialog");
@@ -839,23 +841,47 @@ let ProductDetail$1 = class ProductDetail {
839
841
  }
840
842
  };
841
843
 
842
- var __defProp$e = Object.defineProperty;
843
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
844
- var __publicField$e = (obj, key, value) => {
845
- __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
844
+ var __defProp$i = Object.defineProperty;
845
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
846
+ var __publicField$i = (obj, key, value) => {
847
+ __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
848
+ return value;
849
+ };
850
+ class Category {
851
+ constructor(page, CategoryData) {
852
+ this.page = page;
853
+ __publicField$i(this, "categoryData");
854
+ __publicField$i(this, "sortingSelect");
855
+ __publicField$i(this, "firstProductBuyButton");
856
+ __publicField$i(this, "noProductsFoundAlert");
857
+ this.categoryData = CategoryData;
858
+ this.sortingSelect = page.getByLabel("Sorting");
859
+ this.firstProductBuyButton = page.getByRole("button", { name: "Add to shopping cart" }).first();
860
+ this.noProductsFoundAlert = page.getByText("No products found.");
861
+ }
862
+ async goTo() {
863
+ const url = `${this.categoryData.name}`;
864
+ await this.page.goto(url);
865
+ }
866
+ }
867
+
868
+ var __defProp$h = Object.defineProperty;
869
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
870
+ var __publicField$h = (obj, key, value) => {
871
+ __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
846
872
  return value;
847
873
  };
848
874
  class CheckoutCart {
849
875
  constructor(page) {
850
876
  this.page = page;
851
- __publicField$e(this, "headline");
852
- __publicField$e(this, "goToCheckoutButton");
853
- __publicField$e(this, "enterDiscountInput");
854
- __publicField$e(this, "grandTotalPrice");
855
- __publicField$e(this, "emptyCartAlert");
856
- __publicField$e(this, "stockReachedAlert");
857
- __publicField$e(this, "cartLineItemImages");
858
- __publicField$e(this, "unitPriceInfo");
877
+ __publicField$h(this, "headline");
878
+ __publicField$h(this, "goToCheckoutButton");
879
+ __publicField$h(this, "enterDiscountInput");
880
+ __publicField$h(this, "grandTotalPrice");
881
+ __publicField$h(this, "emptyCartAlert");
882
+ __publicField$h(this, "stockReachedAlert");
883
+ __publicField$h(this, "cartLineItemImages");
884
+ __publicField$h(this, "unitPriceInfo");
859
885
  this.headline = page.getByRole("heading", { name: "Shopping cart" });
860
886
  this.goToCheckoutButton = page.getByRole("link", { name: "Go to checkout" });
861
887
  this.enterDiscountInput = page.getByLabel("Discount code");
@@ -870,35 +896,35 @@ class CheckoutCart {
870
896
  }
871
897
  }
872
898
 
873
- var __defProp$d = Object.defineProperty;
874
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
875
- var __publicField$d = (obj, key, value) => {
876
- __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
899
+ var __defProp$g = Object.defineProperty;
900
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
901
+ var __publicField$g = (obj, key, value) => {
902
+ __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
877
903
  return value;
878
904
  };
879
905
  class CheckoutConfirm {
880
906
  constructor(page) {
881
907
  this.page = page;
882
- __publicField$d(this, "headline");
883
- __publicField$d(this, "termsAndConditionsCheckbox");
884
- __publicField$d(this, "immediateAccessToDigitalProductCheckbox");
885
- __publicField$d(this, "grandTotalPrice");
886
- __publicField$d(this, "submitOrderButton");
908
+ __publicField$g(this, "headline");
909
+ __publicField$g(this, "termsAndConditionsCheckbox");
910
+ __publicField$g(this, "immediateAccessToDigitalProductCheckbox");
911
+ __publicField$g(this, "grandTotalPrice");
912
+ __publicField$g(this, "submitOrderButton");
887
913
  /**
888
914
  * Payment options
889
915
  */
890
- __publicField$d(this, "paymentCashOnDelivery");
891
- __publicField$d(this, "paymentPaidInAdvance");
892
- __publicField$d(this, "paymentInvoice");
916
+ __publicField$g(this, "paymentCashOnDelivery");
917
+ __publicField$g(this, "paymentPaidInAdvance");
918
+ __publicField$g(this, "paymentInvoice");
893
919
  /**
894
920
  * Shipping options
895
921
  */
896
- __publicField$d(this, "shippingStandard");
897
- __publicField$d(this, "shippingExpress");
922
+ __publicField$g(this, "shippingStandard");
923
+ __publicField$g(this, "shippingExpress");
898
924
  /**
899
925
  * Product details
900
926
  */
901
- __publicField$d(this, "cartLineItemImages");
927
+ __publicField$g(this, "cartLineItemImages");
902
928
  this.headline = page.getByRole("heading", { name: "Complete order" });
903
929
  this.termsAndConditionsCheckbox = page.getByLabel("I have read and accepted the general terms and conditions.");
904
930
  this.immediateAccessToDigitalProductCheckbox = page.getByLabel("I want immediate access to the digital content and I acknowledge that thereby I waive my right to cancel.");
@@ -916,20 +942,20 @@ class CheckoutConfirm {
916
942
  }
917
943
  }
918
944
 
919
- var __defProp$c = Object.defineProperty;
920
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
921
- var __publicField$c = (obj, key, value) => {
922
- __defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
945
+ var __defProp$f = Object.defineProperty;
946
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
947
+ var __publicField$f = (obj, key, value) => {
948
+ __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
923
949
  return value;
924
950
  };
925
951
  class CheckoutFinish {
926
952
  constructor(page) {
927
953
  this.page = page;
928
- __publicField$c(this, "headline");
929
- __publicField$c(this, "orderNumberText");
930
- __publicField$c(this, "grandTotalPrice");
931
- __publicField$c(this, "cartLineItemImages");
932
- __publicField$c(this, "orderNumberRegex", /Your order number: #(\d+)/);
954
+ __publicField$f(this, "headline");
955
+ __publicField$f(this, "orderNumberText");
956
+ __publicField$f(this, "grandTotalPrice");
957
+ __publicField$f(this, "cartLineItemImages");
958
+ __publicField$f(this, "orderNumberRegex", /Your order number: #(\d+)/);
933
959
  this.headline = page.getByRole("heading", { name: "Thank you for your order" });
934
960
  this.orderNumberText = page.getByText(this.orderNumberRegex);
935
961
  this.grandTotalPrice = page.locator('dt:has-text("Grand total") + dd');
@@ -957,16 +983,16 @@ class CheckoutFinish {
957
983
  }
958
984
  }
959
985
 
960
- var __defProp$b = Object.defineProperty;
961
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
962
- var __publicField$b = (obj, key, value) => {
963
- __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
986
+ var __defProp$e = Object.defineProperty;
987
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
988
+ var __publicField$e = (obj, key, value) => {
989
+ __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
964
990
  return value;
965
991
  };
966
992
  class CheckoutRegister {
967
993
  constructor(page) {
968
994
  this.page = page;
969
- __publicField$b(this, "cartLineItemImages");
995
+ __publicField$e(this, "cartLineItemImages");
970
996
  this.cartLineItemImages = page.locator(".line-item-img-link");
971
997
  }
972
998
  async goTo() {
@@ -974,50 +1000,60 @@ class CheckoutRegister {
974
1000
  }
975
1001
  }
976
1002
 
977
- var __defProp$a = Object.defineProperty;
978
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
979
- var __publicField$a = (obj, key, value) => {
980
- __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
1003
+ var __defProp$d = Object.defineProperty;
1004
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1005
+ var __publicField$d = (obj, key, value) => {
1006
+ __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
981
1007
  return value;
982
1008
  };
983
1009
  class Account {
984
1010
  constructor(page) {
985
1011
  this.page = page;
986
- __publicField$a(this, "headline");
987
- __publicField$a(this, "personalDataCardTitle");
1012
+ __publicField$d(this, "headline");
1013
+ __publicField$d(this, "personalDataCardTitle");
1014
+ __publicField$d(this, "paymentMethodCardTitle");
1015
+ __publicField$d(this, "billingAddressCardTitle");
1016
+ __publicField$d(this, "shippingAddressCardTitle");
1017
+ __publicField$d(this, "newsletterCheckbox");
1018
+ __publicField$d(this, "newsletterRegistrationSuccessMessage");
988
1019
  this.headline = page.getByRole("heading", { name: "Overview" });
989
1020
  this.personalDataCardTitle = page.getByRole("heading", { name: "Personal data" });
1021
+ this.paymentMethodCardTitle = page.getByRole("heading", { name: "Default payment method" });
1022
+ this.billingAddressCardTitle = page.getByRole("heading", { name: "Default billing address" });
1023
+ this.shippingAddressCardTitle = page.getByRole("heading", { name: "Default shipping address" });
1024
+ this.newsletterCheckbox = page.getByLabel("Yes, I would like to");
1025
+ this.newsletterRegistrationSuccessMessage = page.getByText("You have successfully subscribed to the newsletter.");
990
1026
  }
991
1027
  async goTo() {
992
1028
  await this.page.goto("account");
993
1029
  }
994
1030
  }
995
1031
 
996
- var __defProp$9 = Object.defineProperty;
997
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
998
- var __publicField$9 = (obj, key, value) => {
999
- __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
1032
+ var __defProp$c = Object.defineProperty;
1033
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1034
+ var __publicField$c = (obj, key, value) => {
1035
+ __defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
1000
1036
  return value;
1001
1037
  };
1002
1038
  class AccountLogin {
1003
1039
  constructor(page) {
1004
1040
  this.page = page;
1005
- __publicField$9(this, "emailInput");
1006
- __publicField$9(this, "passwordInput");
1007
- __publicField$9(this, "loginButton");
1008
- __publicField$9(this, "logoutLink");
1009
- __publicField$9(this, "successAlert");
1041
+ __publicField$c(this, "emailInput");
1042
+ __publicField$c(this, "passwordInput");
1043
+ __publicField$c(this, "loginButton");
1044
+ __publicField$c(this, "logoutLink");
1045
+ __publicField$c(this, "successAlert");
1010
1046
  // Inputs for registration
1011
- __publicField$9(this, "personalFormArea");
1012
- __publicField$9(this, "billingAddressFormArea");
1013
- __publicField$9(this, "firstNameInput");
1014
- __publicField$9(this, "lastNameInput");
1015
- __publicField$9(this, "registerEmailInput");
1016
- __publicField$9(this, "registerPasswordInput");
1017
- __publicField$9(this, "streetAddressInput");
1018
- __publicField$9(this, "cityInput");
1019
- __publicField$9(this, "countryInput");
1020
- __publicField$9(this, "registerButton");
1047
+ __publicField$c(this, "personalFormArea");
1048
+ __publicField$c(this, "billingAddressFormArea");
1049
+ __publicField$c(this, "firstNameInput");
1050
+ __publicField$c(this, "lastNameInput");
1051
+ __publicField$c(this, "registerEmailInput");
1052
+ __publicField$c(this, "registerPasswordInput");
1053
+ __publicField$c(this, "streetAddressInput");
1054
+ __publicField$c(this, "cityInput");
1055
+ __publicField$c(this, "countryInput");
1056
+ __publicField$c(this, "registerButton");
1021
1057
  this.emailInput = page.getByLabel("Your email address");
1022
1058
  this.passwordInput = page.getByLabel("Your password");
1023
1059
  this.loginButton = page.getByRole("button", { name: "Log in" });
@@ -1040,18 +1076,61 @@ class AccountLogin {
1040
1076
  }
1041
1077
  }
1042
1078
 
1043
- var __defProp$8 = Object.defineProperty;
1044
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1045
- var __publicField$8 = (obj, key, value) => {
1046
- __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
1079
+ var __defProp$b = Object.defineProperty;
1080
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1081
+ var __publicField$b = (obj, key, value) => {
1082
+ __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
1083
+ return value;
1084
+ };
1085
+ class AccountProfile {
1086
+ constructor(page) {
1087
+ this.page = page;
1088
+ __publicField$b(this, "salutationSelect");
1089
+ __publicField$b(this, "firstNameInput");
1090
+ __publicField$b(this, "lastNameInput");
1091
+ __publicField$b(this, "saveProfileButton");
1092
+ __publicField$b(this, "changeEmailButton");
1093
+ __publicField$b(this, "emailAddressInput");
1094
+ __publicField$b(this, "emailAddressConfirmInput");
1095
+ __publicField$b(this, "emailConfirmPasswordInput");
1096
+ __publicField$b(this, "saveEmailAddressButton");
1097
+ __publicField$b(this, "changePasswordButton");
1098
+ __publicField$b(this, "newPasswordInput");
1099
+ __publicField$b(this, "newPasswordConfirmInput");
1100
+ __publicField$b(this, "currentPasswordInput");
1101
+ __publicField$b(this, "saveNewPasswordButton");
1102
+ this.salutationSelect = page.getByLabel("Salutation");
1103
+ this.firstNameInput = page.getByPlaceholder("Enter first name...");
1104
+ this.lastNameInput = page.getByPlaceholder("Enter last name...");
1105
+ this.saveProfileButton = page.locator("#profilePersonalForm").getByRole("button", { name: "Save changes" });
1106
+ this.changeEmailButton = page.getByRole("button", { name: "Change email address" });
1107
+ this.emailAddressInput = page.getByPlaceholder("Enter email address...");
1108
+ this.emailAddressConfirmInput = page.getByPlaceholder("Enter your email address once again...");
1109
+ this.emailConfirmPasswordInput = page.getByPlaceholder("Enter password...");
1110
+ this.saveEmailAddressButton = page.locator("#profileMailForm").getByRole("button", { name: "Save changes" });
1111
+ this.changePasswordButton = page.getByRole("button", { name: "Change password" });
1112
+ this.newPasswordInput = page.getByPlaceholder("Enter new password...");
1113
+ this.newPasswordConfirmInput = page.getByPlaceholder("Enter your new password once again...");
1114
+ this.currentPasswordInput = page.getByPlaceholder("Enter current password...");
1115
+ this.saveNewPasswordButton = page.locator("#profilePasswordForm").getByRole("button", { name: "Save changes" });
1116
+ }
1117
+ async goTo() {
1118
+ await this.page.goto("account/profile");
1119
+ }
1120
+ }
1121
+
1122
+ var __defProp$a = Object.defineProperty;
1123
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1124
+ var __publicField$a = (obj, key, value) => {
1125
+ __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
1047
1126
  return value;
1048
1127
  };
1049
1128
  class AccountOrder {
1050
1129
  constructor(page) {
1051
1130
  this.page = page;
1052
- __publicField$8(this, "cartLineItemImages");
1053
- __publicField$8(this, "orderExpandButton");
1054
- __publicField$8(this, "digitalProductDownloadButton");
1131
+ __publicField$a(this, "cartLineItemImages");
1132
+ __publicField$a(this, "orderExpandButton");
1133
+ __publicField$a(this, "digitalProductDownloadButton");
1055
1134
  this.orderExpandButton = page.getByRole("button", { name: "Expand" }).first();
1056
1135
  this.cartLineItemImages = page.locator(".line-item-img-link");
1057
1136
  this.digitalProductDownloadButton = page.getByRole("link", { name: "Download" }).first();
@@ -1061,6 +1140,54 @@ class AccountOrder {
1061
1140
  }
1062
1141
  }
1063
1142
 
1143
+ var __defProp$9 = Object.defineProperty;
1144
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1145
+ var __publicField$9 = (obj, key, value) => {
1146
+ __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
1147
+ return value;
1148
+ };
1149
+ class AccountAddresses {
1150
+ constructor(page) {
1151
+ this.page = page;
1152
+ __publicField$9(this, "addNewAddressButton");
1153
+ __publicField$9(this, "editBillingAddressButton");
1154
+ __publicField$9(this, "editShippingAddressButton");
1155
+ __publicField$9(this, "useDefaultBillingAddressButton");
1156
+ __publicField$9(this, "useDefaultShippingAddressButton");
1157
+ this.addNewAddressButton = page.getByRole("link", { name: "Add new address" });
1158
+ this.editBillingAddressButton = page.getByRole("link", { name: "Edit address" }).first();
1159
+ this.editShippingAddressButton = page.getByRole("link", { name: "Edit address" }).nth(1);
1160
+ this.useDefaultBillingAddressButton = page.getByRole("button", { name: "Use as default billing address" });
1161
+ this.useDefaultShippingAddressButton = page.getByRole("button", { name: "Use as default shipping address" });
1162
+ }
1163
+ async goTo() {
1164
+ await this.page.goto("account/address");
1165
+ }
1166
+ }
1167
+
1168
+ var __defProp$8 = Object.defineProperty;
1169
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1170
+ var __publicField$8 = (obj, key, value) => {
1171
+ __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
1172
+ return value;
1173
+ };
1174
+ class AccountPayment {
1175
+ constructor(page) {
1176
+ this.page = page;
1177
+ __publicField$8(this, "cashOnDeliveryOption");
1178
+ __publicField$8(this, "paidInAdvanceOption");
1179
+ __publicField$8(this, "invoiceOption");
1180
+ __publicField$8(this, "changeDefaultPaymentButton");
1181
+ this.cashOnDeliveryOption = page.getByLabel("Cash on delivery");
1182
+ this.paidInAdvanceOption = page.getByLabel("Paid in advance");
1183
+ this.invoiceOption = page.getByLabel("Invoice");
1184
+ this.changeDefaultPaymentButton = page.getByRole("button", { name: "Change" });
1185
+ }
1186
+ async goTo() {
1187
+ await this.page.goto("account/payment");
1188
+ }
1189
+ }
1190
+
1064
1191
  var __defProp$7 = Object.defineProperty;
1065
1192
  var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1066
1193
  var __publicField$7 = (obj, key, value) => {
@@ -1100,13 +1227,17 @@ class SearchSuggest {
1100
1227
  const StorefrontPageObjects = {
1101
1228
  Home,
1102
1229
  ProductDetail: ProductDetail$1,
1230
+ Category,
1103
1231
  CheckoutCart,
1104
1232
  CheckoutConfirm,
1105
1233
  CheckoutFinish,
1106
1234
  CheckoutRegister,
1107
1235
  Account,
1108
1236
  AccountLogin,
1237
+ AccountProfile,
1109
1238
  AccountOrder,
1239
+ AccountAddresses,
1240
+ AccountPayment,
1110
1241
  Search,
1111
1242
  SearchSuggest
1112
1243
  };
@@ -1117,6 +1248,9 @@ const test$5 = test$c.extend({
1117
1248
  StorefrontProductDetail: async ({ StorefrontPage, ProductData }, use) => {
1118
1249
  await use(new ProductDetail$1(StorefrontPage, ProductData));
1119
1250
  },
1251
+ StorefrontCategory: async ({ StorefrontPage, CategoryData }, use) => {
1252
+ await use(new Category(StorefrontPage, CategoryData));
1253
+ },
1120
1254
  StorefrontCheckoutCart: async ({ StorefrontPage }, use) => {
1121
1255
  await use(new CheckoutCart(StorefrontPage));
1122
1256
  },
@@ -1135,9 +1269,18 @@ const test$5 = test$c.extend({
1135
1269
  StorefrontAccountLogin: async ({ StorefrontPage }, use) => {
1136
1270
  await use(new AccountLogin(StorefrontPage));
1137
1271
  },
1272
+ StorefrontAccountProfile: async ({ StorefrontPage }, use) => {
1273
+ await use(new AccountProfile(StorefrontPage));
1274
+ },
1138
1275
  StorefrontAccountOrder: async ({ StorefrontPage }, use) => {
1139
1276
  await use(new AccountOrder(StorefrontPage));
1140
1277
  },
1278
+ StorefrontAccountAddresses: async ({ StorefrontPage }, use) => {
1279
+ await use(new AccountAddresses(StorefrontPage));
1280
+ },
1281
+ StorefrontAccountPayment: async ({ StorefrontPage }, use) => {
1282
+ await use(new AccountPayment(StorefrontPage));
1283
+ },
1141
1284
  StorefrontSearch: async ({ StorefrontPage }, use) => {
1142
1285
  await use(new Search(StorefrontPage));
1143
1286
  },
@@ -1466,45 +1609,98 @@ const ProductData = test$c.extend({
1466
1609
  linked: false,
1467
1610
  net: 6.7
1468
1611
  }
1612
+ ],
1613
+ visibilities: [
1614
+ {
1615
+ salesChannelId: DefaultSalesChannel.salesChannel.id,
1616
+ visibility: 30
1617
+ }
1618
+ ],
1619
+ categories: [
1620
+ {
1621
+ id: DefaultSalesChannel.salesChannel.navigationCategoryId
1622
+ }
1469
1623
  ]
1470
1624
  }
1471
1625
  });
1472
1626
  expect(productResponse.ok()).toBeTruthy();
1473
1627
  const { data: product } = await productResponse.json();
1474
- const syncResp = await AdminApiContext.post("./_action/sync", {
1628
+ await use(product);
1629
+ const cleanupResponse = await AdminApiContext.delete(`./product/${productUuid}`);
1630
+ expect(cleanupResponse.ok()).toBeTruthy();
1631
+ }
1632
+ });
1633
+
1634
+ const CategoryData = test$c.extend({
1635
+ CategoryData: async ({ IdProvider, AdminApiContext, DefaultSalesChannel, ProductData }, use) => {
1636
+ const { id: categoryId, uuid: categoryUuid } = IdProvider.getIdPair();
1637
+ const categoryName = `Category-${categoryId}`;
1638
+ const categoryResponse = await AdminApiContext.post("category?_response", {
1475
1639
  data: {
1476
- "add product to sales channel": {
1477
- entity: "product_visibility",
1478
- action: "upsert",
1479
- payload: [
1480
- {
1481
- productId: product.id,
1482
- salesChannelId: DefaultSalesChannel.salesChannel.id,
1483
- visibility: 30
1484
- }
1485
- ]
1486
- },
1487
- "add product to root navigation": {
1488
- entity: "product_category",
1489
- action: "upsert",
1490
- payload: [
1491
- {
1492
- productId: product.id,
1493
- categoryId: DefaultSalesChannel.salesChannel.navigationCategoryId
1494
- }
1495
- ]
1496
- }
1640
+ id: categoryUuid,
1641
+ name: categoryName,
1642
+ parentId: DefaultSalesChannel.salesChannel.navigationCategoryId,
1643
+ displayNestedProducts: true,
1644
+ type: "page",
1645
+ productAssignmentType: "product",
1646
+ visible: true,
1647
+ active: true,
1648
+ products: [{
1649
+ id: ProductData.id
1650
+ }]
1497
1651
  }
1498
1652
  });
1499
- expect(syncResp.ok()).toBeTruthy();
1500
- await use(product);
1501
- const cleanupResponse = await AdminApiContext.delete(`./product/${productUuid}`);
1653
+ expect(categoryResponse.ok()).toBeTruthy();
1654
+ const { data: category } = await categoryResponse.json();
1655
+ await use(category);
1656
+ const cleanupResponse = await AdminApiContext.delete(`category/${categoryUuid}`);
1502
1657
  expect(cleanupResponse.ok()).toBeTruthy();
1503
1658
  }
1504
1659
  });
1505
1660
 
1506
1661
  const DigitalProductData = test$c.extend({
1507
- DigitalProductData: async ({ IdProvider, AdminApiContext, ProductData }, use) => {
1662
+ DigitalProductData: async ({ IdProvider, AdminApiContext, SalesChannelBaseConfig, DefaultSalesChannel }, use) => {
1663
+ const { id: productId, uuid: productUuid } = IdProvider.getIdPair();
1664
+ const productName = `Digital_Product_test_${productId}`;
1665
+ const productResponse = await AdminApiContext.post("./product?_response", {
1666
+ data: {
1667
+ active: true,
1668
+ stock: 10,
1669
+ taxId: SalesChannelBaseConfig.taxId,
1670
+ id: productUuid,
1671
+ name: productName,
1672
+ productNumber: "Product-" + productId,
1673
+ price: [
1674
+ {
1675
+ currencyId: SalesChannelBaseConfig.eurCurrencyId,
1676
+ gross: 10,
1677
+ linked: false,
1678
+ net: 8.4
1679
+ }
1680
+ ],
1681
+ purchasePrices: [
1682
+ {
1683
+ currencyId: SalesChannelBaseConfig.eurCurrencyId,
1684
+ gross: 8,
1685
+ linked: false,
1686
+ net: 6.7
1687
+ }
1688
+ ],
1689
+ visibilities: [
1690
+ {
1691
+ salesChannelId: DefaultSalesChannel.salesChannel.id,
1692
+ visibility: 30
1693
+ }
1694
+ ],
1695
+ categories: [
1696
+ {
1697
+ id: DefaultSalesChannel.salesChannel.navigationCategoryId
1698
+ }
1699
+ ]
1700
+ }
1701
+ });
1702
+ expect(productResponse.ok()).toBeTruthy();
1703
+ const { data: productData } = await productResponse.json();
1508
1704
  const newMediaResource = await AdminApiContext.post("./media?_response", {
1509
1705
  data: {
1510
1706
  private: false
@@ -1524,14 +1720,14 @@ const DigitalProductData = test$c.extend({
1524
1720
  expect(newMediaUpload.ok()).toBeTruthy();
1525
1721
  const productDownloadResponse = await AdminApiContext.post(`./product-download?_response`, {
1526
1722
  data: {
1527
- productId: ProductData.id,
1723
+ productId: productData.id,
1528
1724
  mediaId: newMediaId
1529
1725
  }
1530
1726
  });
1531
1727
  expect(productDownloadResponse.ok()).toBeTruthy();
1532
1728
  const { data: productDownload } = await productDownloadResponse.json();
1533
1729
  const returnData = {
1534
- product: ProductData,
1730
+ product: productData,
1535
1731
  fileContent
1536
1732
  };
1537
1733
  await use(returnData);
@@ -1542,7 +1738,7 @@ const DigitalProductData = test$c.extend({
1542
1738
  {
1543
1739
  type: "equals",
1544
1740
  field: "lineItems.productId",
1545
- value: ProductData.id
1741
+ value: productData.id
1546
1742
  }
1547
1743
  ]
1548
1744
  }
@@ -1557,6 +1753,8 @@ const DigitalProductData = test$c.extend({
1557
1753
  expect(unlinkMediaResponse.ok()).toBeTruthy();
1558
1754
  const cleanupMediaResponse = await AdminApiContext.delete(`./media/${newMediaId}`);
1559
1755
  expect(cleanupMediaResponse.ok()).toBeTruthy();
1756
+ const cleanupResponse = await AdminApiContext.delete(`./product/${productUuid}`);
1757
+ expect(cleanupResponse.ok()).toBeTruthy();
1560
1758
  }
1561
1759
  });
1562
1760
 
@@ -1972,6 +2170,7 @@ const TagData = test$c.extend({
1972
2170
 
1973
2171
  const test$3 = mergeTests(
1974
2172
  ProductData,
2173
+ CategoryData,
1975
2174
  DigitalProductData,
1976
2175
  CartWithProductData,
1977
2176
  PromotionWithCodeData,
@@ -2226,6 +2425,31 @@ const OpenSearchSuggestPage = test$c.extend({
2226
2425
  }
2227
2426
  });
2228
2427
 
2428
+ const ValidateAccessibility = test$c.extend({
2429
+ ValidateAccessibility: async ({ ShopCustomer }, use) => {
2430
+ const task = (pageName, assertViolations = true, createReport = true, ruleTags = ["wcag2a", "wcag2aa", "wcag2aaa", "wcag21a", "wcag21aa", "best-practice"], outputDir = "test-results/AccessibilityReports") => {
2431
+ return async function ValidateAccessibility2() {
2432
+ const axeBuilder = new AxeBuilder({ page: ShopCustomer.page });
2433
+ const accessibilityResults = await axeBuilder.withTags(ruleTags).analyze();
2434
+ if (createReport) {
2435
+ createHtmlReport({
2436
+ results: accessibilityResults,
2437
+ options: {
2438
+ projectKey: pageName,
2439
+ reportFileName: `${pageName.replace(/[^a-zA-Z]/g, "")}.html`,
2440
+ outputDir
2441
+ }
2442
+ });
2443
+ }
2444
+ if (assertViolations) {
2445
+ ShopCustomer.expects(accessibilityResults.violations).toEqual([]);
2446
+ }
2447
+ };
2448
+ };
2449
+ await use(task);
2450
+ }
2451
+ });
2452
+
2229
2453
  const test$1 = mergeTests(
2230
2454
  Login,
2231
2455
  Logout,
@@ -2241,7 +2465,8 @@ const test$1 = mergeTests(
2241
2465
  SelectExpressShippingOption,
2242
2466
  SubmitOrder,
2243
2467
  OpenSearchResultPage,
2244
- OpenSearchSuggestPage
2468
+ OpenSearchSuggestPage,
2469
+ ValidateAccessibility
2245
2470
  );
2246
2471
 
2247
2472
  const test = mergeTests(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "1.1.4",
3
+ "version": "1.3.0",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",
@@ -38,6 +38,8 @@
38
38
  "dependencies": {
39
39
  "@playwright/test": "1.44.0",
40
40
  "@shopware/api-client": "0.5.0",
41
+ "@axe-core/playwright": "4.9.1",
42
+ "axe-html-reporter": "2.2.3",
41
43
  "image-js": "0.35.5",
42
44
  "uuid": "9.0.1"
43
45
  },