@shopware-ag/acceptance-test-suite 11.12.4 → 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 +13 -3
- 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,
|
|
@@ -6884,14 +6885,23 @@ const SaveProduct = test$f.extend({
|
|
|
6884
6885
|
});
|
|
6885
6886
|
|
|
6886
6887
|
const ExpectNotification = test$f.extend({
|
|
6887
|
-
ExpectNotification: async ({ ShopAdmin }, use) => {
|
|
6888
|
+
ExpectNotification: async ({ ShopAdmin, InstanceMeta }, use) => {
|
|
6888
6889
|
const task = (message, close = true) => {
|
|
6889
6890
|
return async function ExpectNotification2() {
|
|
6890
|
-
|
|
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
|
+
}
|
|
6891
6897
|
await ShopAdmin.expects(notification).toBeVisible();
|
|
6892
6898
|
await ShopAdmin.expects(notification).toContainText(message);
|
|
6893
6899
|
if (close) {
|
|
6894
|
-
|
|
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
|
+
}
|
|
6895
6905
|
}
|
|
6896
6906
|
};
|
|
6897
6907
|
};
|