@shopware-ag/acceptance-test-suite 11.6.0 → 11.6.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 CHANGED
@@ -202,6 +202,18 @@ type Customer = Omit<components['schemas']['Customer'], 'defaultShippingAddress'
202
202
  type CustomerAddress = components['schemas']['CustomerAddress'] & {
203
203
  id: string;
204
204
  };
205
+ interface Address {
206
+ salutation: string;
207
+ firstName: string;
208
+ lastName: string;
209
+ company: string;
210
+ department: string;
211
+ street: string;
212
+ city: string;
213
+ zipCode: string;
214
+ country: string;
215
+ state: string;
216
+ }
205
217
  type Salutation = components['schemas']['Salutation'] & {
206
218
  id: string;
207
219
  };
@@ -265,8 +277,14 @@ type Rule = components['schemas']['Rule'] & {
265
277
  type Currency$1 = components['schemas']['Currency'] & {
266
278
  id: string;
267
279
  };
268
- type Country = components['schemas']['Country'] & {
280
+ type Country = Omit<components['schemas']['Country'], 'states'> & {
269
281
  id: string;
282
+ states: [
283
+ {
284
+ name: string;
285
+ shortCode: string;
286
+ }
287
+ ];
270
288
  };
271
289
  type SystemConfig = components['schemas']['SystemConfig'] & {
272
290
  id: string;
@@ -863,6 +881,13 @@ declare class TestDataService {
863
881
  * @param addressId - The uuid of the customer address.
864
882
  */
865
883
  getCustomerAddress(addressId: string): Promise<CustomerAddress>;
884
+ /**
885
+ * Retrieves a customer by its email address.
886
+ *
887
+ * @param email - The email address of the customer.
888
+ * @returns The customer object.
889
+ */
890
+ getCustomerByEmail(email: string): Promise<Customer>;
866
891
  /**
867
892
  * Retrieves a customer salutations by its key.
868
893
  *
@@ -1158,7 +1183,11 @@ declare class Home implements PageObject {
1158
1183
  readonly contactFormLink: Locator;
1159
1184
  constructor(page: Page);
1160
1185
  getMenuItemByCategoryName(categoryName: string): Promise<Record<string, Locator>>;
1186
+ /**
1187
+ * @deprecated - use getListingItemByProductName instead
1188
+ */
1161
1189
  getListingItemByProductId(productId: string): Promise<Record<string, Locator>>;
1190
+ getListingItemByProductName(productListingName: string): Promise<Record<string, Locator>>;
1162
1191
  url(): string;
1163
1192
  }
1164
1193
 
@@ -1283,6 +1312,8 @@ declare class Account implements PageObject {
1283
1312
  readonly newsletterCheckbox: Locator;
1284
1313
  readonly newsletterRegistrationSuccessMessage: Locator;
1285
1314
  readonly customerGroupRequestMessage: Locator;
1315
+ readonly cannotDeliverToCountryAlert: Locator;
1316
+ readonly shippingToAddressNotPossibleAlert: Locator;
1286
1317
  constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
1287
1318
  getCustomerGroupAlert(customerGroup: string): Promise<Locator>;
1288
1319
  url(): string;
@@ -1319,7 +1350,18 @@ declare class AccountLogin implements PageObject {
1319
1350
  readonly greCaptchaV3Input: Locator;
1320
1351
  readonly greCaptchaProtectionInformation: Locator;
1321
1352
  readonly greCaptchaBadge: Locator;
1353
+ readonly differentShippingAddressCheckbox: Locator;
1354
+ readonly registerShippingAddressFormArea: Locator;
1355
+ readonly shippingAddressSalutationSelect: Locator;
1356
+ readonly shippingAddressFirstNameInput: Locator;
1357
+ readonly shippingAddressLastNameInput: Locator;
1358
+ readonly shippingAddressStreetAddressInput: Locator;
1359
+ readonly shippingAddressCityInput: Locator;
1360
+ readonly shippingAddressCountryInput: Locator;
1361
+ readonly shippingAddressPostalCodeInput: Locator;
1362
+ readonly shippingAddressStateInput: Locator;
1322
1363
  constructor(page: Page);
1364
+ getShippingCountryLocatorByName(countryName: string): Promise<Locator>;
1323
1365
  url(): string;
1324
1366
  }
1325
1367
 
@@ -1382,12 +1424,18 @@ declare class AccountOrder implements PageObject {
1382
1424
 
1383
1425
  declare class AccountAddresses implements PageObject {
1384
1426
  readonly page: Page;
1427
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
1385
1428
  readonly addNewAddressButton: Locator;
1386
1429
  readonly editBillingAddressButton: Locator;
1387
1430
  readonly editShippingAddressButton: Locator;
1388
1431
  readonly useDefaultBillingAddressButton: Locator;
1389
1432
  readonly useDefaultShippingAddressButton: Locator;
1390
- constructor(page: Page);
1433
+ readonly deliveryNotPossibleAlert: Locator | undefined;
1434
+ readonly availableAddresses: Locator | undefined;
1435
+ readonly addressDropdownButton: Locator | undefined;
1436
+ readonly availableAddressesUseAsBillingAddress: Locator | undefined;
1437
+ readonly availableAddressesUseAsShippingAddress: Locator | undefined;
1438
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
1391
1439
  url(): string;
1392
1440
  }
1393
1441
 
@@ -1471,6 +1519,7 @@ declare class AccountAddressCreate implements PageObject {
1471
1519
  readonly cityInput: Locator;
1472
1520
  readonly countryDropdown: Locator;
1473
1521
  readonly saveAddressButton: Locator;
1522
+ readonly stateDropdown: Locator;
1474
1523
  constructor(page: Page);
1475
1524
  url(): string;
1476
1525
  }
@@ -1487,8 +1536,16 @@ declare class PageNotFound implements PageObject {
1487
1536
 
1488
1537
  declare class ContactForm extends Home implements PageObject {
1489
1538
  readonly page: Page;
1539
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
1540
+ /**
1541
+ * @deprecated Compatible until 6.6.x, will be removed in 6.8.x, use 'contactWrapper' instead
1542
+ */
1490
1543
  readonly contactModal: Locator;
1491
- readonly contactSuccessModal: Locator;
1544
+ /**
1545
+ * @deprecated Compatible until 6.6.x, will be removed in 6.8.x, use 'contactSuccessMessage' instead
1546
+ */
1547
+ readonly contactSuccessModal: Locator | undefined;
1548
+ readonly contactWrapper: Locator;
1492
1549
  readonly salutationSelect: Locator;
1493
1550
  readonly firstNameInput: Locator;
1494
1551
  readonly lastNameInput: Locator;
@@ -1500,6 +1557,8 @@ declare class ContactForm extends Home implements PageObject {
1500
1557
  readonly submitButton: Locator;
1501
1558
  readonly contactSuccessMessage: Locator;
1502
1559
  readonly cardTitle: Locator;
1560
+ readonly formFieldFeedback: Locator | undefined;
1561
+ readonly formAlert: Locator | undefined;
1503
1562
  /**
1504
1563
  * Captcha locators
1505
1564
  */
@@ -1510,7 +1569,7 @@ declare class ContactForm extends Home implements PageObject {
1510
1569
  readonly greCaptchaV2Container: Locator;
1511
1570
  readonly greCaptchaV2Input: Locator;
1512
1571
  readonly greCaptchaProtectionInformation: Locator;
1513
- constructor(page: Page);
1572
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
1514
1573
  url(): string;
1515
1574
  }
1516
1575
 
@@ -2399,6 +2458,8 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
2399
2458
  RegisterGuest: Task;
2400
2459
  } & {
2401
2460
  ChangeStorefrontCurrency: Task;
2461
+ } & {
2462
+ AddNewAddress: Task;
2402
2463
  } & {
2403
2464
  AddProductToCart: Task;
2404
2465
  } & {
@@ -2431,4 +2492,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
2431
2492
  ValidateAccessibility: (pageName: string, assertViolations?: number | boolean | undefined, createReport?: boolean | undefined, ruleTags?: string[] | undefined, outputDir?: string | undefined) => () => Promise<axe_core.Result[]>;
2432
2493
  }, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
2433
2494
 
2434
- export { type AccountData, AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CategoryCustomizableLinkData, type CategoryData, type CmsPage, type Country, type CreatedRecord, type Currency$1 as Currency, type CustomField, type CustomFieldData, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Language$1 as Language, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod, type Price, type Product, type ProductCrossSelling, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type Rule, type RuleAssignmentEntity, RuleType, type SalesChannel, type SalesChannelAnalytics, type SalesChannelDomain, type SalesChannelRecord, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type TagData, type Task, type Tax, type TaxRules, TestDataService, type VariantListingConfig, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
2495
+ export { type AccountData, type Address, AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CategoryCustomizableLinkData, type CategoryData, type CmsPage, type Country, type CreatedRecord, type Currency$1 as Currency, type CustomField, type CustomFieldData, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Language$1 as Language, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod, type Price, type Product, type ProductCrossSelling, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type Rule, type RuleAssignmentEntity, RuleType, type SalesChannel, type SalesChannelAnalytics, type SalesChannelDomain, type SalesChannelRecord, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type TagData, type Task, type Tax, type TaxRules, TestDataService, type VariantListingConfig, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
package/dist/index.d.ts CHANGED
@@ -202,6 +202,18 @@ type Customer = Omit<components['schemas']['Customer'], 'defaultShippingAddress'
202
202
  type CustomerAddress = components['schemas']['CustomerAddress'] & {
203
203
  id: string;
204
204
  };
205
+ interface Address {
206
+ salutation: string;
207
+ firstName: string;
208
+ lastName: string;
209
+ company: string;
210
+ department: string;
211
+ street: string;
212
+ city: string;
213
+ zipCode: string;
214
+ country: string;
215
+ state: string;
216
+ }
205
217
  type Salutation = components['schemas']['Salutation'] & {
206
218
  id: string;
207
219
  };
@@ -265,8 +277,14 @@ type Rule = components['schemas']['Rule'] & {
265
277
  type Currency$1 = components['schemas']['Currency'] & {
266
278
  id: string;
267
279
  };
268
- type Country = components['schemas']['Country'] & {
280
+ type Country = Omit<components['schemas']['Country'], 'states'> & {
269
281
  id: string;
282
+ states: [
283
+ {
284
+ name: string;
285
+ shortCode: string;
286
+ }
287
+ ];
270
288
  };
271
289
  type SystemConfig = components['schemas']['SystemConfig'] & {
272
290
  id: string;
@@ -863,6 +881,13 @@ declare class TestDataService {
863
881
  * @param addressId - The uuid of the customer address.
864
882
  */
865
883
  getCustomerAddress(addressId: string): Promise<CustomerAddress>;
884
+ /**
885
+ * Retrieves a customer by its email address.
886
+ *
887
+ * @param email - The email address of the customer.
888
+ * @returns The customer object.
889
+ */
890
+ getCustomerByEmail(email: string): Promise<Customer>;
866
891
  /**
867
892
  * Retrieves a customer salutations by its key.
868
893
  *
@@ -1158,7 +1183,11 @@ declare class Home implements PageObject {
1158
1183
  readonly contactFormLink: Locator;
1159
1184
  constructor(page: Page);
1160
1185
  getMenuItemByCategoryName(categoryName: string): Promise<Record<string, Locator>>;
1186
+ /**
1187
+ * @deprecated - use getListingItemByProductName instead
1188
+ */
1161
1189
  getListingItemByProductId(productId: string): Promise<Record<string, Locator>>;
1190
+ getListingItemByProductName(productListingName: string): Promise<Record<string, Locator>>;
1162
1191
  url(): string;
1163
1192
  }
1164
1193
 
@@ -1283,6 +1312,8 @@ declare class Account implements PageObject {
1283
1312
  readonly newsletterCheckbox: Locator;
1284
1313
  readonly newsletterRegistrationSuccessMessage: Locator;
1285
1314
  readonly customerGroupRequestMessage: Locator;
1315
+ readonly cannotDeliverToCountryAlert: Locator;
1316
+ readonly shippingToAddressNotPossibleAlert: Locator;
1286
1317
  constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
1287
1318
  getCustomerGroupAlert(customerGroup: string): Promise<Locator>;
1288
1319
  url(): string;
@@ -1319,7 +1350,18 @@ declare class AccountLogin implements PageObject {
1319
1350
  readonly greCaptchaV3Input: Locator;
1320
1351
  readonly greCaptchaProtectionInformation: Locator;
1321
1352
  readonly greCaptchaBadge: Locator;
1353
+ readonly differentShippingAddressCheckbox: Locator;
1354
+ readonly registerShippingAddressFormArea: Locator;
1355
+ readonly shippingAddressSalutationSelect: Locator;
1356
+ readonly shippingAddressFirstNameInput: Locator;
1357
+ readonly shippingAddressLastNameInput: Locator;
1358
+ readonly shippingAddressStreetAddressInput: Locator;
1359
+ readonly shippingAddressCityInput: Locator;
1360
+ readonly shippingAddressCountryInput: Locator;
1361
+ readonly shippingAddressPostalCodeInput: Locator;
1362
+ readonly shippingAddressStateInput: Locator;
1322
1363
  constructor(page: Page);
1364
+ getShippingCountryLocatorByName(countryName: string): Promise<Locator>;
1323
1365
  url(): string;
1324
1366
  }
1325
1367
 
@@ -1382,12 +1424,18 @@ declare class AccountOrder implements PageObject {
1382
1424
 
1383
1425
  declare class AccountAddresses implements PageObject {
1384
1426
  readonly page: Page;
1427
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
1385
1428
  readonly addNewAddressButton: Locator;
1386
1429
  readonly editBillingAddressButton: Locator;
1387
1430
  readonly editShippingAddressButton: Locator;
1388
1431
  readonly useDefaultBillingAddressButton: Locator;
1389
1432
  readonly useDefaultShippingAddressButton: Locator;
1390
- constructor(page: Page);
1433
+ readonly deliveryNotPossibleAlert: Locator | undefined;
1434
+ readonly availableAddresses: Locator | undefined;
1435
+ readonly addressDropdownButton: Locator | undefined;
1436
+ readonly availableAddressesUseAsBillingAddress: Locator | undefined;
1437
+ readonly availableAddressesUseAsShippingAddress: Locator | undefined;
1438
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
1391
1439
  url(): string;
1392
1440
  }
1393
1441
 
@@ -1471,6 +1519,7 @@ declare class AccountAddressCreate implements PageObject {
1471
1519
  readonly cityInput: Locator;
1472
1520
  readonly countryDropdown: Locator;
1473
1521
  readonly saveAddressButton: Locator;
1522
+ readonly stateDropdown: Locator;
1474
1523
  constructor(page: Page);
1475
1524
  url(): string;
1476
1525
  }
@@ -1487,8 +1536,16 @@ declare class PageNotFound implements PageObject {
1487
1536
 
1488
1537
  declare class ContactForm extends Home implements PageObject {
1489
1538
  readonly page: Page;
1539
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
1540
+ /**
1541
+ * @deprecated Compatible until 6.6.x, will be removed in 6.8.x, use 'contactWrapper' instead
1542
+ */
1490
1543
  readonly contactModal: Locator;
1491
- readonly contactSuccessModal: Locator;
1544
+ /**
1545
+ * @deprecated Compatible until 6.6.x, will be removed in 6.8.x, use 'contactSuccessMessage' instead
1546
+ */
1547
+ readonly contactSuccessModal: Locator | undefined;
1548
+ readonly contactWrapper: Locator;
1492
1549
  readonly salutationSelect: Locator;
1493
1550
  readonly firstNameInput: Locator;
1494
1551
  readonly lastNameInput: Locator;
@@ -1500,6 +1557,8 @@ declare class ContactForm extends Home implements PageObject {
1500
1557
  readonly submitButton: Locator;
1501
1558
  readonly contactSuccessMessage: Locator;
1502
1559
  readonly cardTitle: Locator;
1560
+ readonly formFieldFeedback: Locator | undefined;
1561
+ readonly formAlert: Locator | undefined;
1503
1562
  /**
1504
1563
  * Captcha locators
1505
1564
  */
@@ -1510,7 +1569,7 @@ declare class ContactForm extends Home implements PageObject {
1510
1569
  readonly greCaptchaV2Container: Locator;
1511
1570
  readonly greCaptchaV2Input: Locator;
1512
1571
  readonly greCaptchaProtectionInformation: Locator;
1513
- constructor(page: Page);
1572
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
1514
1573
  url(): string;
1515
1574
  }
1516
1575
 
@@ -2399,6 +2458,8 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
2399
2458
  RegisterGuest: Task;
2400
2459
  } & {
2401
2460
  ChangeStorefrontCurrency: Task;
2461
+ } & {
2462
+ AddNewAddress: Task;
2402
2463
  } & {
2403
2464
  AddProductToCart: Task;
2404
2465
  } & {
@@ -2431,4 +2492,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
2431
2492
  ValidateAccessibility: (pageName: string, assertViolations?: number | boolean | undefined, createReport?: boolean | undefined, ruleTags?: string[] | undefined, outputDir?: string | undefined) => () => Promise<axe_core.Result[]>;
2432
2493
  }, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
2433
2494
 
2434
- export { type AccountData, AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CategoryCustomizableLinkData, type CategoryData, type CmsPage, type Country, type CreatedRecord, type Currency$1 as Currency, type CustomField, type CustomFieldData, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Language$1 as Language, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod, type Price, type Product, type ProductCrossSelling, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type Rule, type RuleAssignmentEntity, RuleType, type SalesChannel, type SalesChannelAnalytics, type SalesChannelDomain, type SalesChannelRecord, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type TagData, type Task, type Tax, type TaxRules, TestDataService, type VariantListingConfig, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
2495
+ export { type AccountData, type Address, AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CategoryCustomizableLinkData, type CategoryData, type CmsPage, type Country, type CreatedRecord, type Currency$1 as Currency, type CustomField, type CustomFieldData, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Language$1 as Language, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod, type Price, type Product, type ProductCrossSelling, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type Rule, type RuleAssignmentEntity, RuleType, type SalesChannel, type SalesChannelAnalytics, type SalesChannelDomain, type SalesChannelRecord, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type TagData, type Task, type Tax, type TaxRules, TestDataService, type VariantListingConfig, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
package/dist/index.mjs CHANGED
@@ -502,7 +502,14 @@ const _AdminApiContext = class _AdminApiContext {
502
502
  let response = await methodMap[method](url, options);
503
503
  if (response.status() === 401) {
504
504
  await this.refreshAccessToken();
505
- const updatedOptions = { ...options, headers: { Authorization: `Bearer ${this.options["access_token"]}` } };
505
+ const updatedOptions = {
506
+ ...options,
507
+ data: options?.data ?? void 0,
508
+ headers: {
509
+ ...options?.headers || {},
510
+ Authorization: `Bearer ${this.options["access_token"]}`
511
+ }
512
+ };
506
513
  response = await methodMap[method](url, updatedOptions);
507
514
  }
508
515
  return response;
@@ -2109,6 +2116,29 @@ class TestDataService {
2109
2116
  const { data: address } = await response.json();
2110
2117
  return address;
2111
2118
  }
2119
+ /**
2120
+ * Retrieves a customer by its email address.
2121
+ *
2122
+ * @param email - The email address of the customer.
2123
+ * @returns The customer object.
2124
+ */
2125
+ async getCustomerByEmail(email) {
2126
+ const response = await this.AdminApiClient.post("search/customer", {
2127
+ data: {
2128
+ limit: 1,
2129
+ filter: [
2130
+ {
2131
+ type: "equals",
2132
+ field: "email",
2133
+ value: email
2134
+ }
2135
+ ]
2136
+ }
2137
+ });
2138
+ expect(response.ok()).toBeTruthy();
2139
+ const { data: result } = await response.json();
2140
+ return result[0];
2141
+ }
2112
2142
  /**
2113
2143
  * Retrieves a customer salutations by its key.
2114
2144
  *
@@ -3288,6 +3318,9 @@ class Home {
3288
3318
  flyoutCategoryLink
3289
3319
  };
3290
3320
  }
3321
+ /**
3322
+ * @deprecated - use getListingItemByProductName instead
3323
+ */
3291
3324
  async getListingItemByProductId(productId) {
3292
3325
  const listingItem = this.page.getByRole("listitem").filter({ has: this.page.locator(`[value="${productId}"]`) });
3293
3326
  const productImage = listingItem.locator(".product-image-link");
@@ -3319,6 +3352,37 @@ class Home {
3319
3352
  productListingPriceBadge
3320
3353
  };
3321
3354
  }
3355
+ async getListingItemByProductName(productListingName) {
3356
+ const listingItem = this.page.getByRole("listitem").filter({ has: this.page.getByText(productListingName) });
3357
+ const productImage = listingItem.locator(".product-image-link");
3358
+ const productRating = listingItem.locator(".product-rating");
3359
+ const productVariantCharacteristics = listingItem.locator(".product-variant-characteristics");
3360
+ const productDescription = listingItem.locator(".product-description");
3361
+ const productPriceUnit = listingItem.locator(".product-price-unit");
3362
+ const productCheapestPrice = listingItem.locator(".product-cheapest-price");
3363
+ const productPrice = listingItem.locator(".product-price");
3364
+ const productName = listingItem.locator(".product-name");
3365
+ const productAddToShoppingCart = listingItem.getByRole("button", {
3366
+ name: "Add to shopping cart"
3367
+ });
3368
+ const productListingPrice = listingItem.locator(".list-price-price");
3369
+ const productListingPricePercentage = listingItem.locator(".list-price-percentage");
3370
+ const productListingPriceBadge = listingItem.locator(".badge-discount");
3371
+ return {
3372
+ productImage,
3373
+ productRating,
3374
+ productVariantCharacteristics,
3375
+ productDescription,
3376
+ productPriceUnit,
3377
+ productCheapestPrice,
3378
+ productPrice,
3379
+ productName,
3380
+ productAddToShoppingCart,
3381
+ productListingPrice,
3382
+ productListingPricePercentage,
3383
+ productListingPriceBadge
3384
+ };
3385
+ }
3322
3386
  url() {
3323
3387
  return "./";
3324
3388
  }
@@ -3636,6 +3700,8 @@ class Account {
3636
3700
  __publicField$J(this, "newsletterCheckbox");
3637
3701
  __publicField$J(this, "newsletterRegistrationSuccessMessage");
3638
3702
  __publicField$J(this, "customerGroupRequestMessage");
3703
+ __publicField$J(this, "cannotDeliverToCountryAlert");
3704
+ __publicField$J(this, "shippingToAddressNotPossibleAlert");
3639
3705
  this.headline = page.getByRole("heading", { name: "Overview" });
3640
3706
  this.personalDataCardTitle = page.getByRole("heading", { name: "Personal data" });
3641
3707
  this.paymentMethodCardTitle = page.getByRole("heading", { name: "Default payment method" });
@@ -3648,6 +3714,8 @@ class Account {
3648
3714
  } else {
3649
3715
  this.customerGroupRequestMessage = page.locator(".alert-content-container");
3650
3716
  }
3717
+ this.cannotDeliverToCountryAlert = page.getByText("We can not deliver to the country that is stored in your delivery address.");
3718
+ this.shippingToAddressNotPossibleAlert = page.getByText("Shipping to the selected shipping address is currently not possible.");
3651
3719
  }
3652
3720
  async getCustomerGroupAlert(customerGroup) {
3653
3721
  return this.customerGroupRequestMessage.getByText(`Access to customer group "${customerGroup}" requested.`);
@@ -3697,6 +3765,17 @@ class AccountLogin {
3697
3765
  __publicField$I(this, "greCaptchaV3Input");
3698
3766
  __publicField$I(this, "greCaptchaProtectionInformation");
3699
3767
  __publicField$I(this, "greCaptchaBadge");
3768
+ //Input for shipping address
3769
+ __publicField$I(this, "differentShippingAddressCheckbox");
3770
+ __publicField$I(this, "registerShippingAddressFormArea");
3771
+ __publicField$I(this, "shippingAddressSalutationSelect");
3772
+ __publicField$I(this, "shippingAddressFirstNameInput");
3773
+ __publicField$I(this, "shippingAddressLastNameInput");
3774
+ __publicField$I(this, "shippingAddressStreetAddressInput");
3775
+ __publicField$I(this, "shippingAddressCityInput");
3776
+ __publicField$I(this, "shippingAddressCountryInput");
3777
+ __publicField$I(this, "shippingAddressPostalCodeInput");
3778
+ __publicField$I(this, "shippingAddressStateInput");
3700
3779
  this.emailInput = page.getByLabel("Your email address");
3701
3780
  this.passwordInput = page.getByLabel("Your password");
3702
3781
  this.loginButton = page.getByRole("button", { name: "Log in" });
@@ -3718,6 +3797,16 @@ class AccountLogin {
3718
3797
  this.cityInput = this.billingAddressFormArea.getByLabel("City");
3719
3798
  this.countryInput = this.billingAddressFormArea.getByLabel("Country");
3720
3799
  this.postalCodeInput = this.billingAddressFormArea.getByLabel("Postal code");
3800
+ this.differentShippingAddressCheckbox = page.getByRole("checkbox", { name: "Shipping and billing address do not match." });
3801
+ this.registerShippingAddressFormArea = page.locator(".register-shipping");
3802
+ this.shippingAddressSalutationSelect = this.registerShippingAddressFormArea.locator(".form-group").filter({ has: page.getByLabel("Salutation") }).locator(".form-select");
3803
+ this.shippingAddressFirstNameInput = this.registerShippingAddressFormArea.getByLabel("First name");
3804
+ this.shippingAddressLastNameInput = this.registerShippingAddressFormArea.getByLabel("Last name");
3805
+ this.shippingAddressStreetAddressInput = this.registerShippingAddressFormArea.getByLabel("Street address");
3806
+ this.shippingAddressCityInput = this.registerShippingAddressFormArea.getByLabel("City");
3807
+ this.shippingAddressCountryInput = this.registerShippingAddressFormArea.getByLabel("Country");
3808
+ this.shippingAddressPostalCodeInput = this.registerShippingAddressFormArea.getByLabel("Postal code");
3809
+ this.shippingAddressStateInput = this.registerShippingAddressFormArea.getByLabel("State");
3721
3810
  this.registerButton = page.getByRole("button", { name: "Continue" });
3722
3811
  this.logoutLink = page.getByRole("link", { name: "Log out" });
3723
3812
  this.successAlert = page.getByText("Successfully logged out.");
@@ -3728,6 +3817,9 @@ class AccountLogin {
3728
3817
  this.greCaptchaProtectionInformation = this.page.locator(".grecaptcha-protection-information");
3729
3818
  this.greCaptchaBadge = this.page.locator(".grecaptcha-badge");
3730
3819
  }
3820
+ async getShippingCountryLocatorByName(countryName) {
3821
+ return this.shippingAddressCountryInput.locator("option").filter({ hasText: countryName });
3822
+ }
3731
3823
  url() {
3732
3824
  return "account/login";
3733
3825
  }
@@ -3912,18 +4004,33 @@ var __publicField$E = (obj, key, value) => {
3912
4004
  return value;
3913
4005
  };
3914
4006
  class AccountAddresses {
3915
- constructor(page) {
4007
+ constructor(page, instanceMeta) {
3916
4008
  this.page = page;
4009
+ this.instanceMeta = instanceMeta;
3917
4010
  __publicField$E(this, "addNewAddressButton");
3918
4011
  __publicField$E(this, "editBillingAddressButton");
3919
4012
  __publicField$E(this, "editShippingAddressButton");
3920
4013
  __publicField$E(this, "useDefaultBillingAddressButton");
3921
4014
  __publicField$E(this, "useDefaultShippingAddressButton");
4015
+ __publicField$E(this, "deliveryNotPossibleAlert");
4016
+ __publicField$E(this, "availableAddresses");
4017
+ __publicField$E(this, "addressDropdownButton");
4018
+ __publicField$E(this, "availableAddressesUseAsBillingAddress");
4019
+ __publicField$E(this, "availableAddressesUseAsShippingAddress");
3922
4020
  this.addNewAddressButton = page.getByRole("link", { name: /Add (new )?address/ });
3923
4021
  this.editBillingAddressButton = page.getByRole("link", { name: "Edit address" }).first();
3924
4022
  this.editShippingAddressButton = page.getByRole("link", { name: "Edit address" }).nth(1);
3925
4023
  this.useDefaultBillingAddressButton = page.getByRole("button", { name: "Use as default billing address" });
3926
4024
  this.useDefaultShippingAddressButton = page.getByRole("button", { name: "Use as default shipping address" });
4025
+ if (satisfies(instanceMeta.version, "<6.7")) {
4026
+ this.availableAddresses = page.locator(".other-address").locator(".address").nth(1);
4027
+ this.deliveryNotPossibleAlert = this.availableAddresses.getByText("A delivery to this country is not possible.");
4028
+ } else {
4029
+ this.availableAddresses = page.locator(".address-manager-list-wrapper");
4030
+ this.addressDropdownButton = this.availableAddresses.locator("#dropdownMenuButton");
4031
+ this.availableAddressesUseAsBillingAddress = this.availableAddresses.getByRole("button", { name: "Use as default billing address" });
4032
+ this.availableAddressesUseAsShippingAddress = this.availableAddresses.getByRole("button", { name: "Use as default shipping address" });
4033
+ }
3927
4034
  }
3928
4035
  url() {
3929
4036
  return "account/address";
@@ -4088,15 +4195,17 @@ class AccountAddressCreate {
4088
4195
  __publicField$z(this, "cityInput");
4089
4196
  __publicField$z(this, "countryDropdown");
4090
4197
  __publicField$z(this, "saveAddressButton");
4091
- this.salutationDropdown = page.locator("#addresspersonalSalutation");
4092
- this.firstNameInput = page.locator("#addresspersonalFirstName");
4093
- this.lastNameInput = page.locator("#addresspersonalLastName");
4094
- this.companyInput = page.locator("#addresscompany");
4095
- this.departmentInput = page.locator("#addressdepartment");
4096
- this.streetInput = page.locator("#addressAddressStreet");
4097
- this.zipcodeInput = page.locator("#addressAddressZipcode");
4198
+ __publicField$z(this, "stateDropdown");
4199
+ this.salutationDropdown = page.getByRole("combobox", { name: "Salutation" });
4200
+ this.firstNameInput = page.getByRole("textbox", { name: "First name" });
4201
+ this.lastNameInput = page.getByRole("textbox", { name: "Last name" });
4202
+ this.companyInput = page.getByRole("textbox", { name: "Company" });
4203
+ this.departmentInput = page.getByRole("textbox", { name: "Department" });
4204
+ this.streetInput = page.getByRole("textbox", { name: "Street" });
4205
+ this.zipcodeInput = page.getByRole("textbox", { name: "Postal code" });
4098
4206
  this.cityInput = page.locator("#addressAddressCity");
4099
4207
  this.countryDropdown = page.locator("#addressAddressCountry");
4208
+ this.stateDropdown = page.locator("#addressAddressCountryState");
4100
4209
  this.saveAddressButton = page.locator(".address-form-submit");
4101
4210
  }
4102
4211
  url() {
@@ -4134,11 +4243,19 @@ var __publicField$x = (obj, key, value) => {
4134
4243
  return value;
4135
4244
  };
4136
4245
  class ContactForm extends Home {
4137
- constructor(page) {
4246
+ constructor(page, instanceMeta) {
4138
4247
  super(page);
4139
4248
  this.page = page;
4249
+ this.instanceMeta = instanceMeta;
4250
+ /**
4251
+ * @deprecated Compatible until 6.6.x, will be removed in 6.8.x, use 'contactWrapper' instead
4252
+ */
4140
4253
  __publicField$x(this, "contactModal");
4254
+ /**
4255
+ * @deprecated Compatible until 6.6.x, will be removed in 6.8.x, use 'contactSuccessMessage' instead
4256
+ */
4141
4257
  __publicField$x(this, "contactSuccessModal");
4258
+ __publicField$x(this, "contactWrapper");
4142
4259
  __publicField$x(this, "salutationSelect");
4143
4260
  __publicField$x(this, "firstNameInput");
4144
4261
  __publicField$x(this, "lastNameInput");
@@ -4150,6 +4267,8 @@ class ContactForm extends Home {
4150
4267
  __publicField$x(this, "submitButton");
4151
4268
  __publicField$x(this, "contactSuccessMessage");
4152
4269
  __publicField$x(this, "cardTitle");
4270
+ __publicField$x(this, "formFieldFeedback");
4271
+ __publicField$x(this, "formAlert");
4153
4272
  /**
4154
4273
  * Captcha locators
4155
4274
  */
@@ -4160,26 +4279,35 @@ class ContactForm extends Home {
4160
4279
  __publicField$x(this, "greCaptchaV2Container");
4161
4280
  __publicField$x(this, "greCaptchaV2Input");
4162
4281
  __publicField$x(this, "greCaptchaProtectionInformation");
4163
- this.contactModal = this.page.getByRole("dialog").filter({ has: this.page.getByLabel("Contact", { exact: true }) });
4164
- this.salutationSelect = this.contactModal.getByLabel("Salutation*");
4165
- this.firstNameInput = this.contactModal.getByLabel("First name*");
4166
- this.lastNameInput = this.contactModal.getByLabel("Last name*");
4167
- this.emailInput = this.contactModal.getByLabel("Your email address*");
4168
- this.phoneInput = this.contactModal.getByLabel("Phone*");
4169
- this.subjectInput = this.contactModal.getByLabel("Subject*");
4170
- this.commentInput = this.contactModal.getByLabel("Comment*");
4171
- this.privacyPolicyCheckbox = this.contactModal.getByRole("checkbox", { name: "By selecting continue you confirm that you have read and agree to our" });
4172
- this.submitButton = this.contactModal.getByRole("button", { name: "Submit" });
4173
- this.contactSuccessModal = this.page.getByRole("dialog").filter({ has: this.page.locator(".confirm-message") });
4174
- this.contactSuccessMessage = this.contactSuccessModal.locator(".confirm-message");
4175
- this.cardTitle = this.contactModal.locator(".card-title");
4176
- this.basicCaptcha = this.contactModal.locator(".basic-captcha");
4282
+ this.contactModal = this.page.getByRole("dialog").filter({ has: this.page.getByText("Contact") });
4283
+ if (satisfies(instanceMeta.version, "<6.7")) {
4284
+ this.contactWrapper = this.page.getByRole("dialog").filter({ has: this.page.getByText("Contact") });
4285
+ this.contactSuccessModal = this.page.getByRole("dialog").filter({ has: this.page.locator(".confirm-message") });
4286
+ this.contactSuccessMessage = this.contactSuccessModal.locator(".confirm-message");
4287
+ } else {
4288
+ this.contactWrapper = this.page.locator(".card").filter({ has: this.page.getByText("Contact") });
4289
+ this.formFieldFeedback = this.contactWrapper.locator(".form-field-feedback");
4290
+ this.formAlert = this.page.getByRole("alert");
4291
+ this.contactSuccessMessage = this.page.locator(".confirm-message");
4292
+ }
4293
+ this.basicCaptcha = this.contactWrapper.locator(".basic-captcha");
4294
+ this.salutationSelect = this.contactWrapper.getByLabel("Salutation");
4295
+ this.firstNameInput = this.contactWrapper.getByLabel("First name");
4296
+ this.lastNameInput = this.contactWrapper.getByLabel("Last name");
4297
+ this.emailInput = this.contactWrapper.getByLabel("Your email address");
4298
+ this.phoneInput = this.contactWrapper.getByLabel("Phone");
4299
+ this.subjectInput = this.contactWrapper.getByLabel("Subject");
4300
+ this.commentInput = this.contactWrapper.getByLabel("Comment");
4301
+ this.privacyPolicyCheckbox = this.contactWrapper.getByRole("checkbox", { name: "By selecting continue you confirm that you have read and agree to our" });
4302
+ this.submitButton = this.contactWrapper.getByRole("button", { name: "Submit" });
4303
+ this.cardTitle = this.contactWrapper.locator(".card-title");
4304
+ this.basicCaptcha = this.contactWrapper.locator(".basic-captcha");
4305
+ this.greCaptchaV2Container = this.contactWrapper.locator(".grecaptcha-v2-container");
4306
+ this.greCaptchaV2Input = this.contactWrapper.locator(".grecaptcha-v2-input");
4307
+ this.greCaptchaProtectionInformation = this.contactWrapper.locator(".grecaptcha-protection-information");
4177
4308
  this.basicCaptchaImage = this.basicCaptcha.locator("img");
4178
4309
  this.basicCaptchaRefreshButton = this.basicCaptcha.locator(".basic-captcha-content-refresh-icon");
4179
4310
  this.basicCaptchaInput = this.basicCaptcha.locator('input[name="shopware_basic_captcha_confirm"]');
4180
- this.greCaptchaV2Container = this.contactModal.locator(".grecaptcha-v2-container");
4181
- this.greCaptchaV2Input = this.contactModal.locator(".grecaptcha-v2-input");
4182
- this.greCaptchaProtectionInformation = this.contactModal.locator(".grecaptcha-protection-information");
4183
4311
  }
4184
4312
  url() {
4185
4313
  return new Error("Function not implemented, because it is a modal page object").message;
@@ -4250,8 +4378,8 @@ const test$6 = test$e.extend({
4250
4378
  StorefrontAccountOrder: async ({ StorefrontPage }, use) => {
4251
4379
  await use(new AccountOrder(StorefrontPage));
4252
4380
  },
4253
- StorefrontAccountAddresses: async ({ StorefrontPage }, use) => {
4254
- await use(new AccountAddresses(StorefrontPage));
4381
+ StorefrontAccountAddresses: async ({ StorefrontPage, InstanceMeta }, use) => {
4382
+ await use(new AccountAddresses(StorefrontPage, InstanceMeta));
4255
4383
  },
4256
4384
  StorefrontAccountAddressCreate: async ({ StorefrontPage }, use) => {
4257
4385
  await use(new AccountAddressCreate(StorefrontPage));
@@ -4274,8 +4402,8 @@ const test$6 = test$e.extend({
4274
4402
  StorefrontPageNotFound: async ({ StorefrontPage }, use) => {
4275
4403
  await use(new PageNotFound(StorefrontPage));
4276
4404
  },
4277
- StorefrontContactForm: async ({ StorefrontPage }, use) => {
4278
- await use(new ContactForm(StorefrontPage));
4405
+ StorefrontContactForm: async ({ StorefrontPage, InstanceMeta }, use) => {
4406
+ await use(new ContactForm(StorefrontPage, InstanceMeta));
4279
4407
  }
4280
4408
  });
4281
4409
 
@@ -6876,7 +7004,7 @@ const Logout = test$e.extend({
6876
7004
  });
6877
7005
 
6878
7006
  const Register = test$e.extend({
6879
- Register: async ({ StorefrontAccountLogin, AdminApiContext: AdminApiContext2, IdProvider }, use) => {
7007
+ Register: async ({ StorefrontAccountLogin, IdProvider, TestDataService }, use) => {
6880
7008
  let registeredEmail = "";
6881
7009
  const defaultRegistrationData = {
6882
7010
  isCommercial: false,
@@ -6915,36 +7043,15 @@ const Register = test$e.extend({
6915
7043
  await StorefrontAccountLogin.cityInput.fill(registrationData.city);
6916
7044
  await StorefrontAccountLogin.countryInput.selectOption({ label: registrationData.country });
6917
7045
  await StorefrontAccountLogin.registerButton.click();
7046
+ const customer = await TestDataService.getCustomerByEmail(registeredEmail);
7047
+ if (customer) {
7048
+ TestDataService.addCreatedRecord("customer", customer.id);
7049
+ }
6918
7050
  };
6919
7051
  };
6920
7052
  await use(task);
6921
- await deleteRegisteredUser(AdminApiContext2, registeredEmail);
6922
7053
  }
6923
7054
  });
6924
- async function deleteRegisteredUser(adminApiContext, email) {
6925
- if (!email)
6926
- return;
6927
- try {
6928
- const response = await adminApiContext.post("search/customer", {
6929
- data: {
6930
- limit: 1,
6931
- filter: [
6932
- {
6933
- type: "equals",
6934
- field: "email",
6935
- value: email
6936
- }
6937
- ]
6938
- }
6939
- });
6940
- const { data: customers } = await response.json();
6941
- for (const customer of customers) {
6942
- await adminApiContext.delete(`customer/${customer.id}`);
6943
- }
6944
- } catch (error) {
6945
- console.error(`Error deleting user with email ${email}:`, error);
6946
- }
6947
- }
6948
7055
 
6949
7056
  const RegisterGuest = test$e.extend({
6950
7057
  RegisterGuest: async ({ StorefrontAccountLogin, AdminApiContext }, use) => {
@@ -7006,6 +7113,29 @@ const ChangeStorefrontCurrency = test$e.extend({
7006
7113
  }
7007
7114
  });
7008
7115
 
7116
+ const AddNewAddress = test$e.extend({
7117
+ AddNewAddress: async ({ StorefrontAccountAddresses, StorefrontAccountAddressCreate }, use) => {
7118
+ const task = (address) => {
7119
+ return async function AddNewAddress2() {
7120
+ await StorefrontAccountAddresses.addNewAddressButton.click();
7121
+ await StorefrontAccountAddressCreate.firstNameInput.fill(address.firstName);
7122
+ await StorefrontAccountAddressCreate.lastNameInput.fill(address.lastName);
7123
+ await StorefrontAccountAddressCreate.companyInput.fill(address.company);
7124
+ await StorefrontAccountAddressCreate.departmentInput.fill(address.department);
7125
+ await StorefrontAccountAddressCreate.streetInput.fill(address.street);
7126
+ await StorefrontAccountAddressCreate.zipcodeInput.fill(address.zipCode);
7127
+ await StorefrontAccountAddressCreate.cityInput.fill(address.city);
7128
+ await StorefrontAccountAddressCreate.countryDropdown.selectOption({ label: address.country });
7129
+ if (address.state) {
7130
+ await StorefrontAccountAddressCreate.stateDropdown.selectOption({ label: address.state });
7131
+ }
7132
+ await StorefrontAccountAddressCreate.saveAddressButton.click();
7133
+ };
7134
+ };
7135
+ await use(task);
7136
+ }
7137
+ });
7138
+
7009
7139
  const AddProductToCart = test$e.extend({
7010
7140
  AddProductToCart: async ({ ShopCustomer, StorefrontProductDetail }, use) => {
7011
7141
  const task = (ProductData, quantity = "1") => {
@@ -7219,6 +7349,7 @@ const test$2 = mergeTests(
7219
7349
  Register,
7220
7350
  RegisterGuest,
7221
7351
  ChangeStorefrontCurrency,
7352
+ AddNewAddress,
7222
7353
  AddProductToCart,
7223
7354
  ChangeProductQuantity,
7224
7355
  ProceedFromProductToCheckout,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "11.6.0",
3
+ "version": "11.6.1",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",