@shopware-ag/acceptance-test-suite 11.9.1 → 11.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -9
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.mjs +14 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -469,18 +469,30 @@ The most important part is [test isolation](https://playwright.dev/docs/best-pra
|
|
|
469
469
|
## Running Tests in the Test Suite
|
|
470
470
|
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.
|
|
471
471
|
|
|
472
|
-
|
|
473
|
-
```
|
|
474
|
-
docker compose up -d shopware
|
|
475
|
-
```
|
|
472
|
+
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.
|
|
476
473
|
|
|
477
|
-
|
|
474
|
+
In order to select an image, export the corresponding tag as `SHOPWARE_VERSION` and start the containers:
|
|
475
|
+
|
|
476
|
+
```bash
|
|
477
|
+
SHOPWARE_VERSION=trunk docker compose up --wait shopware
|
|
478
478
|
```
|
|
479
|
-
|
|
479
|
+
|
|
480
|
+
<details>
|
|
481
|
+
<summary>ℹ️ What if the version I'd like to test is not available as a pre-built image?</summary>
|
|
482
|
+
|
|
483
|
+
If you want to test with an image that's not available already, you can build it yourself by exporting a few more variables:
|
|
484
|
+
|
|
485
|
+
```bash
|
|
486
|
+
export PHP_VERSION="8.3" # PHP version of the base image
|
|
487
|
+
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
|
|
488
|
+
export SHOPWARE_BUILD_SOURCE="tag" # Either "branch" or "tag"
|
|
489
|
+
|
|
490
|
+
docker compose up --attach-dependencies shopware # This will build the image if it's not available
|
|
480
491
|
```
|
|
492
|
+
</details>
|
|
481
493
|
|
|
482
|
-
|
|
494
|
+
Afterwards you can execute the normal playwright commands:
|
|
483
495
|
|
|
496
|
+
```bash
|
|
497
|
+
npx playwright test --ui
|
|
484
498
|
```
|
|
485
|
-
npx playwright test
|
|
486
|
-
```
|
package/dist/index.d.mts
CHANGED
|
@@ -1941,13 +1941,14 @@ declare class FlowBuilderDetail implements PageObject {
|
|
|
1941
1941
|
|
|
1942
1942
|
declare class DataSharing implements PageObject {
|
|
1943
1943
|
readonly page: Page;
|
|
1944
|
+
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
1944
1945
|
readonly dataConsentHeadline: Locator;
|
|
1945
1946
|
readonly dataSharingSuccessMessageLabel: Locator;
|
|
1946
1947
|
readonly dataSharingAgreeButton: Locator;
|
|
1947
1948
|
readonly dataSharingDisableButton: Locator;
|
|
1948
1949
|
readonly dataSharingTermsAgreementLabel: Locator;
|
|
1949
|
-
constructor(page: Page);
|
|
1950
|
-
url():
|
|
1950
|
+
constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
|
|
1951
|
+
url(): "#/sw/settings/usage/data/index" | "#/sw/settings/usage/data/index/general";
|
|
1951
1952
|
}
|
|
1952
1953
|
|
|
1953
1954
|
declare class Dashboard implements PageObject {
|
package/dist/index.d.ts
CHANGED
|
@@ -1941,13 +1941,14 @@ declare class FlowBuilderDetail implements PageObject {
|
|
|
1941
1941
|
|
|
1942
1942
|
declare class DataSharing implements PageObject {
|
|
1943
1943
|
readonly page: Page;
|
|
1944
|
+
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
1944
1945
|
readonly dataConsentHeadline: Locator;
|
|
1945
1946
|
readonly dataSharingSuccessMessageLabel: Locator;
|
|
1946
1947
|
readonly dataSharingAgreeButton: Locator;
|
|
1947
1948
|
readonly dataSharingDisableButton: Locator;
|
|
1948
1949
|
readonly dataSharingTermsAgreementLabel: Locator;
|
|
1949
|
-
constructor(page: Page);
|
|
1950
|
-
url():
|
|
1950
|
+
constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
|
|
1951
|
+
url(): "#/sw/settings/usage/data/index" | "#/sw/settings/usage/data/index/general";
|
|
1951
1952
|
}
|
|
1952
1953
|
|
|
1953
1954
|
declare class Dashboard implements PageObject {
|
package/dist/index.mjs
CHANGED
|
@@ -3223,7 +3223,7 @@ const test$8 = test$f.extend({
|
|
|
3223
3223
|
expect(response.ok(), "/_info/config request failed").toBeTruthy();
|
|
3224
3224
|
const config = await response.json();
|
|
3225
3225
|
const features = {};
|
|
3226
|
-
if (satisfies(config.version, ">=6.6.
|
|
3226
|
+
if (satisfies(config.version, ">=6.6.1.0")) {
|
|
3227
3227
|
const featuresResponse = await context.get("./_action/feature-flag");
|
|
3228
3228
|
expect(featuresResponse.ok(), "/_action/feature-flag request failed").toBeTruthy();
|
|
3229
3229
|
const data = await featuresResponse.json();
|
|
@@ -4973,7 +4973,7 @@ class FirstRunWizard {
|
|
|
4973
4973
|
this.smtpServerHostInput = page.getByLabel("Host");
|
|
4974
4974
|
this.smtpServerPortInput = page.getByLabel("Port");
|
|
4975
4975
|
this.smtpServerUsernameInput = page.getByLabel("Username");
|
|
4976
|
-
this.smtpServerPasswordInput = page.getByLabel("Password");
|
|
4976
|
+
this.smtpServerPasswordInput = page.getByLabel("Password", { exact: true });
|
|
4977
4977
|
this.smtpServerEncryptionInput = page.locator(".sw-single-select__selection-input");
|
|
4978
4978
|
this.smtpServerSenderAddressInput = page.getByLabel("Sender address");
|
|
4979
4979
|
this.smtpServerDeliveryAddressInput = page.getByLabel("Delivery address");
|
|
@@ -5113,20 +5113,28 @@ var __publicField$l = (obj, key, value) => {
|
|
|
5113
5113
|
return value;
|
|
5114
5114
|
};
|
|
5115
5115
|
class DataSharing {
|
|
5116
|
-
constructor(page) {
|
|
5116
|
+
constructor(page, instanceMeta) {
|
|
5117
5117
|
this.page = page;
|
|
5118
|
+
this.instanceMeta = instanceMeta;
|
|
5118
5119
|
__publicField$l(this, "dataConsentHeadline");
|
|
5119
5120
|
__publicField$l(this, "dataSharingSuccessMessageLabel");
|
|
5120
5121
|
__publicField$l(this, "dataSharingAgreeButton");
|
|
5121
5122
|
__publicField$l(this, "dataSharingDisableButton");
|
|
5122
5123
|
__publicField$l(this, "dataSharingTermsAgreementLabel");
|
|
5123
|
-
|
|
5124
|
+
if (satisfies(instanceMeta.version, "<6.6.1")) {
|
|
5125
|
+
this.dataConsentHeadline = page.locator("header.sw-usage-data-consent-banner__title");
|
|
5126
|
+
} else {
|
|
5127
|
+
this.dataConsentHeadline = page.locator("h3.sw-usage-data-consent-banner__content-headline");
|
|
5128
|
+
}
|
|
5124
5129
|
this.dataSharingAgreeButton = page.getByRole("button", { name: "Agree" });
|
|
5125
5130
|
this.dataSharingDisableButton = page.getByRole("button", { name: "Disable data sharing" });
|
|
5126
5131
|
this.dataSharingSuccessMessageLabel = page.getByText("You are sharing data with us", { exact: true });
|
|
5127
5132
|
this.dataSharingTermsAgreementLabel = page.getByText('By clicking "Agree", you confirm that you are authorized to enter into this agreement on behalf of your company.');
|
|
5128
5133
|
}
|
|
5129
5134
|
url() {
|
|
5135
|
+
if (satisfies(this.instanceMeta.version, "<6.6.1")) {
|
|
5136
|
+
return "#/sw/settings/usage/data/index";
|
|
5137
|
+
}
|
|
5130
5138
|
return "#/sw/settings/usage/data/index/general";
|
|
5131
5139
|
}
|
|
5132
5140
|
}
|
|
@@ -6161,8 +6169,8 @@ const test$6 = test$f.extend({
|
|
|
6161
6169
|
AdminFlowBuilderDetail: async ({ AdminPage }, use) => {
|
|
6162
6170
|
await use(new FlowBuilderDetail(AdminPage));
|
|
6163
6171
|
},
|
|
6164
|
-
AdminDataSharing: async ({ AdminPage }, use) => {
|
|
6165
|
-
await use(new DataSharing(AdminPage));
|
|
6172
|
+
AdminDataSharing: async ({ AdminPage, InstanceMeta }, use) => {
|
|
6173
|
+
await use(new DataSharing(AdminPage, InstanceMeta));
|
|
6166
6174
|
},
|
|
6167
6175
|
AdminDashboard: async ({ AdminPage }, use) => {
|
|
6168
6176
|
await use(new Dashboard(AdminPage));
|