@shopware-ag/acceptance-test-suite 12.18.3 → 12.20.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 +2 -0
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.mjs +34 -6
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -6,4 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
This repository remains the source code for the test suite but all guides, examples, and setup instructions is in the [documentation](https://developer.shopware.com/docs/guides/development/testing/e2e-playwright/)
|
|
8
8
|
|
|
9
|
+
Using an AI coding agent in your project? `npx skills add shopware/acceptance-test-suite` installs a skill for writing tests against this package.
|
|
10
|
+
|
|
9
11
|
Feel free to open [issues](https://github.com/shopware/acceptance-test-suite/issues) or [pull requests](https://github.com/shopware/acceptance-test-suite/pulls) for bugs or improvements related to the test suite code itself.
|
package/dist/index.d.mts
CHANGED
|
@@ -489,7 +489,7 @@ declare class Actor {
|
|
|
489
489
|
a11y_checks(locator: Locator): Promise<void>;
|
|
490
490
|
fillsIn(locator: Locator, input: string): Promise<void>;
|
|
491
491
|
presses(locator: Locator, key?: string): Promise<void>;
|
|
492
|
-
selectsRadioButton(radioGroup: Locator, inputLabel: string): Promise<void>;
|
|
492
|
+
selectsRadioButton(radioGroup: Locator, inputLabel: string, strictMatch?: boolean): Promise<void>;
|
|
493
493
|
attemptsTo(task: () => Promise<void>): Promise<void>;
|
|
494
494
|
goesTo(url: string, forceReload?: boolean): Promise<void>;
|
|
495
495
|
private camelCaseToLowerCase;
|
|
@@ -5511,6 +5511,11 @@ declare class FlowBuilderTemplates extends FlowBuilderListing implements PageObj
|
|
|
5511
5511
|
lineItem: playwright_core.Locator;
|
|
5512
5512
|
templateDetailLink: playwright_core.Locator;
|
|
5513
5513
|
}>;
|
|
5514
|
+
searchLineItemByFlowName(searchTerm: string, flowName: string): Promise<{
|
|
5515
|
+
createFlowLink: playwright_core.Locator;
|
|
5516
|
+
lineItem: playwright_core.Locator;
|
|
5517
|
+
templateDetailLink: playwright_core.Locator;
|
|
5518
|
+
}>;
|
|
5514
5519
|
}
|
|
5515
5520
|
|
|
5516
5521
|
declare class FlowBuilderDetail extends FlowBuilderCreate implements PageObject {
|
package/dist/index.d.ts
CHANGED
|
@@ -489,7 +489,7 @@ declare class Actor {
|
|
|
489
489
|
a11y_checks(locator: Locator): Promise<void>;
|
|
490
490
|
fillsIn(locator: Locator, input: string): Promise<void>;
|
|
491
491
|
presses(locator: Locator, key?: string): Promise<void>;
|
|
492
|
-
selectsRadioButton(radioGroup: Locator, inputLabel: string): Promise<void>;
|
|
492
|
+
selectsRadioButton(radioGroup: Locator, inputLabel: string, strictMatch?: boolean): Promise<void>;
|
|
493
493
|
attemptsTo(task: () => Promise<void>): Promise<void>;
|
|
494
494
|
goesTo(url: string, forceReload?: boolean): Promise<void>;
|
|
495
495
|
private camelCaseToLowerCase;
|
|
@@ -5511,6 +5511,11 @@ declare class FlowBuilderTemplates extends FlowBuilderListing implements PageObj
|
|
|
5511
5511
|
lineItem: playwright_core.Locator;
|
|
5512
5512
|
templateDetailLink: playwright_core.Locator;
|
|
5513
5513
|
}>;
|
|
5514
|
+
searchLineItemByFlowName(searchTerm: string, flowName: string): Promise<{
|
|
5515
|
+
createFlowLink: playwright_core.Locator;
|
|
5516
|
+
lineItem: playwright_core.Locator;
|
|
5517
|
+
templateDetailLink: playwright_core.Locator;
|
|
5518
|
+
}>;
|
|
5514
5519
|
}
|
|
5515
5520
|
|
|
5516
5521
|
declare class FlowBuilderDetail extends FlowBuilderCreate implements PageObject {
|
package/dist/index.mjs
CHANGED
|
@@ -4088,10 +4088,11 @@ class Actor {
|
|
|
4088
4088
|
await locator.press(inputKey);
|
|
4089
4089
|
});
|
|
4090
4090
|
}
|
|
4091
|
-
async selectsRadioButton(radioGroup, inputLabel) {
|
|
4091
|
+
async selectsRadioButton(radioGroup, inputLabel, strictMatch) {
|
|
4092
4092
|
const stepTitle = `${this.name} selects radio button ${inputLabel}`;
|
|
4093
4093
|
await test$e.step(stepTitle, async () => {
|
|
4094
|
-
|
|
4094
|
+
let defaultStrictMatch = false;
|
|
4095
|
+
const desiredOption = radioGroup.getByRole("radio", { name: inputLabel, exact: strictMatch ?? defaultStrictMatch });
|
|
4095
4096
|
if (await desiredOption.isChecked()) {
|
|
4096
4097
|
await this.a11y_checks(desiredOption);
|
|
4097
4098
|
return;
|
|
@@ -9101,9 +9102,14 @@ class FlowBuilderCreate {
|
|
|
9101
9102
|
this.saveButton = page.locator(".sw-flow-detail__save");
|
|
9102
9103
|
this.header = page.locator("h2");
|
|
9103
9104
|
this.smartBarHeader = page.locator(".smart-bar__header");
|
|
9104
|
-
this.generalTab = page.locator(".sw-flow-detail__tab-general");
|
|
9105
9105
|
this.triggerSelectField = page.locator(".sw-flow-detail-flow__trigger-card").getByRole("textbox");
|
|
9106
|
-
|
|
9106
|
+
if (instanceMeta.features["V6_8_0_0"]) {
|
|
9107
|
+
this.generalTab = page.locator('.mt-tabs__item[data-item-name="sw.flow.create.general"]');
|
|
9108
|
+
this.flowTab = page.locator('.mt-tabs__item[data-item-name="sw.flow.create.flow"]');
|
|
9109
|
+
} else {
|
|
9110
|
+
this.generalTab = page.locator(".sw-flow-detail__tab-general");
|
|
9111
|
+
this.flowTab = page.locator(".sw-tabs__content").locator(".sw-flow-detail__tab-flow");
|
|
9112
|
+
}
|
|
9107
9113
|
if (satisfies(instanceMeta.version, "<6.7")) {
|
|
9108
9114
|
this.modalAddButton = page.locator(".sw-button--primary").getByText(translate("administration:flowBuilder:create.addAction"));
|
|
9109
9115
|
} else {
|
|
@@ -9231,6 +9237,21 @@ class FlowBuilderTemplates extends FlowBuilderListing {
|
|
|
9231
9237
|
templateDetailLink
|
|
9232
9238
|
};
|
|
9233
9239
|
}
|
|
9240
|
+
async searchLineItemByFlowName(searchTerm, flowName) {
|
|
9241
|
+
const searchResponse = this.page.waitForResponse((response) => {
|
|
9242
|
+
if (!response.url().includes("/api/search/flow-template") || response.request().method() !== "POST") {
|
|
9243
|
+
return false;
|
|
9244
|
+
}
|
|
9245
|
+
if (!response.ok()) {
|
|
9246
|
+
return false;
|
|
9247
|
+
}
|
|
9248
|
+
const requestData = response.request().postDataJSON();
|
|
9249
|
+
return requestData?.term === searchTerm;
|
|
9250
|
+
});
|
|
9251
|
+
await this.searchBar.fill(searchTerm);
|
|
9252
|
+
await searchResponse;
|
|
9253
|
+
return this.getLineItemByFlowName(flowName);
|
|
9254
|
+
}
|
|
9234
9255
|
}
|
|
9235
9256
|
|
|
9236
9257
|
async function getTooltipText(page, tooltipArea) {
|
|
@@ -9253,7 +9274,13 @@ class FlowBuilderDetail extends FlowBuilderCreate {
|
|
|
9253
9274
|
messageClose;
|
|
9254
9275
|
constructor(page, instanceMeta) {
|
|
9255
9276
|
super(page, instanceMeta);
|
|
9256
|
-
|
|
9277
|
+
if (instanceMeta.features["V6_8_0_0"]) {
|
|
9278
|
+
this.generalTab = page.locator('.mt-tabs__item[data-item-name="sw.flow.detail.general"]');
|
|
9279
|
+
this.flowTab = page.locator('.mt-tabs__item[data-item-name="sw.flow.detail.flow"]');
|
|
9280
|
+
} else {
|
|
9281
|
+
this.generalTab = page.locator(".sw-flow-detail__tab-general");
|
|
9282
|
+
this.flowTab = page.locator(".sw-flow-detail__tab-flow");
|
|
9283
|
+
}
|
|
9257
9284
|
if (satisfies(instanceMeta.version, "<6.7")) {
|
|
9258
9285
|
this.successMessage = page.locator(".sw-alert__title");
|
|
9259
9286
|
this.saveButtonLoader = page.locator(".sw-button--primary").locator(".sw-button_loader");
|
|
@@ -9266,7 +9293,6 @@ class FlowBuilderDetail extends FlowBuilderCreate {
|
|
|
9266
9293
|
this.alertMessage = page.locator(".mt-banner__title");
|
|
9267
9294
|
}
|
|
9268
9295
|
this.saveButton = page.locator(".sw-flow-detail__save");
|
|
9269
|
-
this.flowTab = page.locator(".sw-flow-detail__tab-flow");
|
|
9270
9296
|
this.templateName = page.getByLabel(translate("administration:flowBuilder:detail.name"));
|
|
9271
9297
|
this.actionContentTag = page.locator(".sw-flow-sequence-action__content").locator(".tag");
|
|
9272
9298
|
this.skeletonLoader = page.locator(".sw-skeleton");
|
|
@@ -12233,8 +12259,10 @@ const CreateFlow = test$e.extend({
|
|
|
12233
12259
|
await AdminFlowBuilderCreate.resultListItem.getByRole("listitem").filter({ hasText: `${flowConfig.falseAction}` }).click();
|
|
12234
12260
|
await ShopAdmin.expects(AdminFlowBuilderCreate.tagModal).toBeVisible();
|
|
12235
12261
|
await AdminFlowBuilderCreate.tagModalTagsSelectField.click();
|
|
12262
|
+
await AdminFlowBuilderCreate.tagModalTagsSelectField.fill(flowConfig.falseActionIdentifier);
|
|
12236
12263
|
await ShopAdmin.expects(AdminFlowBuilderCreate.resultList).toBeVisible();
|
|
12237
12264
|
await AdminFlowBuilderCreate.resultListItem.getByRole("listitem").filter({ hasText: `${flowConfig.falseActionIdentifier}` }).click();
|
|
12265
|
+
await AdminFlowBuilderCreate.tagModalTagsSelectField.press("Escape");
|
|
12238
12266
|
await AdminFlowBuilderCreate.modalAddButton.click();
|
|
12239
12267
|
await ShopAdmin.expects(AdminFlowBuilderCreate.falseBlockActionDescription).toContainText(`Tag: ${flowConfig.falseActionIdentifier}`);
|
|
12240
12268
|
await AdminFlowBuilderCreate.saveButton.click();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopware-ag/acceptance-test-suite",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.20.0",
|
|
4
4
|
"description": "Shopware Acceptance Test Suite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fixtures",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@axe-core/playwright": "4.11.1",
|
|
43
|
-
"@shopware/api-client": "1.
|
|
43
|
+
"@shopware/api-client": "1.5.1",
|
|
44
44
|
"axe-html-reporter": "2.2.11",
|
|
45
45
|
"compare-versions": "6.1.1",
|
|
46
46
|
"i18next": "26.3.1",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"uuid": "14.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@playwright/test": "1.
|
|
51
|
+
"@playwright/test": "1.62.1",
|
|
52
52
|
"@types/node": "25.2.0",
|
|
53
53
|
"@types/uuid": "11.0.0",
|
|
54
54
|
"@typescript/native-preview": "7.0.0-dev.20260205.1",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"oxfmt": "0.28.0",
|
|
58
58
|
"oxlint": "1.43.0",
|
|
59
59
|
"oxlint-tsgolint": "0.11.4",
|
|
60
|
-
"playwright-core": "1.
|
|
60
|
+
"playwright-core": "1.62.1",
|
|
61
61
|
"unbuild": "3.6.1"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@playwright/test": "1.
|
|
65
|
-
"playwright-core": "1.
|
|
64
|
+
"@playwright/test": "1.62.1",
|
|
65
|
+
"playwright-core": "1.62.1"
|
|
66
66
|
},
|
|
67
67
|
"peerDependenciesMeta": {
|
|
68
68
|
"playwright-core": {
|