@shopware-ag/acceptance-test-suite 11.15.3 → 11.16.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
@@ -10,15 +10,24 @@ This test suite is an extension to [Playwright](https://playwright.dev/) to easi
10
10
  * [Installation](#installation)
11
11
  * [Configuration](#configuration)
12
12
  * [Usage](#usage)
13
- * [General Fixtures](#general-fixtures)
13
+ * [Deployment Process](#deployment-process)
14
+ * [General fixtures](#general-fixtures)
14
15
  * [Page Objects](#page-objects)
15
16
  * [Actor Pattern](#actor-pattern)
16
- * [Data Fixtures](#data-fixtures)
17
- * [Test Data Service](#test-data-service)
18
- * [Code Contribution](#code-contribution)
19
- * [Local Development with ATS](#local-development-with-ats)
17
+ * [Types](#types-in-the-test-suite)
18
+ * [Testing](#testing-within-the-test-suite)
19
+ * [Running tests](#running-tests-in-the-test-suite)
20
+ * [Local development with ATS](#local-development-with-ats)
20
21
  * [Best practices](#best-practices)
21
- * [Running Tests in the Test Suite](#running-tests-in-the-test-suite)
22
+ * [Code contribution](#code-contribution)
23
+ * [Services](#services)
24
+ * [Test Data Service](#test-data-service)
25
+ * [When to use](#when-to-use-the-testdataservice-in-tests)
26
+ * [When and why to extend](#when-and-why-to-extend-the-testdataservice)
27
+ * [Available methods](#available-create-methods-in-testdataservice)
28
+ * [Writing new methods](#writing-new-methods-in-testdataservice)
29
+ * [Automatic cleanup](#automatic-cleanup-of-test-data-and-system-configurations)
30
+ * [Extending the TestDataService](#extending-the-testdataservice-in-external-projects)
22
31
 
23
32
  ## Installation
24
33
  Start by creating your own [Playwright](https://playwright.dev/docs/intro) project.
@@ -73,32 +82,12 @@ export default defineConfig({
73
82
 
74
83
  For more information about how to configure your Playwright project, have a look into the [official documentation](https://playwright.dev/docs/test-configuration).
75
84
 
76
- ### Mailpit Configuration
85
+ ### Mailpit configuration
77
86
  Set up your local Mailpit instance by following the instructions at [Mailpit GitHub repository](https://github.com/axllent/mailpit).
78
87
  By default, Mailpit starts a web interface at `http://localhost:8025` and listens for SMTP on port `1025`.
79
88
  Set the `MAILPIT_BASE_URL` environment variable in `playwright.config.ts` to `http://localhost:8025`. You can now run email tests, such as `tests/Mailpit.spec.ts`.
80
89
 
81
- ## Testing With ATS
82
- The `tests` folder ensures the reliability of the testing framework by validating the functionality of tools and data used in tests. Add tests to verify any new features or changes you introduce:
83
-
84
- - **Page Objects**: Ensure they are correctly implemented and interact with the application as expected, including navigation, element visibility, and user interactions.
85
- - **TestDataService Methods**: Verify that methods for creating, getting, and cleaning up test data (e.g., products, customers, orders) work correctly and produce consistent results.
86
-
87
- ```TypeScript
88
- //Example for page objects
89
-
90
- await ShopAdmin.goesTo(AdminManufacturerCreate.url());
91
- await ShopAdmin.expects(AdminManufacturerCreate.nameInput).toBeVisible();
92
- await ShopAdmin.expects(AdminManufacturerCreate.saveButton).toBeVisible();
93
- ```
94
-
95
- ```TypeScript
96
- //Example for TestDataService
97
90
 
98
- const product = await TestDataService.createProductWithImage({ description: 'Test Description' });
99
- expect(product.description).toEqual('Test Description');
100
- expect(product.coverId).toBeDefined();
101
- ```
102
91
 
103
92
  ## Usage
104
93
  The test suite uses the [extension system](https://playwright.dev/docs/extensibility) of Playwright and can be used as a full drop-in for Playwright. But, as you might also want to add your own extensions, the best way to use it is to create your own base test file and use it as the central reference for your test files. Add it to your project root or a specific fixture directory and name it whatever you like.
@@ -136,7 +125,51 @@ test('My first test scenario.', async ({ AdminApiContext, DefaultSalesChannel })
136
125
 
137
126
  In the example above you can see two Shopware specific fixtures that are used in the test, `AdminApiContext` and `DefaultSalesChannel`. Every fixture can be used as an argument within the test method. Read more about available fixtures in the next section.
138
127
 
139
- ## General Fixtures
128
+ ## Deployment Process
129
+
130
+ To deploy a new version of the Acceptance Test Suite, follow the steps below:
131
+
132
+ 1. **Create a Pull Request**
133
+ Open a new pull request with your changes. Ensure that all commits follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification to support automated versioning and changelog generation.
134
+
135
+ 2. **Approval and Merge**
136
+ Once the pull request has been reviewed and approved, merge it into the main branch.
137
+
138
+ 3. **Automated Deployment PR Creation**
139
+ After the merge, the [`release-please`](https://github.com/googleapis/release-please) tool will automatically open a new pull request. This deployment PR will include version bumps and a generated changelog.
140
+
141
+ 4. **Review and Approve the Deployment PR**
142
+ The deployment pull request requires an additional approval before it can be merged.
143
+
144
+ 5. **Merge the Deployment PR**
145
+ Once the deployment PR is approved and merged, a new release of the Acceptance Test Suite will be created in the GitHub repository. This action will also publish a new package version to NPM under
146
+ [@shopware-ag/acceptance-test-suite](https://www.npmjs.com/package/@shopware-ag/acceptance-test-suite).
147
+
148
+ 6. **Use the New Version**
149
+ After a short delay, the newly published version will be available on NPM. You can then reference it in your individual project folders as needed.
150
+
151
+ ### Troubleshooting
152
+ If you encounter any issues with the automated deployment process, please check the following [troubleshooting page of release-please](https://github.com/googleapis/release-please?tab=readme-ov-file#release-please-bot-does-not-create-a-release-pr-why).
153
+
154
+ In the most cases, the problem is related to the commit messages not following the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. Make sure to check your commit messages and rebase your branch if necessary. If your PR is merged with a commit message that does not follow the specification you can do the following:
155
+
156
+ 1. **Create an empty commit to the main branch**
157
+ ```bash
158
+ git commit --allow-empty -m "chore: release 2.0.0" -m "Release-As: 2.0.0"
159
+ ```
160
+ When a commit to the main branch has Release-As: x.x.x (case insensitive) in the commit body, Release Please will open a new pull request for the specified version.
161
+
162
+ 2. **Push the changes**
163
+ ```bash
164
+ git push origin <your-branch>
165
+ ```
166
+
167
+ 3. **Adjust the release notes**
168
+
169
+ Don't forget to adjust the release notes in the deployment PR.
170
+
171
+
172
+ ## General fixtures
140
173
 
141
174
  ### DefaultSalesChannel
142
175
  We try to encapsulate test execution within the system under test and make tests as deterministic as possible. The idea is, to have a separate sales channel created which is used to do tests within the standard Storefront. The `DefaultSalesChannel` fixture is a worker scoped fixture and is there to achieve exactly that. Using it will provide you with a new sales channel with default settings, including a default Storefront customer.
@@ -255,13 +288,14 @@ test('Storefront cart test scenario', async ({ StorefrontPage, StorefrontCheckou
255
288
 
256
289
  You can get an overview of all available page objects in the [repository](https://github.com/shopware/acceptance-test-suite/tree/trunk/src/page-objects) of this test suite.
257
290
 
258
- ## Page object module
291
+ ### Page Object module
259
292
  The `modules` folder is designed to house reusable utility functions that operate on a `Page` object (from Playwright). These functions dynamically interact with different browser pages or contexts using the `page` parameter.
260
293
  For example, utility functions like `getCustomFieldCardLocators` or `getSelectFieldListitem` are used across multiple page objects to handle specific functionality (e.g., managing custom fields or select field list items). Centralizing these utilities in the `modules` folder improves code organization, readability, and reduces duplication.
261
294
  Create a new class inside module when it helps to streamline the codebase and avoid repetitive logic across page objects.
262
295
 
263
296
  You can find how `getCustomFieldCardLocators` is defined in the [modules folder ](./src/page-objects/administration/modules/CustomFieldCard.ts) and used in other page object class [here](./src/page-objects/administration/ProductDetail.ts).
264
297
 
298
+
265
299
  ### Add new Page Objects
266
300
  Page objects are organized mainly by their usage in the administration or storefront. To add a new page object just add it in the respective subfolder and reference it in the `AdministrationPages.ts` or `StorefrontPages.ts`.
267
301
 
@@ -293,7 +327,7 @@ export const AdminPageObjects = {
293
327
  }
294
328
  ```
295
329
 
296
- ## Actor Pattern
330
+ ## Actor pattern
297
331
  The actor pattern is a very simple concept that we added to our test suite. It is something that is not related to Playwright, but similar concepts exist in other testing frameworks. We implemented it, because we want to have reusable test logic that can be used in a human-readable form, without abstracting away Playwright as a framework. So you are totally free to use it or not. Any normal Playwright functionality will still be usable in your tests.
298
332
 
299
333
  The concept adds two new entities besides the already mentioned page objects.
@@ -337,11 +371,11 @@ test('Product detail test scenario', async ({
337
371
  });
338
372
  ```
339
373
 
340
- In this example you can see that this pattern creates tests that are very comprehensible, even for non-tech people. They also make it easier to abstract simple test logic that might be used in different scenarios into executable tasks, like adding a product to the cart. You can also see the usage of a data fixture (`ProductData`), which we will cover in a later chapter.
374
+ In this example you can see that this pattern creates tests that are very comprehensible, even for non-tech people. They also make it easier to abstract simple test logic that might be used in different scenarios into executable tasks, like adding a product to the cart.
341
375
 
342
376
  The test suite offers two different actors by default:
343
377
 
344
- * `ShopCustomer`: A user that is navigating the Storefront and buying products.
378
+ * `ShopCustomer`: A user that is navigating the Storefront.
345
379
  * `ShopAdmin`: A user that is managing Shopware via the Administration.
346
380
 
347
381
  ### Tasks
@@ -391,145 +425,134 @@ test('Customer login test scenario', async ({ ShopCustomer, Login }) => {
391
425
 
392
426
  You can create your own tasks in the same way to make them available for the actor pattern. Every task is just a simple Playwright fixture containing a function call with the corresponding test logic. Make sure to merge your task fixtures with other fixtures you created in your base test file. You can use the `mergeTests` method of Playwright to combine several fixtures into one test extension. Use `/src/tasks/shop-customer-tasks.ts` or `/src/tasks/shop-admin-tasks.ts` for that.
393
427
 
394
- ## Data Fixtures
428
+ To keep tests easily readable, use names for your tasks so that in the test itself the code line resembles the `Actor.attemptsTo(doSomething)` pattern as good as possible.
395
429
 
396
- ---
397
- **Deprecated:** Use the [Test Data Service](#test-data-service) instead.
430
+ **Example**
431
+ ```TypeScript
432
+ // Bad example
433
+ await ShopCustomer.attemptsTo(ProductCart);
398
434
 
399
- ---
435
+ // Better example
436
+ await ShopCustomer.attemptsTo(PutProductIntoCart);
437
+ ```
400
438
 
401
- We already covered a lot of interesting fixtures you can use to create your test scenario. One topic which is missing is test data. Most test scenarios will need some predefined state within the system under test to validate a certain behaviour. Within this test suite we use Playwright fixtures also to create necessary test data via API. The goal is to have no direct system dependencies like a database connection to the system under test.
439
+ ## Types in the Test Suite
402
440
 
403
- **Example**
404
- ```TypeScript
405
- import { test as base, expect } from '@playwright/test';
406
- import type { FixtureTypes } from '@shopware-ag/acceptance-test-suite';
441
+ The Shopware Acceptance Test Suite leverages TypeScript’s static typing to ensure that test data structures, API interactions, and test logic are consistent and error-resistant.
407
442
 
408
- export const PropertiesData = base.extend<FixtureTypes>({
409
- PropertiesData: async ({ AdminApiContext }, use) => {
443
+ ### Shopware Types
410
444
 
411
- const response = await AdminApiContext.post('property-group?_response=1', {
412
- data: {
413
- name: 'Size',
414
- description: 'Size',
415
- displayType: 'text',
416
- sortingType: 'name',
417
- options: [{
418
- name: 'Small',
419
- }, {
420
- name: 'Medium',
421
- }, {
422
- name: 'Large',
423
- }],
424
- },
425
- });
445
+ The centralized type definition file, [ShopwareTypes.ts](https://github.com/shopware/acceptance-test-suite/blob/trunk/src/types/ShopwareTypes.ts) is tightly coupled with the TestDataService, which defines the shape and default data of all supported Shopware entities. Each supported entity—such as Product, Customer, Media, etc.—is defined with its properties and default values. These types are then referenced throughout the TestDataService to provide IntelliSense, validation, and consistent data structures.
426
446
 
427
- expect(response.ok()).toBeTruthy();
447
+ ```
448
+ export type ProductReview = components['schemas']['ProductReview'] & {
449
+ id: string,
450
+ productId: string,
451
+ salesChannelId: string,
452
+ title: string,
453
+ content: string,
454
+ points: number,
455
+ }
456
+ ```
457
+ Within that example above you are importing the auto-generated type for `ProductReview` from the Shopware Admin API OpenAPI schema and extending it with additional or overridden fields using & { ... }.
428
458
 
429
- const { data: propertyGroup } = await response.json();
459
+ Sometimes, you might want to remove fields from a type. TypeScript provides the Omit<T, K> utility to exclude fields from a type:
430
460
 
431
- await use(propertyGroup);
461
+ ```
462
+ export type Country = Omit<components['schemas']['Country'], 'states'> & {
463
+ id: string,
464
+ states: [{
465
+ name: string,
466
+ shortCode: string,
467
+ }],
468
+ }
469
+ ```
470
+
471
+ For custom use cases, simply define a custom type:
432
472
 
433
- const deleteResponse = await AdminApiContext.delete(`property-group/${propertyGroup.id}`);
434
- expect(deleteResponse.ok()).toBeTruthy();
435
- },
436
- });
473
+ ```
474
+ export type CustomShippingMethod = {
475
+ name: string;
476
+ active: boolean;
477
+ deliveryTimeId: string;
478
+ }
437
479
  ```
438
480
 
439
- Here you can see a simple data fixture which will create a new property group in the Shopware instance under test via the Admin-API. The nice thing about Playwright fixtures is, that we can create some data and make it available within our test using the `use()` method and right afterward already clean up the data with a delete call. This enables us to have all operations regarding specific test data in one place with the opportunity to automatically clean up the data after test execution.
481
+ ## Testing within the Test Suite
482
+ The `tests` folder ensures the reliability of the testing framework by validating the functionality of tools and data used in tests. Add tests to verify any new features or changes you introduce:
440
483
 
441
- You can simply make test data available in your test by using the fixture in your test method.
484
+ - **Page Objects**: Ensure they are correctly implemented and interact with the application as expected, including navigation, element visibility, and user interactions.
485
+ - **TestDataService Methods**: Verify that methods for creating, getting, and cleaning up test data (e.g., products, customers, orders) work correctly and produce consistent results.
442
486
 
443
487
  ```TypeScript
444
- import { test } from './../BaseTestFile';
488
+ //Example for page objects
445
489
 
446
- test('Property group test scenario', async ({ PropertiesData }) => {
447
-
448
- // Do some testing with the property group from PropertiesData
449
- });
490
+ await ShopAdmin.goesTo(AdminManufacturerCreate.url());
491
+ await ShopAdmin.expects(AdminManufacturerCreate.nameInput).toBeVisible();
492
+ await ShopAdmin.expects(AdminManufacturerCreate.saveButton).toBeVisible();
493
+ ```
494
+
495
+ ```TypeScript
496
+ //Example for TestDataService
497
+
498
+ const product = await TestDataService.createProductWithImage({ description: 'Test Description' });
499
+ expect(product.description).toEqual('Test Description');
500
+ expect(product.coverId).toBeDefined();
450
501
  ```
451
502
 
452
- If you create your own data fixtures make sure to import and merge them in your base test file with other fixtures you created.
453
-
454
- ## Test Data Service
455
- This service is a simple way to create test data within your tests. It simplifies the usage of the Shopware API and provides sample structs for various entities, which you also can adjust to your needs. For detailed documentation of the methods you can have a look at the service class or simply use the auto-completion of your IDE. Here is a list of available methods:
456
-
457
- ### Creating Data
458
- * `createBasicProduct()`
459
- * `createProductWithImage()`
460
- * `createDigitalProduct()`
461
- * `createProductWithPriceRange()`
462
- * `createBasicManufacturer()`
463
- * `createManufacturerWithImage()`
464
- * `createCategory()`
465
- * `createMediaPNG()`
466
- * `createMediaTXT()`
467
- * `createColorPropertyGroup()`
468
- * `createTextPropertyGroup()`
469
- * `createTag()`
470
- * `createCustomer()`
471
- * `createOrder()`
472
- * `createPromotionWithCode()`
473
- * `createBasicPaymentMethod()`
474
- * `createPaymentMethodWithImage()`
475
- * `createBasicShippingMethod()`
476
- * `createShippingMethodWithImage()`
477
- * `createBasicRule()`
478
- * `createBasicPageLayout()`
479
-
480
- ### Relations
481
- * `assignProductDownload()`
482
- * `assignProductMedia()`
483
- * `assignProductManufacturer()`
484
- * `assignProductCategory()`
485
- * `assignProductTag()`
486
- * `assignManufacturerMedia()`
487
- * `assignPaymentMethodMedia()`
488
- * `assignShippingMethodMedia()`
489
-
490
- ### Retrieving Basic Data
491
- * `getCurrency()`
492
- * `getRule()`
493
- * `getShippingMethod()`
494
- * `getPaymentMethod()`
495
- * `getAllDeliveryTimeResources()`
496
- * `getCustomerAddress()`
497
- * `getSalutation()`
498
- * `getOrderStateMachine()`
499
- * `getDeliveryStateMachine()`
500
- * `getTransactionStateMachine()`
501
- * `getTransactionStateMachine()`
502
- * `getStateMachine()`
503
- * `getStateMachineState()`
504
- * `getPropertyGroupOptions()`
505
-
506
- ## Code Contribution
507
- You can contribute to this project via its [official repository](https://github.com/shopware/acceptance-test-suite/) on GitHub.
503
+ ## Running tests in the Test Suite
504
+ If you want to work on the test suite and try to execute tests from within this repository, you have to run a corresponding docker image for a specific Shopware version.
508
505
 
509
- This project uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). Please make sure to form your commits accordingly to the spec.
506
+ We publish pre-built images at the [GitHub container registry](https://github.com/orgs/shopware/packages/container/package/acceptance-test-suite%2Ftest-image). The images are built on a daily basis, check to see which versions are available.
507
+
508
+ In order to select an image, export the corresponding tag as `SHOPWARE_VERSION` and start the containers:
510
509
 
511
- ## Local Development with ATS
510
+ ```bash
511
+ SHOPWARE_VERSION=trunk docker compose up --wait shopware
512
+ ```
513
+
514
+ <details>
515
+ <summary>ℹ️ What if the version I'd like to test is not available as a pre-built image?</summary>
516
+
517
+ If you want to test with an image that's not available already, you can build it yourself by exporting a few more variables:
518
+
519
+ ```bash
520
+ export PHP_VERSION="8.3" # PHP version of the base image
521
+ export SHOPWARE_VERSION="v6.5.8.0" # Shopware version to check out. This may bei either a branch or a tag, depending on the value of SHOPWARE_BUILD_SOURCE
522
+ export SHOPWARE_BUILD_SOURCE="tag" # Either "branch" or "tag"
523
+
524
+ docker compose up --attach-dependencies shopware # This will build the image if it's not available
525
+ ```
526
+ </details>
527
+
528
+ Afterwards you can execute the normal playwright commands:
529
+
530
+ ```bash
531
+ npx playwright test --ui
532
+ ```
533
+
534
+ ## Local development with ATS
512
535
  To work locally with the Acceptance Test Suite (ATS) and your development setup, follow these steps:
513
536
 
514
- ### Create Your Page Objects and TestDataService Methods
537
+ ### Create your Page Objects and TestDataService methods
515
538
 
516
- In the ATS repository (shopware/acceptance-test-suite), create or modify your custom page objects, TestDataService methods, or any related files.
539
+ In the ATS repository ([shopware/acceptance-test-suite](https://github.com/shopware/acceptance-test-suite)), create or modify your custom page objects, TestDataService methods, or any related files.
517
540
 
518
541
  After making your changes, build the project by running the following command in the ATS repository:
519
542
  ```bash
520
543
  npm run build
521
544
  ```
522
- This will generate the necessary artifacts in the dist folder.
545
+ This will generate the necessary artifacts in the `dist` folder.
523
546
 
524
- Copy the generated artifacts (e.g., all files in the dist folder) from the ATS repository to your local Shopware instance's `node_modules` folder, specifically under the ATS package path:
547
+ Copy the generated artifacts (e.g., all files in the `dist` folder) from the ATS repository to your local Shopware instance's `node_modules` folder, specifically under the ATS package path:
525
548
  ```bash
526
549
  cp -R dist/* <path-to-your-shopware-instance>/tests/acceptance/node_modules/@shopware-ag/acceptance-test-suite/dist
527
550
  ````
528
- ### Adjust Tests, Page Objects, and Methods
551
+ ### Adjust tests, Page Objects, and methods
529
552
 
530
553
  In your Shopware instance, adjust any tests, page objects, TestDataService methods, or other related files to align them with the changes made in the ATS repository.
531
554
 
532
- ### Run the Tests
555
+ ### Run the tests
533
556
 
534
557
  Execute the tests to verify your changes. Use the following command from your Shopware project's acceptance test directory:
535
558
  ```bash
@@ -545,19 +568,20 @@ A good first read about this is the official [playwright best practices page](ht
545
568
 
546
569
  The most important part is [test isolation](https://playwright.dev/docs/best-practices#make-tests-as-isolated-as-possible) which helps to prevent flaky behavior and enables the test to be run in parallel and on systems with an unknown state.
547
570
 
548
-
549
571
  ### Dos
550
572
 
551
- - use fixtures or the [`TestDataService`](./src/services/TestDataService.ts)
552
- - create all the data that is required for your test case. That includes sales channels, customers and users (the page fixtures handle most of the common use cases)
573
+ - use the [`TestDataService`](./src/services/TestDataService.ts) for creating test data
574
+ - create all the data that is required for your test case. That includes sales channels, customers and users (the page fixtures handle most of the common use cases)...
575
+ - ...and clean it up if you don't need it anymore. The TestDataService will take care of it if you used it to create the test data
553
576
  - if you need specific settings for your test, set it explicitly for the user/customer/sales channel
554
577
  - directly jump to detail pages with the id of the entities you've created
555
578
  - if that's no possible, use the search with a unique name to filter lists to just that single entity
579
+ - if you need to skip tests, comment any relevant github issues as part of the skip method: `test.skip('Blocked by https://[...])`
556
580
 
557
581
  ### Don'ts
558
582
 
559
583
  - do not expect lists/tables to only contain one item, leverage unique ids/names to open or find your entity instead
560
- - same with helper functions, do not except to only get item back from the API. Always a unique criteria to the API call
584
+ - same with helper functions, do not expect to only get one item back from the API. Always use unique criteria to the API call
561
585
  - avoid unused fixtures: if you request a fixture but don't use any data from the fixture, the test or fixture should be refactored
562
586
  - do not depend on implicit configuration and existing data. Examples:
563
587
  - rules
@@ -566,34 +590,270 @@ The most important part is [test isolation](https://playwright.dev/docs/best-pra
566
590
  - do not expect the shop to have the defaults en_GB and EUR
567
591
  - do not change global settings (sales channel is ok, because it's created by us)
568
592
  - basically everything in Settings that is not specific to a sales channel (tax, search, etc.)
593
+
594
+ ### Sensitive Data / Credentials
595
+ Sometimes you have to provide sensitie data or credentials for your tests to run, for example credentials for a sandbox environment for a payment provider. Apart from avoiding to have those credentials in the acutal code, you should also prevent them from appearing in logs or traces. To achieve that you should outsource steps using sensitive data to another project, running before the actual test project, and disable traces for it.
596
+
597
+ **Example**
598
+ ```Typescript
599
+ projects: [
600
+ // Init project using sensitive data
601
+ {
602
+ name: 'init',
603
+ testMatch: /.*\.init\.ts/,
604
+ use : {trace : 'off'}
605
+ },
569
606
 
570
- ## Running Tests in the Test Suite
571
- If you want to work on the test suite and try to execute tests from within this repository, you have to run a corresponding docker image for a specific Shopware version.
607
+ {
608
+ // actual test project
609
+ // [...]
610
+ dependencies: ['init'],
611
+ }]
612
+ ```
613
+
614
+ ### Debugging API calls
615
+ Debugging API calls may not be an easy task at first glance, because if the call you made returns an error, it is not directly visible to you. But you can use the `errors[]`-array of the response and log that on the console.
616
+
617
+ **Example**
618
+ ```Typescript
619
+ const response = await this.AdminApiClient.post('some/route', {
620
+ data: {
621
+ limit: 1,
622
+ filter: [
623
+ {
624
+ type: 'equals',
625
+ field: 'someField',
626
+ value: 'someValue',
627
+ },
628
+ ],
629
+ },
630
+ });
631
+ const responseData = await response.json();
632
+ console.log(responseData.errors[0]);
633
+ ```
572
634
 
573
- We publish pre-built images at the [GitHub container registry](https://github.com/orgs/shopware/packages/container/package/acceptance-test-suite%2Ftest-image). The images are built on a daily basis, check to see which versions are available.
635
+ ## Code contribution
636
+ You can contribute to this project via its [official repository](https://github.com/shopware/acceptance-test-suite/) on GitHub.
574
637
 
575
- In order to select an image, export the corresponding tag as `SHOPWARE_VERSION` and start the containers:
638
+ This project uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). Please make sure to form your commits accordingly to the spec.
576
639
 
577
- ```bash
578
- SHOPWARE_VERSION=trunk docker compose up --wait shopware
640
+ ## Services
641
+
642
+ The test suite provides several services that can be used to simplify your test code. These services are designed to be reusable and can be easily extended to fit your specific needs.
643
+
644
+ ### Test Data Service
645
+ The `TestDataService` is a powerful utility designed to simplify test data creation, management, and cleanup when writing acceptance and API tests for Shopware. It provides ready-to-use functions for common data needs and ensures reliable, isolated test environments.
646
+ For detailed documentation of the methods you can have a look at the [service class](https://github.com/shopware/acceptance-test-suite/blob/trunk/src/services/TestDataService.ts) or simply use the auto-completion of your IDE.
647
+
648
+ ### When to use the TestDataService in tests
649
+
650
+ You should use the `TestDataService` whenever you need **test data** that matches common Shopware structures, such as:
651
+
652
+ - Creating a **basic product**, **customer**, **order**, **category**, etc.
653
+ - Setting up **media** resources like product images or digital downloads.
654
+ - Creating **promotions**, **rules**, or **payment/shipping methods**.
655
+ - Fetching existing entities via helper methods (`getCurrency()`, `getShippingMethod()`, etc.).
656
+ - **Assigning relations** between entities (e.g., linking a product to a category).
657
+
658
+ **Typical examples include:**
659
+
660
+ ```typescript
661
+ const product = await TestDataService.createBasicProduct();
662
+ const customer = await TestDataService.createCustomer();
663
+ const shipping = await TestDataService.createBasicShippingMethod();
579
664
  ```
580
665
 
581
- <details>
582
- <summary>ℹ️ What if the version I'd like to test is not available as a pre-built image?</summary>
666
+ ### When and why to extend the TestDataService
583
667
 
584
- If you want to test with an image that's not available already, you can build it yourself by exporting a few more variables:
668
+ You should add new functions to the TestDataService (or extend it) when:
585
669
 
586
- ```bash
587
- export PHP_VERSION="8.3" # PHP version of the base image
588
- export SHOPWARE_VERSION="v6.5.8.0" # Shopware version to check out. This may bei either a branch or a tag, depending on the value of SHOPWARE_BUILD_SOURCE
589
- export SHOPWARE_BUILD_SOURCE="tag" # Either "branch" or "tag"
670
+ - Your project or plugin introduces **new entity types** (e.g., `CommercialCustomerGroup`, `CustomProductType`).
671
+ - You need a **specialized creation logic** (e.g., a shipping method with multiple rules, a pre-configured product bundle).
672
+ - Existing methods require **modifications** that should not affect the core service.
673
+ - You want to **reuse the same setup across multiple tests** without duplicating logic.
674
+ - You require **special cleanup handling** for newly created entities.
590
675
 
591
- docker compose up --attach-dependencies shopware # This will build the image if it's not available
676
+ Using and extending the `TestDataService` properly ensures your acceptance tests stay **readable**, **maintainable**, and **scalable** even as your Shopware project grows.
677
+
678
+ ### Available `create*` methods in TestDataService
679
+
680
+ These methods are designed to streamline the setup of test data, ensuring consistency and efficiency in your testing processes. They are much more available than listed below, but these are the most common ones. Please use your IDE auto-completion to find all available methods.
681
+
682
+ - `createBasicProduct(): Promise<Product>`
683
+ - `createVariantProducts(parentProduct: Product, propertyGroups: PropertyGroup[]): Promise<Product[]>`
684
+ - `createCustomer(): Promise<Customer>`
685
+ - `createCustomerGroup(): Promise<CustomerGroup>`
686
+ - `createOrder(lineItems: SimpleLineItem[], customer: Customer): Promise<Order>`
687
+ - `createCategory(): Promise<Category>`
688
+ - `createColorPropertyGroup(): Promise<PropertyGroup>`
689
+ - `createBasicPaymentMethod(): Promise<PaymentMethod>`
690
+ - `createBasicShippingMethod(): Promise<ShippingMethod>`
691
+
692
+ - [...]
693
+
694
+
695
+ ### Available `assign*` methods in TestDataService
696
+
697
+ These methods are designed to establish associations between entities, such as linking products to categories or assigning media to manufacturers, ensuring that your test data reflects realistic scenarios. They are much more available than listed below, but these are the most common ones. Please use your IDE auto-completion to find all available methods.
698
+
699
+ - `assignProductCategory(productId: string, categoryIds: string[]): Promise<void>`
700
+ - `assignProductManufacturer(productId: string, manufacturerId: string): Promise<void>`
701
+ - `assignProductMedia(productId: string, mediaId: string): Promise<void>`
702
+
703
+ - [...]
704
+
705
+ ### Available `get*` methods in TestDataService
706
+ They are much more available than listed below, but these are the most common ones. Please use your IDE auto-completion to find all available methods.
707
+
708
+ - `getCountry(iso2: string): Promise<Country>`
709
+ - `getCurrency(isoCode: string): Promise<Currency>`
710
+ - `getCustomerGroups(): Promise<CustomerGroup[]>`
711
+ - `getPaymentMethod(name = 'Invoice'): Promise<PaymentMethod>`
712
+
713
+ - [...]
714
+
715
+ ### Writing new methods in `TestDataService`
716
+
717
+ If you want to add new functionality to this service — such as a new type of entity creation — you can follow this approach:
718
+
719
+ #### 1. Define the purpose
720
+
721
+ Decide whether you're creating, assigning, or retrieving data. Most methods fall into one of the following patterns:
722
+ - `create*`: Creates a new entity (e.g. product, customer, category)
723
+ - `assign*`: Links existing entities (e.g. assign media to product)
724
+ - `get*`: Retrieves specific or filtered data from the system
725
+
726
+ #### 2. Implement the method
727
+
728
+ Use the `AdminApiContext` to interact with the Shopware Admin API. Here's a simplified example of adding a method to [create a new shipping method](https://github.com/shopware/acceptance-test-suite/blob/e8d2a5e8cee2194b914aa35aa87fe7cf04060834/src/services/TestDataService.ts#L679)
729
+
730
+ #### 3. Follow naming conventions
731
+
732
+ Be consistent in naming:
733
+ - Use `createBasic*` for standardized, default setups with predefined values (e.g. `createBasicProduct`)
734
+ - Use `create*With*` for variations (e.g. `createProductWithImage`)
735
+ - Use `assign*` for methods that associate two entities (e.g. `assignProductMedia`)
736
+ - Use `get*` to retrieve specific entities or lists (e.g. `getCurrency`)
737
+
738
+ #### 4. Add a return type
739
+
740
+ Always define a return type (typically a `Promise<...>`) to improve autocompletion and documentation support.
741
+
742
+ #### 5. Add cleanup logic
743
+
744
+ Make sure to clean up the entity via code after test run by putting the entity to a record. See example below:
745
+
746
+ ```typescript
747
+ async createBasicRule(): Promise<Rule> {
748
+ [...]
749
+
750
+ this.addCreatedRecord('rule', rule.id);
751
+
752
+ [...]
753
+ }
592
754
  ```
593
- </details>
594
755
 
595
- Afterwards you can execute the normal playwright commands:
756
+ Further information you can explore in the chapter: [Automatic Cleanup](#automatic-cleanup-of-test-data-and-system-configurations)
596
757
 
597
- ```bash
598
- npx playwright test --ui
758
+ #### 6. Test the method
759
+
760
+ Once added, use your new method inside a test to verify it works as expected (`/tests/TestDataService.spec.ts`):
761
+
762
+ ```typescript
763
+ test('Verify new shipping method creation', async ({ TestDataService }) => {
764
+ const shippingMethod = await TestDataService.createShippingMethod({
765
+ name: 'Express Delivery'
766
+ });
767
+
768
+ expect(shippingMethod.name).toEqual('Express Delivery');
769
+ });
770
+ ```
771
+
772
+ ### Automatic cleanup of test data and system configurations
773
+
774
+ The `TestDataService` includes a built-in mechanism to ensure that any test data & system configuration entries created during a test run is automatically deleted afterward. This ensures that the Shopware instance remains clean and consistent between tests, helping to maintain **test isolation** and prevent **state leakage**.
775
+
776
+ #### How cleanup works
777
+
778
+ When you create an entity using a `create*` method (e.g., `createBasicProduct`, `createCustomer`), the service automatically registers that entity for deletion by calling the `addCreatedRecord()` method:
779
+ ```typescript
780
+ this.addCreatedRecord('product', product.id);
599
781
  ```
782
+
783
+ These records are stored in a cleanup queue that is processed at the end of each test using the Playwright lifecycle.
784
+
785
+ #### Cleanup execution
786
+
787
+ The `cleanup()` method handles the deletion of all registered entities and system config changes. All created records are grouped into two categories:
788
+ * Priority Deletions (`priorityDeleteOperations`) – for entities with dependencies that must be deleted first (e.g. orders, customers)
789
+ * Standard Deletions (`deleteOperations`) – for all other entities
790
+
791
+ This prioritization prevents errors when deleting interdependent data. Any modified system configurations are reset to their previous state after deleting priority records.
792
+ The priority entities can be found in the `TestDataService` class. If you want to add a new entity to the priority deletion list, you can do so by adding it to the `priorityDeleteOperations` array.
793
+
794
+ #### Skipping cleanup
795
+
796
+ In rare scenarios, such as performance testing or debugging, you may want to prevent cleanup for specific entities. You can simply skip the cleanUp by calling `TestDataService.setCleanUp(false)` within your test.
797
+
798
+
799
+ ### Extending the TestDataService in external projects
800
+
801
+ The `TestDataService` is designed to be **easily extendable**. This allows you to add project-specific data generation methods while still benefiting from the existing, standardized base functionality.
802
+
803
+ #### 1. Create a new subclass
804
+
805
+ You can create a new TypeScript class that **extends** the base `TestDataService`.
806
+
807
+ ```typescript
808
+ import { TestDataService } from '@shopware-ag/acceptance-test-suite';
809
+
810
+ export class CustomTestDataService extends TestDataService {
811
+
812
+ constructor(AdminApiContext, DefaultSalesChannel) {
813
+ super(...);
814
+ }
815
+
816
+ async createCustomCustomerGroup(data: Partial<CustomerGroup>) {
817
+ const response = await this.adminApi.post('customer-group?_response=true', {
818
+ data: {
819
+ ...
820
+ },
821
+ });
822
+
823
+ const { data: createdGroup } = await response.json();
824
+ this.addCreatedRecord('customer-group', createdGroup.id);
825
+
826
+ return createdGroup;
827
+ }
828
+ }
829
+ ```
830
+
831
+ #### 2. Provide the extended service as a fixture
832
+
833
+ Following the Playwright [fixture system](https://playwright.dev/docs/test-fixtures) described in the README, you create a new fixture that initializes your extended service.
834
+
835
+ Example from `AcceptanceTest.ts`:
836
+
837
+ ```typescript
838
+ import { test as base } from '@shopware-ag/acceptance-test-suite';
839
+ import type { FixtureTypes } from './BaseTestFile';
840
+ import { CustomTestDataService } from './CustomTestDataService';
841
+
842
+ export interface CustomTestDataServiceType {
843
+ TestDataService: CustomTestDataService;
844
+ }
845
+
846
+ export const test = base.extend<FixtureTypes & CustomTestDataServiceType>({
847
+ TestDataService: async ({ AdminApiContext, DefaultSalesChannel }, use) => {
848
+ const service = new CustomTestDataService(AdminApiContext, DefaultSalesChannel.salesChannel);
849
+ await use(service);
850
+ await service.cleanUp();
851
+ },
852
+ });
853
+ ```
854
+
855
+ In this setup:
856
+ - The `TestDataService` fixture is **overridden** with your custom `CustomTestDataService`.
857
+ - Now all tests that use `TestDataService` will have access to both the original and your extended methods.
858
+ - The automated cleanup is still in place, ensuring that any test data created during the test run is removed afterward.
859
+
package/dist/index.d.mts CHANGED
@@ -1335,7 +1335,36 @@ declare class ProductDetail$1 implements PageObject {
1335
1335
  readonly productDetailConfigurator: Locator;
1336
1336
  readonly productDetailConfiguratorGroupTitle: Locator;
1337
1337
  readonly productDetailConfiguratorOptionInputs: Locator;
1338
+ readonly productName: Locator;
1339
+ readonly reviewsTab: Locator;
1340
+ readonly reviewTeaserButton: Locator;
1341
+ readonly reviewTeaserText: Locator;
1342
+ readonly reviewListingItems: Locator;
1343
+ readonly reviewEmptyListingText: Locator;
1344
+ readonly reviewLoginForm: Locator;
1345
+ readonly forgottenPasswordLink: Locator;
1346
+ readonly reviewForm: Locator;
1347
+ readonly reviewRatingPoints: Locator;
1348
+ readonly reviewRatingText: Locator;
1349
+ readonly reviewSubmitMessage: Locator;
1350
+ readonly reviewCounter: Locator;
1351
+ readonly reviewItemRatingPoints: Locator;
1352
+ readonly reviewItemTitle: Locator;
1353
+ readonly reviewReviewTextInput: Locator;
1354
+ readonly reviewItemContent: Locator;
1355
+ readonly reviewLoginButton: Locator;
1356
+ readonly reviewEmailInput: Locator;
1357
+ readonly reviewPasswordInput: Locator;
1358
+ readonly reviewTitleInput: Locator;
1359
+ readonly reviewSubmitButton: Locator;
1360
+ readonly productReviewsLink: Locator;
1361
+ readonly productReviewRating: Locator;
1338
1362
  constructor(page: Page);
1363
+ getReviewFilterRowOptionsByName(filterOptionName: string): Promise<{
1364
+ reviewFilterOptionCheckbox: Locator;
1365
+ reviewFilterOptionText: Locator;
1366
+ reviewFilterOptionPercentage: Locator;
1367
+ }>;
1339
1368
  url(productData: Product): string;
1340
1369
  }
1341
1370
 
@@ -2682,6 +2711,8 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
2682
2711
  BulkEditCustomers: Task;
2683
2712
  } & {
2684
2713
  AssignEntitiesToRule: Task;
2714
+ } & {
2715
+ LoginViaReviewsTab: Task;
2685
2716
  } & {
2686
2717
  Login: Task;
2687
2718
  } & {
package/dist/index.d.ts CHANGED
@@ -1335,7 +1335,36 @@ declare class ProductDetail$1 implements PageObject {
1335
1335
  readonly productDetailConfigurator: Locator;
1336
1336
  readonly productDetailConfiguratorGroupTitle: Locator;
1337
1337
  readonly productDetailConfiguratorOptionInputs: Locator;
1338
+ readonly productName: Locator;
1339
+ readonly reviewsTab: Locator;
1340
+ readonly reviewTeaserButton: Locator;
1341
+ readonly reviewTeaserText: Locator;
1342
+ readonly reviewListingItems: Locator;
1343
+ readonly reviewEmptyListingText: Locator;
1344
+ readonly reviewLoginForm: Locator;
1345
+ readonly forgottenPasswordLink: Locator;
1346
+ readonly reviewForm: Locator;
1347
+ readonly reviewRatingPoints: Locator;
1348
+ readonly reviewRatingText: Locator;
1349
+ readonly reviewSubmitMessage: Locator;
1350
+ readonly reviewCounter: Locator;
1351
+ readonly reviewItemRatingPoints: Locator;
1352
+ readonly reviewItemTitle: Locator;
1353
+ readonly reviewReviewTextInput: Locator;
1354
+ readonly reviewItemContent: Locator;
1355
+ readonly reviewLoginButton: Locator;
1356
+ readonly reviewEmailInput: Locator;
1357
+ readonly reviewPasswordInput: Locator;
1358
+ readonly reviewTitleInput: Locator;
1359
+ readonly reviewSubmitButton: Locator;
1360
+ readonly productReviewsLink: Locator;
1361
+ readonly productReviewRating: Locator;
1338
1362
  constructor(page: Page);
1363
+ getReviewFilterRowOptionsByName(filterOptionName: string): Promise<{
1364
+ reviewFilterOptionCheckbox: Locator;
1365
+ reviewFilterOptionText: Locator;
1366
+ reviewFilterOptionPercentage: Locator;
1367
+ }>;
1339
1368
  url(productData: Product): string;
1340
1369
  }
1341
1370
 
@@ -2682,6 +2711,8 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
2682
2711
  BulkEditCustomers: Task;
2683
2712
  } & {
2684
2713
  AssignEntitiesToRule: Task;
2714
+ } & {
2715
+ LoginViaReviewsTab: Task;
2685
2716
  } & {
2686
2717
  Login: Task;
2687
2718
  } & {
package/dist/index.mjs CHANGED
@@ -3233,6 +3233,8 @@ class TestDataService {
3233
3233
  }
3234
3234
  }
3235
3235
 
3236
+ const ATS_SKIP_CLEANUP = ["1", "true"].includes(process.env["ATS_SKIP_CLEANUP"] || "");
3237
+ const ATS_EXEC_CLEANUP = !ATS_SKIP_CLEANUP;
3236
3238
  const test$9 = test$f.extend({
3237
3239
  TestDataService: async ({ AdminApiContext, IdProvider, DefaultSalesChannel, SalesChannelBaseConfig }, use) => {
3238
3240
  const DataService = new TestDataService(AdminApiContext, IdProvider, {
@@ -3245,7 +3247,9 @@ const test$9 = test$f.extend({
3245
3247
  defaultCustomerGroupId: DefaultSalesChannel.salesChannel.customerGroupId
3246
3248
  });
3247
3249
  await use(DataService);
3248
- await DataService.cleanUp();
3250
+ if (ATS_EXEC_CLEANUP) {
3251
+ await DataService.cleanUp();
3252
+ }
3249
3253
  }
3250
3254
  });
3251
3255
 
@@ -3595,6 +3599,31 @@ let ProductDetail$1 = class ProductDetail {
3595
3599
  __publicField$T(this, "productDetailConfigurator");
3596
3600
  __publicField$T(this, "productDetailConfiguratorGroupTitle");
3597
3601
  __publicField$T(this, "productDetailConfiguratorOptionInputs");
3602
+ __publicField$T(this, "productName");
3603
+ //Reviews Tab
3604
+ __publicField$T(this, "reviewsTab");
3605
+ __publicField$T(this, "reviewTeaserButton");
3606
+ __publicField$T(this, "reviewTeaserText");
3607
+ __publicField$T(this, "reviewListingItems");
3608
+ __publicField$T(this, "reviewEmptyListingText");
3609
+ __publicField$T(this, "reviewLoginForm");
3610
+ __publicField$T(this, "forgottenPasswordLink");
3611
+ __publicField$T(this, "reviewForm");
3612
+ __publicField$T(this, "reviewRatingPoints");
3613
+ __publicField$T(this, "reviewRatingText");
3614
+ __publicField$T(this, "reviewSubmitMessage");
3615
+ __publicField$T(this, "reviewCounter");
3616
+ __publicField$T(this, "reviewItemRatingPoints");
3617
+ __publicField$T(this, "reviewItemTitle");
3618
+ __publicField$T(this, "reviewReviewTextInput");
3619
+ __publicField$T(this, "reviewItemContent");
3620
+ __publicField$T(this, "reviewLoginButton");
3621
+ __publicField$T(this, "reviewEmailInput");
3622
+ __publicField$T(this, "reviewPasswordInput");
3623
+ __publicField$T(this, "reviewTitleInput");
3624
+ __publicField$T(this, "reviewSubmitButton");
3625
+ __publicField$T(this, "productReviewsLink");
3626
+ __publicField$T(this, "productReviewRating");
3598
3627
  this.addToCartButton = page.getByRole("button", { name: "Add to shopping cart" });
3599
3628
  this.quantitySelect = page.getByLabel("Quantity", { exact: true });
3600
3629
  this.productSingleImage = page.locator(".gallery-slider-single-image");
@@ -3614,6 +3643,41 @@ let ProductDetail$1 = class ProductDetail {
3614
3643
  this.productDetailConfigurator = page.locator(".product-detail-configurator");
3615
3644
  this.productDetailConfiguratorGroupTitle = page.locator(".product-detail-configurator-group-title");
3616
3645
  this.productDetailConfiguratorOptionInputs = page.locator(".product-detail-configurator-option-input");
3646
+ this.productName = page.locator(".product-detail-name");
3647
+ this.productReviewRating = page.locator(".product-detail-reviews .product-review-rating");
3648
+ this.productReviewsLink = page.locator(".product-detail-reviews .product-detail-reviews-link");
3649
+ this.reviewsTab = this.page.getByRole("tab", { name: "Reviews" });
3650
+ this.reviewTeaserButton = this.page.locator(".product-detail-review-teaser-btn");
3651
+ this.reviewTeaserText = this.page.locator(".product-detail-review-teaser .h4");
3652
+ this.reviewListingItems = this.page.locator(".product-detail-review-item");
3653
+ this.reviewEmptyListingText = this.page.getByText("No reviews found. Share your insights with others.");
3654
+ this.reviewLoginForm = this.page.locator(".product-detail-review-login");
3655
+ this.forgottenPasswordLink = this.page.getByRole("link", { name: "I have forgotten my password." });
3656
+ this.reviewLoginButton = this.page.getByRole("button", { name: "Log in" });
3657
+ this.reviewEmailInput = this.page.getByLabel("Your email address");
3658
+ this.reviewPasswordInput = this.page.getByLabel("Your password");
3659
+ this.reviewForm = this.page.locator(".product-detail-review-form");
3660
+ this.reviewTitleInput = this.page.getByLabel("Title");
3661
+ this.reviewReviewTextInput = this.page.getByLabel("Your review");
3662
+ this.reviewSubmitButton = this.page.locator(".btn-review-submit");
3663
+ this.reviewRatingPoints = this.page.locator(".product-detail-review-form-star");
3664
+ this.reviewRatingText = this.page.locator(".product-detail-review-form-rating-text");
3665
+ this.reviewCounter = this.page.locator(".product-detail-review-counter");
3666
+ this.reviewItemRatingPoints = this.page.locator(".product-detail-review-item-points .point-full");
3667
+ this.reviewItemTitle = this.page.locator(".product-detail-review-item-title");
3668
+ this.reviewItemContent = this.page.locator(".product-detail-review-item-content");
3669
+ this.reviewSubmitMessage = this.page.getByText("Thank you for submitting your review. We will examine the review and eventually unlock it, please be patient.");
3670
+ }
3671
+ async getReviewFilterRowOptionsByName(filterOptionName) {
3672
+ const rowLocators = this.page.locator(".product-detail-review-filter").filter({ hasText: filterOptionName });
3673
+ const reviewFilterOptionCheckbox = rowLocators.getByLabel(filterOptionName);
3674
+ const reviewFilterOptionText = rowLocators.locator(".custom-control-label");
3675
+ const reviewFilterOptionPercentage = rowLocators.locator(".product-detail-review-share");
3676
+ return {
3677
+ reviewFilterOptionCheckbox,
3678
+ reviewFilterOptionText,
3679
+ reviewFilterOptionPercentage
3680
+ };
3617
3681
  }
3618
3682
  url(productData) {
3619
3683
  let namePath = "";
@@ -6421,7 +6485,7 @@ class CustomerBulkEdit {
6421
6485
  const changeTag = page.locator(".sw-bulk-edit-change-field-tags");
6422
6486
  this.changeTagsCheckbox = changeTag.getByRole("checkbox", { name: "Change: Tags" });
6423
6487
  this.changeTypeSelect = changeTag.locator(".sw-bulk-edit-change-type__selection");
6424
- this.enterTagsSelect = changeTag.locator(".sw-entity-multi-select");
6488
+ this.enterTagsSelect = changeTag.locator(".sw-entity-multi-select input");
6425
6489
  const customFields = page.locator(".sw-bulk-edit__custom-fields");
6426
6490
  this.customFieldArrowRightButton = customFields.locator(".sw-tabs__arrow--right");
6427
6491
  this.customFieldCheckbox = customFields.getByRole("checkbox");
@@ -7445,13 +7509,32 @@ const AssignEntitiesToRule = test$f.extend({
7445
7509
  }
7446
7510
  });
7447
7511
 
7512
+ const LoginViaReviewsTab = test$f.extend({
7513
+ LoginViaReviewsTab: async ({ ShopCustomer, DefaultSalesChannel, StorefrontProductDetail }, use) => {
7514
+ const task = (product, customCustomer) => {
7515
+ return async function LoginViaReviewsTab2() {
7516
+ const customer = customCustomer ? customCustomer : DefaultSalesChannel.customer;
7517
+ await ShopCustomer.goesTo(StorefrontProductDetail.url(product));
7518
+ await StorefrontProductDetail.reviewsTab.click();
7519
+ await StorefrontProductDetail.reviewTeaserButton.click();
7520
+ await StorefrontProductDetail.reviewEmailInput.fill(customer.email);
7521
+ await StorefrontProductDetail.reviewPasswordInput.fill(customer.password);
7522
+ await StorefrontProductDetail.reviewLoginButton.click();
7523
+ await ShopCustomer.expects(StorefrontProductDetail.productName).toHaveText(product.name);
7524
+ };
7525
+ };
7526
+ await use(task);
7527
+ }
7528
+ });
7529
+
7448
7530
  const test$4 = mergeTests(
7449
7531
  SaveProduct,
7450
7532
  ExpectNotification,
7451
7533
  CreateLinkTypeCategory,
7452
7534
  BulkEditProducts,
7453
7535
  BulkEditCustomers,
7454
- AssignEntitiesToRule
7536
+ AssignEntitiesToRule,
7537
+ LoginViaReviewsTab
7455
7538
  );
7456
7539
 
7457
7540
  const Login = test$f.extend({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "11.15.3",
3
+ "version": "11.16.0",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",