@shopware-ag/acceptance-test-suite 12.6.1 → 12.7.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
@@ -94,6 +94,7 @@ type CustomerAddress = components["schemas"]["CustomerAddress"] & {
94
94
  id: string;
95
95
  };
96
96
  interface Address {
97
+ id: string;
97
98
  salutation: string;
98
99
  firstName: string;
99
100
  lastName: string;
@@ -101,7 +102,7 @@ interface Address {
101
102
  department: string;
102
103
  street: string;
103
104
  city: string;
104
- zipCode: string;
105
+ zipcode: string;
105
106
  country: string;
106
107
  state: string;
107
108
  }
@@ -789,6 +790,12 @@ declare class TestDataService {
789
790
  * @param overrides - Specific data overrides that will be applied to the customer group data struct.
790
791
  */
791
792
  createCustomerGroup(overrides?: Partial<CustomerGroup>): Promise<CustomerGroup>;
793
+ /**
794
+ * Creates a customer address
795
+ *
796
+ * @param overrides - Specific data overrides that will be applied to the customer address data struct.
797
+ */
798
+ createCustomerAddress(customer: Customer, overrides?: Partial<Address>): Promise<Address>;
792
799
  /**
793
800
  * Set system config for default sales channel
794
801
  *
@@ -1222,6 +1229,7 @@ declare class TestDataService {
1222
1229
  getBasicPromotionStruct(salesChannelId?: string, overrides?: Partial<Promotion>): Partial<Promotion>;
1223
1230
  getBasicCmsStruct(cmsType: string, overrides: Partial<CmsPage>): Partial<CmsPage>;
1224
1231
  getBasicCustomerGroupStruct(overrides?: Partial<CustomerGroup>): Partial<CustomerGroup>;
1232
+ getBasicCustomerAddressStruct(customerId: string, overrides?: Partial<Address>): Partial<Address>;
1225
1233
  getSalesChannelAnalyticsStruct(overrides?: Partial<SalesChannelAnalytics>): Partial<SalesChannelAnalytics>;
1226
1234
  clearCaches(): Promise<void>;
1227
1235
  getBasicCustomFieldSetStruct(overrides?: Partial<CustomFieldSet>): Partial<CustomFieldSet>;
@@ -1982,6 +1990,11 @@ declare const BUNDLED_RESOURCES: {
1982
1990
  useAsDefaultBilling: string;
1983
1991
  useAsDefaultShipping: string;
1984
1992
  addressOptions: string;
1993
+ deleteAddress: string;
1994
+ };
1995
+ badges: {
1996
+ defaultBilling: string;
1997
+ defaultShipping: string;
1985
1998
  };
1986
1999
  messages: {
1987
2000
  deliveryNotPossible: string;
@@ -2976,6 +2989,11 @@ declare const BUNDLED_RESOURCES: {
2976
2989
  useAsDefaultBilling: string;
2977
2990
  useAsDefaultShipping: string;
2978
2991
  addressOptions: string;
2992
+ deleteAddress: string;
2993
+ };
2994
+ badges: {
2995
+ defaultBilling: string;
2996
+ defaultShipping: string;
2979
2997
  };
2980
2998
  messages: {
2981
2999
  deliveryNotPossible: string;
@@ -3936,6 +3954,11 @@ declare const baseNamespaces: {
3936
3954
  useAsDefaultBilling: string;
3937
3955
  useAsDefaultShipping: string;
3938
3956
  addressOptions: string;
3957
+ deleteAddress: string;
3958
+ };
3959
+ badges: {
3960
+ defaultBilling: string;
3961
+ defaultShipping: string;
3939
3962
  };
3940
3963
  messages: {
3941
3964
  deliveryNotPossible: string;
@@ -4754,6 +4777,11 @@ declare class AccountAddresses extends BaseAccount {
4754
4777
  readonly instanceMeta: HelperFixtureTypes["InstanceMeta"];
4755
4778
  constructor(page: Page, instanceMeta: HelperFixtureTypes["InstanceMeta"]);
4756
4779
  url(): string;
4780
+ private buildAddressRegex;
4781
+ private escapeRegex;
4782
+ getAvailableAddress(partialAddressData: Partial<Address>): Promise<Record<string, Locator>>;
4783
+ getDefaultShippingAddress(partialAddressData?: Partial<Address>): Promise<Locator>;
4784
+ getDefaultBillingAddress(partialAddressData?: Partial<Address>): Promise<Locator>;
4757
4785
  }
4758
4786
 
4759
4787
  declare class AccountPayment implements PageObject {
@@ -4828,6 +4856,9 @@ declare class CheckoutOrderEdit implements PageObject {
4828
4856
  getPaymentMethodButton(paymentMethodName: string): Locator;
4829
4857
  }
4830
4858
 
4859
+ /**
4860
+ * @deprecated - Use AccountAddressDetails instead.
4861
+ */
4831
4862
  declare class AccountAddressCreate extends BaseAccount {
4832
4863
  readonly salutationDropdown: Locator;
4833
4864
  readonly firstNameInput: Locator;
@@ -4844,6 +4875,26 @@ declare class AccountAddressCreate extends BaseAccount {
4844
4875
  url(): string;
4845
4876
  }
4846
4877
 
4878
+ declare class AccountAddressDetails extends BaseAccount {
4879
+ readonly salutationDropdown: Locator;
4880
+ readonly firstNameInput: Locator;
4881
+ readonly lastNameInput: Locator;
4882
+ readonly companyInput: Locator;
4883
+ readonly departmentInput: Locator;
4884
+ readonly streetInput: Locator;
4885
+ readonly zipcodeInput: Locator;
4886
+ readonly cityInput: Locator;
4887
+ readonly countryDropdown: Locator;
4888
+ readonly saveAddressButton: Locator;
4889
+ readonly stateDropdown: Locator;
4890
+ constructor(page: Page);
4891
+ /**
4892
+ * The address details page is used for both creating and editing addresses. The URL contains the address ID when editing an existing address, but not when creating a new one. Therefore, the addressId parameter is optional.
4893
+ * @param addressId - The ID of the address being edited. This parameter is optional because the same page object is used for creating new addresses, where no address ID is present in the URL.
4894
+ */
4895
+ url(addressId?: string): string;
4896
+ }
4897
+
4847
4898
  declare class PageNotFound implements PageObject {
4848
4899
  readonly pageNotFoundImage: Locator;
4849
4900
  readonly headline: Locator;
@@ -4925,6 +4976,7 @@ declare class Header implements PageObject {
4925
4976
  readonly wishlistIcon: Locator;
4926
4977
  readonly wishlistBasket: Locator;
4927
4978
  readonly page: Page;
4979
+ readonly cartTotal: Locator;
4928
4980
  constructor(page: Page);
4929
4981
  url(): string;
4930
4982
  }
@@ -4945,6 +4997,7 @@ interface StorefrontPageTypes {
4945
4997
  StorefrontAccountOrder: AccountOrder;
4946
4998
  StorefrontAccountAddresses: AccountAddresses;
4947
4999
  StorefrontAccountAddressCreate: AccountAddressCreate;
5000
+ StorefrontAccountAddressDetails: AccountAddressDetails;
4948
5001
  StorefrontAccountPayment: AccountPayment;
4949
5002
  StorefrontSearch: Search;
4950
5003
  StorefrontSearchSuggest: SearchSuggest;
@@ -4972,6 +5025,7 @@ declare const StorefrontPageObjects: {
4972
5025
  AccountOrder: typeof AccountOrder;
4973
5026
  AccountAddresses: typeof AccountAddresses;
4974
5027
  AccountAddressCreate: typeof AccountAddressCreate;
5028
+ AccountAddressDetails: typeof AccountAddressDetails;
4975
5029
  AccountPayment: typeof AccountPayment;
4976
5030
  Search: typeof Search;
4977
5031
  SearchSuggest: typeof SearchSuggest;
package/dist/index.d.ts CHANGED
@@ -94,6 +94,7 @@ type CustomerAddress = components["schemas"]["CustomerAddress"] & {
94
94
  id: string;
95
95
  };
96
96
  interface Address {
97
+ id: string;
97
98
  salutation: string;
98
99
  firstName: string;
99
100
  lastName: string;
@@ -101,7 +102,7 @@ interface Address {
101
102
  department: string;
102
103
  street: string;
103
104
  city: string;
104
- zipCode: string;
105
+ zipcode: string;
105
106
  country: string;
106
107
  state: string;
107
108
  }
@@ -789,6 +790,12 @@ declare class TestDataService {
789
790
  * @param overrides - Specific data overrides that will be applied to the customer group data struct.
790
791
  */
791
792
  createCustomerGroup(overrides?: Partial<CustomerGroup>): Promise<CustomerGroup>;
793
+ /**
794
+ * Creates a customer address
795
+ *
796
+ * @param overrides - Specific data overrides that will be applied to the customer address data struct.
797
+ */
798
+ createCustomerAddress(customer: Customer, overrides?: Partial<Address>): Promise<Address>;
792
799
  /**
793
800
  * Set system config for default sales channel
794
801
  *
@@ -1222,6 +1229,7 @@ declare class TestDataService {
1222
1229
  getBasicPromotionStruct(salesChannelId?: string, overrides?: Partial<Promotion>): Partial<Promotion>;
1223
1230
  getBasicCmsStruct(cmsType: string, overrides: Partial<CmsPage>): Partial<CmsPage>;
1224
1231
  getBasicCustomerGroupStruct(overrides?: Partial<CustomerGroup>): Partial<CustomerGroup>;
1232
+ getBasicCustomerAddressStruct(customerId: string, overrides?: Partial<Address>): Partial<Address>;
1225
1233
  getSalesChannelAnalyticsStruct(overrides?: Partial<SalesChannelAnalytics>): Partial<SalesChannelAnalytics>;
1226
1234
  clearCaches(): Promise<void>;
1227
1235
  getBasicCustomFieldSetStruct(overrides?: Partial<CustomFieldSet>): Partial<CustomFieldSet>;
@@ -1982,6 +1990,11 @@ declare const BUNDLED_RESOURCES: {
1982
1990
  useAsDefaultBilling: string;
1983
1991
  useAsDefaultShipping: string;
1984
1992
  addressOptions: string;
1993
+ deleteAddress: string;
1994
+ };
1995
+ badges: {
1996
+ defaultBilling: string;
1997
+ defaultShipping: string;
1985
1998
  };
1986
1999
  messages: {
1987
2000
  deliveryNotPossible: string;
@@ -2976,6 +2989,11 @@ declare const BUNDLED_RESOURCES: {
2976
2989
  useAsDefaultBilling: string;
2977
2990
  useAsDefaultShipping: string;
2978
2991
  addressOptions: string;
2992
+ deleteAddress: string;
2993
+ };
2994
+ badges: {
2995
+ defaultBilling: string;
2996
+ defaultShipping: string;
2979
2997
  };
2980
2998
  messages: {
2981
2999
  deliveryNotPossible: string;
@@ -3936,6 +3954,11 @@ declare const baseNamespaces: {
3936
3954
  useAsDefaultBilling: string;
3937
3955
  useAsDefaultShipping: string;
3938
3956
  addressOptions: string;
3957
+ deleteAddress: string;
3958
+ };
3959
+ badges: {
3960
+ defaultBilling: string;
3961
+ defaultShipping: string;
3939
3962
  };
3940
3963
  messages: {
3941
3964
  deliveryNotPossible: string;
@@ -4754,6 +4777,11 @@ declare class AccountAddresses extends BaseAccount {
4754
4777
  readonly instanceMeta: HelperFixtureTypes["InstanceMeta"];
4755
4778
  constructor(page: Page, instanceMeta: HelperFixtureTypes["InstanceMeta"]);
4756
4779
  url(): string;
4780
+ private buildAddressRegex;
4781
+ private escapeRegex;
4782
+ getAvailableAddress(partialAddressData: Partial<Address>): Promise<Record<string, Locator>>;
4783
+ getDefaultShippingAddress(partialAddressData?: Partial<Address>): Promise<Locator>;
4784
+ getDefaultBillingAddress(partialAddressData?: Partial<Address>): Promise<Locator>;
4757
4785
  }
4758
4786
 
4759
4787
  declare class AccountPayment implements PageObject {
@@ -4828,6 +4856,9 @@ declare class CheckoutOrderEdit implements PageObject {
4828
4856
  getPaymentMethodButton(paymentMethodName: string): Locator;
4829
4857
  }
4830
4858
 
4859
+ /**
4860
+ * @deprecated - Use AccountAddressDetails instead.
4861
+ */
4831
4862
  declare class AccountAddressCreate extends BaseAccount {
4832
4863
  readonly salutationDropdown: Locator;
4833
4864
  readonly firstNameInput: Locator;
@@ -4844,6 +4875,26 @@ declare class AccountAddressCreate extends BaseAccount {
4844
4875
  url(): string;
4845
4876
  }
4846
4877
 
4878
+ declare class AccountAddressDetails extends BaseAccount {
4879
+ readonly salutationDropdown: Locator;
4880
+ readonly firstNameInput: Locator;
4881
+ readonly lastNameInput: Locator;
4882
+ readonly companyInput: Locator;
4883
+ readonly departmentInput: Locator;
4884
+ readonly streetInput: Locator;
4885
+ readonly zipcodeInput: Locator;
4886
+ readonly cityInput: Locator;
4887
+ readonly countryDropdown: Locator;
4888
+ readonly saveAddressButton: Locator;
4889
+ readonly stateDropdown: Locator;
4890
+ constructor(page: Page);
4891
+ /**
4892
+ * The address details page is used for both creating and editing addresses. The URL contains the address ID when editing an existing address, but not when creating a new one. Therefore, the addressId parameter is optional.
4893
+ * @param addressId - The ID of the address being edited. This parameter is optional because the same page object is used for creating new addresses, where no address ID is present in the URL.
4894
+ */
4895
+ url(addressId?: string): string;
4896
+ }
4897
+
4847
4898
  declare class PageNotFound implements PageObject {
4848
4899
  readonly pageNotFoundImage: Locator;
4849
4900
  readonly headline: Locator;
@@ -4925,6 +4976,7 @@ declare class Header implements PageObject {
4925
4976
  readonly wishlistIcon: Locator;
4926
4977
  readonly wishlistBasket: Locator;
4927
4978
  readonly page: Page;
4979
+ readonly cartTotal: Locator;
4928
4980
  constructor(page: Page);
4929
4981
  url(): string;
4930
4982
  }
@@ -4945,6 +4997,7 @@ interface StorefrontPageTypes {
4945
4997
  StorefrontAccountOrder: AccountOrder;
4946
4998
  StorefrontAccountAddresses: AccountAddresses;
4947
4999
  StorefrontAccountAddressCreate: AccountAddressCreate;
5000
+ StorefrontAccountAddressDetails: AccountAddressDetails;
4948
5001
  StorefrontAccountPayment: AccountPayment;
4949
5002
  StorefrontSearch: Search;
4950
5003
  StorefrontSearchSuggest: SearchSuggest;
@@ -4972,6 +5025,7 @@ declare const StorefrontPageObjects: {
4972
5025
  AccountOrder: typeof AccountOrder;
4973
5026
  AccountAddresses: typeof AccountAddresses;
4974
5027
  AccountAddressCreate: typeof AccountAddressCreate;
5028
+ AccountAddressDetails: typeof AccountAddressDetails;
4975
5029
  AccountPayment: typeof AccountPayment;
4976
5030
  Search: typeof Search;
4977
5031
  SearchSuggest: typeof SearchSuggest;
package/dist/index.mjs CHANGED
@@ -1438,10 +1438,15 @@ const common$7 = {
1438
1438
  postalCode: "Postal code"
1439
1439
  };
1440
1440
  const actions$b = {
1441
- editAddress: "Edit address",
1441
+ editAddress: "Edit",
1442
1442
  useAsDefaultBilling: "Use as default billing address",
1443
1443
  useAsDefaultShipping: "Use as default shipping address",
1444
- addressOptions: "Address options"
1444
+ addressOptions: "Address options",
1445
+ deleteAddress: "Delete address"
1446
+ };
1447
+ const badges$1 = {
1448
+ defaultBilling: "Default billing address",
1449
+ defaultShipping: "Default shipping address"
1445
1450
  };
1446
1451
  const messages$4 = {
1447
1452
  deliveryNotPossible: "A delivery to this country is not possible."
@@ -1449,6 +1454,7 @@ const messages$4 = {
1449
1454
  const storefrontAddress = {
1450
1455
  common: common$7,
1451
1456
  actions: actions$b,
1457
+ badges: badges$1,
1452
1458
  messages: messages$4
1453
1459
  };
1454
1460
 
@@ -2658,10 +2664,15 @@ const common$1 = {
2658
2664
  postalCode: "Postleitzahl"
2659
2665
  };
2660
2666
  const actions$2 = {
2661
- editAddress: "Adresse bearbeiten",
2667
+ editAddress: "Bearbeiten",
2662
2668
  useAsDefaultBilling: "Als Standard-Rechnungsadresse verwenden",
2663
2669
  useAsDefaultShipping: "Als Standard-Lieferadresse verwenden",
2664
- addressOptions: "Adress-Optionen"
2670
+ addressOptions: "Adress-Optionen",
2671
+ deleteAddress: "Adresse löschen"
2672
+ };
2673
+ const badges = {
2674
+ defaultBilling: "Standard-Rechnungsadresse",
2675
+ defaultShipping: "Standard-Lieferadresse"
2665
2676
  };
2666
2677
  const messages = {
2667
2678
  deliveryNotPossible: "Eine Lieferung in dieses Land ist nicht möglich."
@@ -2669,6 +2680,7 @@ const messages = {
2669
2680
  const deStorefrontAddress = {
2670
2681
  common: common$1,
2671
2682
  actions: actions$2,
2683
+ badges: badges,
2672
2684
  messages: messages
2673
2685
  };
2674
2686
 
@@ -3995,6 +4007,7 @@ class TestDataService {
3995
4007
  "sales_channel_currency",
3996
4008
  "sales_channel_country",
3997
4009
  "sales_channel_payment_method",
4010
+ "customer_address",
3998
4011
  "customer",
3999
4012
  "acl_user_role",
4000
4013
  "category"
@@ -4618,6 +4631,21 @@ class TestDataService {
4618
4631
  this.addCreatedRecord("customer_group", customerGroup.id);
4619
4632
  return customerGroup;
4620
4633
  }
4634
+ /**
4635
+ * Creates a customer address
4636
+ *
4637
+ * @param overrides - Specific data overrides that will be applied to the customer address data struct.
4638
+ */
4639
+ async createCustomerAddress(customer, overrides = {}) {
4640
+ const basicCustomerAddress = this.getBasicCustomerAddressStruct(customer.id, overrides);
4641
+ const response = await this.AdminApiClient.post("customer-address?_response=detail", {
4642
+ data: basicCustomerAddress
4643
+ });
4644
+ expect(response.ok()).toBeTruthy();
4645
+ const { data: customerAddress } = await response.json();
4646
+ this.addCreatedRecord("customer_address", customerAddress.id);
4647
+ return customerAddress;
4648
+ }
4621
4649
  /**
4622
4650
  * Set system config for default sales channel
4623
4651
  *
@@ -6242,6 +6270,20 @@ class TestDataService {
6242
6270
  };
6243
6271
  return Object.assign({}, basicCustomerGroup, overrides);
6244
6272
  }
6273
+ getBasicCustomerAddressStruct(customerId, overrides = {}) {
6274
+ const customerAddressUuid = this.IdProvider.getIdPair().uuid;
6275
+ const basicCustomerAddress = {
6276
+ id: customerAddressUuid,
6277
+ customerId,
6278
+ countryId: this.defaultCountryId,
6279
+ firstName: "Peter",
6280
+ lastName: "Venkman",
6281
+ zipcode: "10013",
6282
+ street: "14 N Moore Street",
6283
+ city: "New York"
6284
+ };
6285
+ return Object.assign({}, basicCustomerAddress, overrides);
6286
+ }
6245
6287
  getSalesChannelAnalyticsStruct(overrides = {}) {
6246
6288
  const salesChannelAnalyticsUuid = this.IdProvider.getIdPair().uuid;
6247
6289
  const trackingId = this.IdProvider.getIdPair().id;
@@ -7442,6 +7484,61 @@ class AccountAddresses extends BaseAccount {
7442
7484
  url() {
7443
7485
  return "account/address";
7444
7486
  }
7487
+ buildAddressRegex(data) {
7488
+ const parts = [data.firstName, data.lastName, data.street, data.zipcode, data.city].filter(Boolean);
7489
+ const pattern = parts.map((p) => this.escapeRegex(p)).join(".*");
7490
+ return new RegExp(pattern);
7491
+ }
7492
+ escapeRegex(text) {
7493
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
7494
+ }
7495
+ async getAvailableAddress(partialAddressData) {
7496
+ if (satisfies(this.instanceMeta.version, "<6.7")) {
7497
+ throw new Error("getAvailableAddress is not supported for Shopware versions below 6.7");
7498
+ }
7499
+ const regex = this.buildAddressRegex(partialAddressData);
7500
+ if (!this.availableAddresses) {
7501
+ throw new Error("Available addresses are not defined.");
7502
+ }
7503
+ const addressContainer = this.availableAddresses.locator(".address-manager-select-address").filter({ hasText: regex }).first();
7504
+ const address = addressContainer.locator(".address");
7505
+ const addressActionsButton = addressContainer.locator("[id^='address-item-dropdown']");
7506
+ const addressActionsDropdown = addressContainer.locator(".dropdown-menu");
7507
+ const editAddressButton = addressActionsDropdown.getByRole("link", { name: translate("storefront:address:actions.editAddress") });
7508
+ const useAsDefaultShippingButton = addressActionsDropdown.getByRole("button", { name: translate("storefront:address:actions.useAsDefaultShipping") });
7509
+ const useAsDefaultBillingButton = addressActionsDropdown.getByRole("button", { name: translate("storefront:address:actions.useAsDefaultBilling") });
7510
+ const defaultShippingAddressBadge = addressContainer.locator(".address-item-default-badge", { hasText: translate("storefront:address:badges.defaultShipping") });
7511
+ const defaultBillingAddressBadge = addressContainer.locator(".address-item-default-badge", { hasText: translate("storefront:address:badges.defaultBilling") });
7512
+ return {
7513
+ address,
7514
+ addressActions: addressActionsButton,
7515
+ editAddressButton,
7516
+ useAsDefaultShippingButton,
7517
+ useAsDefaultBillingButton,
7518
+ isDefaultShippingAddress: defaultShippingAddressBadge,
7519
+ isDefaultBillingAddress: defaultBillingAddressBadge
7520
+ };
7521
+ }
7522
+ async getDefaultShippingAddress(partialAddressData) {
7523
+ if (satisfies(this.instanceMeta.version, "<6.7")) {
7524
+ throw new Error("getDefaultShippingAddress is not supported for Shopware versions below 6.7");
7525
+ }
7526
+ if (partialAddressData) {
7527
+ const regex = this.buildAddressRegex(partialAddressData);
7528
+ return this.page.locator(".address-manager-select-address").filter({ hasText: regex }).filter({ hasText: translate("storefront:address:badges.defaultShipping") }).first();
7529
+ }
7530
+ return this.page.locator(".address-manager-select-address").filter({ hasText: translate("storefront:address:badges.defaultShipping") });
7531
+ }
7532
+ async getDefaultBillingAddress(partialAddressData) {
7533
+ if (satisfies(this.instanceMeta.version, "<6.7")) {
7534
+ throw new Error("getDefaultBillingAddress is not supported for Shopware versions below 6.7");
7535
+ }
7536
+ if (partialAddressData) {
7537
+ const regex = this.buildAddressRegex(partialAddressData);
7538
+ return this.page.locator(".address-manager-select-address").filter({ hasText: regex }).filter({ hasText: translate("storefront:address:badges.defaultBilling") }).first();
7539
+ }
7540
+ return this.page.locator(".address-manager-select-address").filter({ hasText: translate("storefront:address:badges.defaultBilling") }).first();
7541
+ }
7445
7542
  }
7446
7543
 
7447
7544
  class AccountPayment {
@@ -7601,6 +7698,44 @@ class AccountAddressCreate extends BaseAccount {
7601
7698
  }
7602
7699
  }
7603
7700
 
7701
+ class AccountAddressDetails extends BaseAccount {
7702
+ salutationDropdown;
7703
+ firstNameInput;
7704
+ lastNameInput;
7705
+ companyInput;
7706
+ departmentInput;
7707
+ streetInput;
7708
+ zipcodeInput;
7709
+ cityInput;
7710
+ countryDropdown;
7711
+ saveAddressButton;
7712
+ stateDropdown;
7713
+ constructor(page) {
7714
+ super(page);
7715
+ this.salutationDropdown = page.getByRole("combobox", { name: translate("storefront:address:common.salutation") });
7716
+ this.firstNameInput = page.getByRole("textbox", { name: translate("storefront:address:common.firstName") });
7717
+ this.lastNameInput = page.getByRole("textbox", { name: translate("storefront:address:common.lastName") });
7718
+ this.companyInput = page.getByRole("textbox", { name: translate("storefront:address:common.company") });
7719
+ this.departmentInput = page.getByRole("textbox", { name: translate("storefront:address:common.department") });
7720
+ this.streetInput = page.getByRole("textbox", { name: translate("storefront:address:common.street") });
7721
+ this.zipcodeInput = page.getByRole("textbox", { name: translate("storefront:address:common.postalCode") });
7722
+ this.cityInput = page.locator("#addressAddressCity");
7723
+ this.countryDropdown = page.locator("#addressAddressCountry");
7724
+ this.stateDropdown = page.locator("#addressAddressCountryState");
7725
+ this.saveAddressButton = page.locator(".address-form-submit");
7726
+ }
7727
+ /**
7728
+ * The address details page is used for both creating and editing addresses. The URL contains the address ID when editing an existing address, but not when creating a new one. Therefore, the addressId parameter is optional.
7729
+ * @param addressId - The ID of the address being edited. This parameter is optional because the same page object is used for creating new addresses, where no address ID is present in the URL.
7730
+ */
7731
+ url(addressId = "") {
7732
+ if (addressId) {
7733
+ return `account/address/${addressId}`;
7734
+ }
7735
+ return "account/address/create";
7736
+ }
7737
+ }
7738
+
7604
7739
  class PageNotFound {
7605
7740
  pageNotFoundImage;
7606
7741
  headline;
@@ -7750,6 +7885,8 @@ class Header {
7750
7885
  wishlistIcon;
7751
7886
  wishlistBasket;
7752
7887
  page;
7888
+ //cart
7889
+ cartTotal;
7753
7890
  constructor(page) {
7754
7891
  this.page = page;
7755
7892
  this.mainNavigationLink = page.locator(".main-navigation-link-text");
@@ -7762,6 +7899,7 @@ class Header {
7762
7899
  this.skipToMainContentLink = page.getByRole("link", { name: translate("storefront:header:skipToContentLink"), exact: true });
7763
7900
  this.wishlistIcon = page.getByRole("link", { name: translate("storefront:header:wishlistIcon") });
7764
7901
  this.wishlistBasket = page.locator(".header-wishlist-badge");
7902
+ this.cartTotal = page.locator(".header-cart-total");
7765
7903
  }
7766
7904
  url() {
7767
7905
  throw new Error("Header does not have an own url.");
@@ -7784,6 +7922,7 @@ const StorefrontPageObjects = {
7784
7922
  AccountOrder,
7785
7923
  AccountAddresses,
7786
7924
  AccountAddressCreate,
7925
+ AccountAddressDetails,
7787
7926
  AccountPayment,
7788
7927
  Search,
7789
7928
  SearchSuggest,
@@ -7838,9 +7977,15 @@ const test$7 = test$e.extend({
7838
7977
  StorefrontAccountAddresses: async ({ StorefrontPage, InstanceMeta }, use) => {
7839
7978
  await use(new AccountAddresses(StorefrontPage, InstanceMeta));
7840
7979
  },
7980
+ /**
7981
+ * @deprecated - Use StorefrontAccountAddressDetails instead.
7982
+ */
7841
7983
  StorefrontAccountAddressCreate: async ({ StorefrontPage }, use) => {
7842
7984
  await use(new AccountAddressCreate(StorefrontPage));
7843
7985
  },
7986
+ StorefrontAccountAddressDetails: async ({ StorefrontPage }, use) => {
7987
+ await use(new AccountAddressDetails(StorefrontPage));
7988
+ },
7844
7989
  StorefrontAccountPayment: async ({ StorefrontPage }, use) => {
7845
7990
  await use(new AccountPayment(StorefrontPage));
7846
7991
  },
@@ -11749,7 +11894,7 @@ const AddNewAddress = test$e.extend({
11749
11894
  await ShopCustomer.fillsIn(StorefrontAccountAddressCreate.companyInput, address.company);
11750
11895
  await ShopCustomer.fillsIn(StorefrontAccountAddressCreate.departmentInput, address.department);
11751
11896
  await ShopCustomer.fillsIn(StorefrontAccountAddressCreate.streetInput, address.street);
11752
- await ShopCustomer.fillsIn(StorefrontAccountAddressCreate.zipcodeInput, address.zipCode);
11897
+ await ShopCustomer.fillsIn(StorefrontAccountAddressCreate.zipcodeInput, address.zipcode);
11753
11898
  await ShopCustomer.fillsIn(StorefrontAccountAddressCreate.cityInput, address.city);
11754
11899
  await ShopCustomer.presses(StorefrontAccountAddressCreate.countryDropdown);
11755
11900
  await StorefrontAccountAddressCreate.countryDropdown.selectOption({ label: address.country });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "12.6.1",
3
+ "version": "12.7.1",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "keywords": [
6
6
  "fixtures",