@shopware-ag/acceptance-test-suite 11.1.6 → 11.2.1
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 +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.mjs +32 -20
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -338,6 +338,8 @@ type SalesChannelAnalytics = components['schemas']['SalesChannelAnalytics'] & {
|
|
|
338
338
|
id: string;
|
|
339
339
|
};
|
|
340
340
|
interface RegistrationData {
|
|
341
|
+
isCommercial: boolean;
|
|
342
|
+
isGuest: boolean;
|
|
341
343
|
salutation: string;
|
|
342
344
|
firstName: string;
|
|
343
345
|
lastName: string;
|
|
@@ -1093,6 +1095,8 @@ interface PageObject {
|
|
|
1093
1095
|
|
|
1094
1096
|
declare class Home implements PageObject {
|
|
1095
1097
|
readonly page: Page;
|
|
1098
|
+
readonly accountMenuButton: Locator;
|
|
1099
|
+
readonly closeGuestSessionButton: Locator;
|
|
1096
1100
|
readonly productImages: Locator;
|
|
1097
1101
|
readonly productListItems: Locator;
|
|
1098
1102
|
readonly languagesDropdown: Locator;
|
package/dist/index.d.ts
CHANGED
|
@@ -338,6 +338,8 @@ type SalesChannelAnalytics = components['schemas']['SalesChannelAnalytics'] & {
|
|
|
338
338
|
id: string;
|
|
339
339
|
};
|
|
340
340
|
interface RegistrationData {
|
|
341
|
+
isCommercial: boolean;
|
|
342
|
+
isGuest: boolean;
|
|
341
343
|
salutation: string;
|
|
342
344
|
firstName: string;
|
|
343
345
|
lastName: string;
|
|
@@ -1093,6 +1095,8 @@ interface PageObject {
|
|
|
1093
1095
|
|
|
1094
1096
|
declare class Home implements PageObject {
|
|
1095
1097
|
readonly page: Page;
|
|
1098
|
+
readonly accountMenuButton: Locator;
|
|
1099
|
+
readonly closeGuestSessionButton: Locator;
|
|
1096
1100
|
readonly productImages: Locator;
|
|
1097
1101
|
readonly productListItems: Locator;
|
|
1098
1102
|
readonly languagesDropdown: Locator;
|
package/dist/index.mjs
CHANGED
|
@@ -3026,6 +3026,8 @@ var __publicField$O = (obj, key, value) => {
|
|
|
3026
3026
|
class Home {
|
|
3027
3027
|
constructor(page) {
|
|
3028
3028
|
this.page = page;
|
|
3029
|
+
__publicField$O(this, "accountMenuButton");
|
|
3030
|
+
__publicField$O(this, "closeGuestSessionButton");
|
|
3029
3031
|
__publicField$O(this, "productImages");
|
|
3030
3032
|
__publicField$O(this, "productListItems");
|
|
3031
3033
|
__publicField$O(this, "languagesDropdown");
|
|
@@ -3045,6 +3047,8 @@ class Home {
|
|
|
3045
3047
|
__publicField$O(this, "consentDialogSaveButton");
|
|
3046
3048
|
__publicField$O(this, "consentCookieBannerContainer");
|
|
3047
3049
|
__publicField$O(this, "offcanvasBackdrop");
|
|
3050
|
+
this.accountMenuButton = page.getByLabel("Your account");
|
|
3051
|
+
this.closeGuestSessionButton = page.locator(".account-aside-btn");
|
|
3048
3052
|
this.productImages = page.locator(".product-image-wrapper");
|
|
3049
3053
|
this.productListItems = page.getByRole("listitem");
|
|
3050
3054
|
this.languagesDropdown = page.locator(".top-bar-language").filter({ has: page.getByRole("button") });
|
|
@@ -6463,10 +6467,12 @@ const Register = test$e.extend({
|
|
|
6463
6467
|
Register: async ({ StorefrontAccountLogin, AdminApiContext: AdminApiContext2, IdProvider }, use) => {
|
|
6464
6468
|
let registeredEmail = "";
|
|
6465
6469
|
const defaultRegistrationData = {
|
|
6470
|
+
isCommercial: false,
|
|
6471
|
+
isGuest: false,
|
|
6466
6472
|
salutation: "Mr.",
|
|
6467
6473
|
firstName: "Jeff",
|
|
6468
6474
|
lastName: "Goldblum",
|
|
6469
|
-
email: IdProvider.getIdPair().uuid
|
|
6475
|
+
email: `${IdProvider.getIdPair().uuid}@test.com`,
|
|
6470
6476
|
password: "shopware",
|
|
6471
6477
|
street: "Ebbinghof 10",
|
|
6472
6478
|
city: "Sch\xF6ppingen",
|
|
@@ -6476,20 +6482,22 @@ const Register = test$e.extend({
|
|
|
6476
6482
|
department: "Operations",
|
|
6477
6483
|
vatRegNo: "DE1234567890"
|
|
6478
6484
|
};
|
|
6479
|
-
const
|
|
6480
|
-
return async function() {
|
|
6485
|
+
const task = (overrides, isCommercial) => {
|
|
6486
|
+
return async function Register2() {
|
|
6481
6487
|
const registrationData = { ...defaultRegistrationData, ...overrides };
|
|
6482
6488
|
registeredEmail = registrationData.email;
|
|
6483
6489
|
await StorefrontAccountLogin.salutationSelect.selectOption(registrationData.salutation);
|
|
6484
6490
|
await StorefrontAccountLogin.firstNameInput.fill(registrationData.firstName);
|
|
6485
6491
|
await StorefrontAccountLogin.lastNameInput.fill(registrationData.lastName);
|
|
6486
|
-
if (isCommercial) {
|
|
6492
|
+
if (registrationData.isCommercial || isCommercial) {
|
|
6487
6493
|
await StorefrontAccountLogin.companyInput.fill(registrationData.company);
|
|
6488
6494
|
await StorefrontAccountLogin.departmentInput.fill(registrationData.department);
|
|
6489
6495
|
await StorefrontAccountLogin.vatRegNoInput.fill(registrationData.vatRegNo);
|
|
6490
6496
|
}
|
|
6491
6497
|
await StorefrontAccountLogin.registerEmailInput.fill(registrationData.email);
|
|
6492
|
-
|
|
6498
|
+
if (!registrationData.isGuest) {
|
|
6499
|
+
await StorefrontAccountLogin.registerPasswordInput.fill(registrationData.password);
|
|
6500
|
+
}
|
|
6493
6501
|
await StorefrontAccountLogin.streetAddressInput.fill(registrationData.street);
|
|
6494
6502
|
await StorefrontAccountLogin.postalCodeInput.fill(registrationData.postalCode);
|
|
6495
6503
|
await StorefrontAccountLogin.cityInput.fill(registrationData.city);
|
|
@@ -6497,28 +6505,32 @@ const Register = test$e.extend({
|
|
|
6497
6505
|
await StorefrontAccountLogin.registerButton.click();
|
|
6498
6506
|
};
|
|
6499
6507
|
};
|
|
6500
|
-
await use(
|
|
6508
|
+
await use(task);
|
|
6501
6509
|
await deleteRegisteredUser(AdminApiContext2, registeredEmail);
|
|
6502
6510
|
}
|
|
6503
6511
|
});
|
|
6504
6512
|
async function deleteRegisteredUser(adminApiContext, email) {
|
|
6505
6513
|
if (!email)
|
|
6506
6514
|
return;
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6515
|
+
try {
|
|
6516
|
+
const response = await adminApiContext.post("search/customer", {
|
|
6517
|
+
data: {
|
|
6518
|
+
limit: 1,
|
|
6519
|
+
filter: [
|
|
6520
|
+
{
|
|
6521
|
+
type: "equals",
|
|
6522
|
+
field: "email",
|
|
6523
|
+
value: email
|
|
6524
|
+
}
|
|
6525
|
+
]
|
|
6526
|
+
}
|
|
6527
|
+
});
|
|
6528
|
+
const { data: customers } = await response.json();
|
|
6529
|
+
for (const customer of customers) {
|
|
6530
|
+
await adminApiContext.delete(`customer/${customer.id}`);
|
|
6517
6531
|
}
|
|
6518
|
-
})
|
|
6519
|
-
|
|
6520
|
-
for (const customer of customers) {
|
|
6521
|
-
await adminApiContext.delete(`customer/${customer.id}`);
|
|
6532
|
+
} catch (error) {
|
|
6533
|
+
console.error(`Error deleting user with email ${email}:`, error);
|
|
6522
6534
|
}
|
|
6523
6535
|
}
|
|
6524
6536
|
|