@shopware-ag/acceptance-test-suite 11.3.0 → 11.3.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/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.mjs +59 -12
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1111,12 +1111,17 @@ declare class Home implements PageObject {
|
|
|
1111
1111
|
readonly consentDialog: Locator;
|
|
1112
1112
|
readonly consentDialogTechnicallyRequiredCheckbox: Locator;
|
|
1113
1113
|
readonly consentDialogStatisticsCheckbox: Locator;
|
|
1114
|
+
/**
|
|
1115
|
+
* @deprecated Use 'consentDialogMarketingCheckbox' instead
|
|
1116
|
+
*/
|
|
1114
1117
|
readonly consentDialogMarketingdCheckbox: Locator;
|
|
1118
|
+
readonly consentDialogMarketingCheckbox: Locator;
|
|
1115
1119
|
readonly consentDialogAcceptAllCookiesButton: Locator;
|
|
1116
1120
|
readonly consentDialogSaveButton: Locator;
|
|
1117
1121
|
readonly consentCookieBannerContainer: Locator;
|
|
1118
1122
|
readonly offcanvasBackdrop: Locator;
|
|
1119
1123
|
constructor(page: Page);
|
|
1124
|
+
getMenuItemByCategoryName(categoryName: string): Promise<Record<string, Locator>>;
|
|
1120
1125
|
getListingItemByProductId(productId: string): Promise<Record<string, Locator>>;
|
|
1121
1126
|
url(): string;
|
|
1122
1127
|
}
|
|
@@ -1293,6 +1298,7 @@ declare class AccountRecover implements PageObject {
|
|
|
1293
1298
|
|
|
1294
1299
|
declare class AccountProfile implements PageObject {
|
|
1295
1300
|
readonly page: Page;
|
|
1301
|
+
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
1296
1302
|
readonly salutationSelect: Locator;
|
|
1297
1303
|
readonly firstNameInput: Locator;
|
|
1298
1304
|
readonly lastNameInput: Locator;
|
|
@@ -1313,7 +1319,7 @@ declare class AccountProfile implements PageObject {
|
|
|
1313
1319
|
readonly emailValidationAlert: Locator;
|
|
1314
1320
|
readonly emailUpdateFailureAlert: Locator;
|
|
1315
1321
|
readonly passwordUpdateFailureAlert: Locator;
|
|
1316
|
-
constructor(page: Page);
|
|
1322
|
+
constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
|
|
1317
1323
|
url(): string;
|
|
1318
1324
|
}
|
|
1319
1325
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1111,12 +1111,17 @@ declare class Home implements PageObject {
|
|
|
1111
1111
|
readonly consentDialog: Locator;
|
|
1112
1112
|
readonly consentDialogTechnicallyRequiredCheckbox: Locator;
|
|
1113
1113
|
readonly consentDialogStatisticsCheckbox: Locator;
|
|
1114
|
+
/**
|
|
1115
|
+
* @deprecated Use 'consentDialogMarketingCheckbox' instead
|
|
1116
|
+
*/
|
|
1114
1117
|
readonly consentDialogMarketingdCheckbox: Locator;
|
|
1118
|
+
readonly consentDialogMarketingCheckbox: Locator;
|
|
1115
1119
|
readonly consentDialogAcceptAllCookiesButton: Locator;
|
|
1116
1120
|
readonly consentDialogSaveButton: Locator;
|
|
1117
1121
|
readonly consentCookieBannerContainer: Locator;
|
|
1118
1122
|
readonly offcanvasBackdrop: Locator;
|
|
1119
1123
|
constructor(page: Page);
|
|
1124
|
+
getMenuItemByCategoryName(categoryName: string): Promise<Record<string, Locator>>;
|
|
1120
1125
|
getListingItemByProductId(productId: string): Promise<Record<string, Locator>>;
|
|
1121
1126
|
url(): string;
|
|
1122
1127
|
}
|
|
@@ -1293,6 +1298,7 @@ declare class AccountRecover implements PageObject {
|
|
|
1293
1298
|
|
|
1294
1299
|
declare class AccountProfile implements PageObject {
|
|
1295
1300
|
readonly page: Page;
|
|
1301
|
+
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
1296
1302
|
readonly salutationSelect: Locator;
|
|
1297
1303
|
readonly firstNameInput: Locator;
|
|
1298
1304
|
readonly lastNameInput: Locator;
|
|
@@ -1313,7 +1319,7 @@ declare class AccountProfile implements PageObject {
|
|
|
1313
1319
|
readonly emailValidationAlert: Locator;
|
|
1314
1320
|
readonly emailUpdateFailureAlert: Locator;
|
|
1315
1321
|
readonly passwordUpdateFailureAlert: Locator;
|
|
1316
|
-
constructor(page: Page);
|
|
1322
|
+
constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
|
|
1317
1323
|
url(): string;
|
|
1318
1324
|
}
|
|
1319
1325
|
|
package/dist/index.mjs
CHANGED
|
@@ -3042,7 +3042,11 @@ class Home {
|
|
|
3042
3042
|
__publicField$P(this, "consentDialog");
|
|
3043
3043
|
__publicField$P(this, "consentDialogTechnicallyRequiredCheckbox");
|
|
3044
3044
|
__publicField$P(this, "consentDialogStatisticsCheckbox");
|
|
3045
|
+
/**
|
|
3046
|
+
* @deprecated Use 'consentDialogMarketingCheckbox' instead
|
|
3047
|
+
*/
|
|
3045
3048
|
__publicField$P(this, "consentDialogMarketingdCheckbox");
|
|
3049
|
+
__publicField$P(this, "consentDialogMarketingCheckbox");
|
|
3046
3050
|
__publicField$P(this, "consentDialogAcceptAllCookiesButton");
|
|
3047
3051
|
__publicField$P(this, "consentDialogSaveButton");
|
|
3048
3052
|
__publicField$P(this, "consentCookieBannerContainer");
|
|
@@ -3062,13 +3066,40 @@ class Home {
|
|
|
3062
3066
|
this.consentCookiePreferences = page.getByLabel("Cookie preferences");
|
|
3063
3067
|
this.consentCookiePermissionContent = page.locator(".cookie-permission-content");
|
|
3064
3068
|
this.consentDialog = page.getByRole("dialog").filter({ hasText: "Cookie preferences" });
|
|
3065
|
-
this.consentDialogTechnicallyRequiredCheckbox = this.consentDialog.getByRole("checkbox", {
|
|
3066
|
-
|
|
3069
|
+
this.consentDialogTechnicallyRequiredCheckbox = this.consentDialog.getByRole("checkbox", {
|
|
3070
|
+
name: "Technically required",
|
|
3071
|
+
exact: true
|
|
3072
|
+
});
|
|
3073
|
+
this.consentDialogStatisticsCheckbox = this.consentDialog.getByRole("checkbox", {
|
|
3074
|
+
name: "Statistics",
|
|
3075
|
+
exact: true
|
|
3076
|
+
});
|
|
3067
3077
|
this.consentDialogMarketingdCheckbox = this.consentDialog.getByRole("checkbox", { name: "Marketing", exact: true });
|
|
3068
|
-
this.
|
|
3069
|
-
this.
|
|
3078
|
+
this.consentDialogMarketingCheckbox = this.consentDialog.getByRole("checkbox", { name: "Marketing", exact: true });
|
|
3079
|
+
this.consentDialogSaveButton = this.consentDialog.getByRole("button", {
|
|
3080
|
+
name: "Save",
|
|
3081
|
+
exact: true
|
|
3082
|
+
});
|
|
3083
|
+
this.consentDialogAcceptAllCookiesButton = this.consentDialog.getByRole("button", {
|
|
3084
|
+
name: "Accept all cookies",
|
|
3085
|
+
exact: true
|
|
3086
|
+
});
|
|
3070
3087
|
this.offcanvasBackdrop = page.locator(".offcanvas-backdrop");
|
|
3071
3088
|
}
|
|
3089
|
+
async getMenuItemByCategoryName(categoryName) {
|
|
3090
|
+
const menuNavigationItem = this.page.locator(".nav-main").getByText(categoryName, { exact: true });
|
|
3091
|
+
const offcanvasNavigationItem = this.page.locator(".js-navigation-offcanvas-initial-content").getByText(categoryName, { exact: true });
|
|
3092
|
+
const breadcrumbNavigationItem = this.page.locator(".cms-breadcrumb").getByText(categoryName, { exact: true });
|
|
3093
|
+
const breadcrumbNavigationLinkItem = this.page.locator(".breadcrumb-item").filter({ has: this.page.getByText(categoryName, { exact: true }) }).getByRole("link");
|
|
3094
|
+
const flyoutCategoryLink = this.page.locator(".nav-main").locator(".navigation-flyout-category-link").getByText(categoryName);
|
|
3095
|
+
return {
|
|
3096
|
+
menuNavigationItem,
|
|
3097
|
+
offcanvasNavigationItem,
|
|
3098
|
+
breadcrumbNavigationItem,
|
|
3099
|
+
breadcrumbNavigationLinkItem,
|
|
3100
|
+
flyoutCategoryLink
|
|
3101
|
+
};
|
|
3102
|
+
}
|
|
3072
3103
|
async getListingItemByProductId(productId) {
|
|
3073
3104
|
const listingItem = this.page.getByRole("listitem").filter({ has: this.page.locator(`[value="${productId}"]`) });
|
|
3074
3105
|
const productImage = listingItem.locator(".product-image-link");
|
|
@@ -3079,7 +3110,9 @@ class Home {
|
|
|
3079
3110
|
const productCheapestPrice = listingItem.locator(".product-cheapest-price");
|
|
3080
3111
|
const productPrice = listingItem.locator(".product-price");
|
|
3081
3112
|
const productName = listingItem.locator(".product-name");
|
|
3082
|
-
const productAddToShoppingCart = listingItem.getByRole("button", {
|
|
3113
|
+
const productAddToShoppingCart = listingItem.getByRole("button", {
|
|
3114
|
+
name: "Add to shopping cart"
|
|
3115
|
+
});
|
|
3083
3116
|
return {
|
|
3084
3117
|
productImage,
|
|
3085
3118
|
productRating,
|
|
@@ -3537,8 +3570,9 @@ var __publicField$E = (obj, key, value) => {
|
|
|
3537
3570
|
return value;
|
|
3538
3571
|
};
|
|
3539
3572
|
class AccountProfile {
|
|
3540
|
-
constructor(page) {
|
|
3573
|
+
constructor(page, instanceMeta) {
|
|
3541
3574
|
this.page = page;
|
|
3575
|
+
this.instanceMeta = instanceMeta;
|
|
3542
3576
|
__publicField$E(this, "salutationSelect");
|
|
3543
3577
|
__publicField$E(this, "firstNameInput");
|
|
3544
3578
|
__publicField$E(this, "lastNameInput");
|
|
@@ -3570,15 +3604,28 @@ class AccountProfile {
|
|
|
3570
3604
|
this.saveEmailAddressButton = page.locator("#profileMailForm").getByRole("button", { name: "Save changes" });
|
|
3571
3605
|
this.changePasswordButton = page.getByRole("button", { name: "Change password" });
|
|
3572
3606
|
this.newPasswordInput = page.locator('input[id="newPassword"]');
|
|
3573
|
-
|
|
3574
|
-
|
|
3607
|
+
if (instanceMeta.features["ACCESSIBILITY_TWEAKS"]) {
|
|
3608
|
+
this.newPasswordConfirmInput = page.locator('input[name="password[newPasswordConfirm]"]');
|
|
3609
|
+
this.currentPasswordInput = page.locator('input[name="password[password]"]');
|
|
3610
|
+
} else {
|
|
3611
|
+
this.newPasswordConfirmInput = page.locator('input[id="passwordConfirmation"]');
|
|
3612
|
+
this.currentPasswordInput = page.locator('input[id="password"]');
|
|
3613
|
+
}
|
|
3575
3614
|
this.saveNewPasswordButton = page.locator("#profilePasswordForm").getByRole("button", { name: "Save changes" });
|
|
3576
3615
|
this.loginDataEmailAddress = page.locator(".account-profile-mail");
|
|
3577
3616
|
this.emailUpdateMessage = page.getByText("Your email address has been updated.");
|
|
3578
3617
|
this.passwordUpdateMessage = page.getByText("Your password has been updated.");
|
|
3579
|
-
|
|
3618
|
+
if (instanceMeta.features["ACCESSIBILITY_TWEAKS"]) {
|
|
3619
|
+
this.emailValidationAlert = page.getByText("Invalid email address.");
|
|
3620
|
+
} else {
|
|
3621
|
+
this.emailValidationAlert = page.locator(".was-validated");
|
|
3622
|
+
}
|
|
3580
3623
|
this.emailUpdateFailureAlert = page.getByText("Email address could not be changed.");
|
|
3581
|
-
|
|
3624
|
+
if (instanceMeta.features["ACCESSIBILITY_TWEAKS"]) {
|
|
3625
|
+
this.passwordUpdateFailureAlert = page.getByText("Input is too short.");
|
|
3626
|
+
} else {
|
|
3627
|
+
this.passwordUpdateFailureAlert = page.getByText("Password could not be changed.");
|
|
3628
|
+
}
|
|
3582
3629
|
}
|
|
3583
3630
|
url() {
|
|
3584
3631
|
return "account/profile";
|
|
@@ -3871,8 +3918,8 @@ const test$6 = test$e.extend({
|
|
|
3871
3918
|
StorefrontAccountRecover: async ({ StorefrontPage }, use) => {
|
|
3872
3919
|
await use(new AccountRecover(StorefrontPage));
|
|
3873
3920
|
},
|
|
3874
|
-
StorefrontAccountProfile: async ({ StorefrontPage }, use) => {
|
|
3875
|
-
await use(new AccountProfile(StorefrontPage));
|
|
3921
|
+
StorefrontAccountProfile: async ({ StorefrontPage, InstanceMeta }, use) => {
|
|
3922
|
+
await use(new AccountProfile(StorefrontPage, InstanceMeta));
|
|
3876
3923
|
},
|
|
3877
3924
|
StorefrontAccountOrder: async ({ StorefrontPage }, use) => {
|
|
3878
3925
|
await use(new AccountOrder(StorefrontPage));
|