@shopware-ag/acceptance-test-suite 11.12.3 → 11.12.5
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 +1 -0
- package/dist/index.mjs +14 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,6 +17,7 @@ This test suite is an extension to [Playwright](https://playwright.dev/) to easi
|
|
|
17
17
|
* [Test Data Service](#test-data-service)
|
|
18
18
|
* [Code Contribution](#code-contribution)
|
|
19
19
|
* [Best practices](#best-practices)
|
|
20
|
+
* [Running Tests in the Test Suite](#running-tests-in-the-test-suite)
|
|
20
21
|
|
|
21
22
|
## Installation
|
|
22
23
|
Start by creating your own [Playwright](https://playwright.dev/docs/intro) project.
|
package/dist/index.mjs
CHANGED
|
@@ -3351,6 +3351,7 @@ class Home {
|
|
|
3351
3351
|
const flyoutCategoryLink = this.page.locator(".nav-main").locator(".navigation-flyout-category-link").getByText(categoryName);
|
|
3352
3352
|
return {
|
|
3353
3353
|
menuNavigationItem,
|
|
3354
|
+
/** @deprecated - Remove, because it is obsolete. */
|
|
3354
3355
|
offcanvasNavigationItem,
|
|
3355
3356
|
breadcrumbNavigationItem,
|
|
3356
3357
|
breadcrumbNavigationLinkItem,
|
|
@@ -5479,11 +5480,7 @@ class Categories {
|
|
|
5479
5480
|
this.categoryTypeSelectionList = page.locator(".sw-select").filter({ hasText: "Category type" }).locator(".sw-select__selection");
|
|
5480
5481
|
this.linkTypeSelectionList = page.locator(".sw-select").filter({ hasText: "Link type" }).locator(".sw-select__selection");
|
|
5481
5482
|
this.entitySelectionList = page.locator(".sw-select").filter({ hasText: "Entity" }).locator(".sw-select__selection");
|
|
5482
|
-
|
|
5483
|
-
this.categorySelectionList = page.locator(".sw-category-link-settings__selection-category");
|
|
5484
|
-
} else {
|
|
5485
|
-
this.categorySelectionList = page.locator(".sw-category-tree__input-field");
|
|
5486
|
-
}
|
|
5483
|
+
this.categorySelectionList = page.locator(".sw-category-link-settings__selection-category").locator(".sw-block-field__block");
|
|
5487
5484
|
this.categorySelectionListWrapper = page.locator(".sw-category-tree-field__main-wrapper");
|
|
5488
5485
|
this.productSelectionList = page.locator(".sw-category-link-settings__selection-product");
|
|
5489
5486
|
this.productSelectionInput = this.productSelectionList.locator(".sw-entity-single-select__selection-input");
|
|
@@ -6888,14 +6885,23 @@ const SaveProduct = test$f.extend({
|
|
|
6888
6885
|
});
|
|
6889
6886
|
|
|
6890
6887
|
const ExpectNotification = test$f.extend({
|
|
6891
|
-
ExpectNotification: async ({ ShopAdmin }, use) => {
|
|
6888
|
+
ExpectNotification: async ({ ShopAdmin, InstanceMeta }, use) => {
|
|
6892
6889
|
const task = (message, close = true) => {
|
|
6893
6890
|
return async function ExpectNotification2() {
|
|
6894
|
-
|
|
6891
|
+
let notification;
|
|
6892
|
+
if (satisfies(InstanceMeta.version, "<6.7")) {
|
|
6893
|
+
notification = ShopAdmin.page.locator(".sw-alert", { hasText: message });
|
|
6894
|
+
} else {
|
|
6895
|
+
notification = ShopAdmin.page.locator(".sw-notification__alert", { hasText: message });
|
|
6896
|
+
}
|
|
6895
6897
|
await ShopAdmin.expects(notification).toBeVisible();
|
|
6896
6898
|
await ShopAdmin.expects(notification).toContainText(message);
|
|
6897
6899
|
if (close) {
|
|
6898
|
-
|
|
6900
|
+
if (satisfies(InstanceMeta.version, "<6.7")) {
|
|
6901
|
+
await notification.locator(".sw-alert__close").click();
|
|
6902
|
+
} else {
|
|
6903
|
+
await notification.locator(".mt-banner__close").click();
|
|
6904
|
+
}
|
|
6899
6905
|
}
|
|
6900
6906
|
};
|
|
6901
6907
|
};
|