E2E fixes after countryArea changes

This commit is contained in:
Anna Szczęch 2023-01-02 08:45:07 +01:00 committed by GitHub
parent 0d7af543ac
commit 46a9c527a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View file

@ -8,6 +8,6 @@ export const ADDRESS_SELECTORS = {
city: '[name="city"]', city: '[name="city"]',
postalCode: '[name="postalCode"]', postalCode: '[name="postalCode"]',
country: '[data-test-id="address-edit-country-select-field"]', country: '[data-test-id="address-edit-country-select-field"]',
countryArea: '[name="countryArea"]', countryArea: '[data-test-id="address-edit-country-area-field"]',
saveButton: '[data-test-id="order-address-edit-dialog-confirm-button"]' saveButton: '[data-test-id="order-address-edit-dialog-confirm-button"]',
}; };

View file

@ -23,6 +23,7 @@
"postalCode": "70957", "postalCode": "70957",
"country": "US", "country": "US",
"countryArea": "LA", "countryArea": "LA",
"countryAreaFullName": "Louisiana",
"phone": "+12025550189", "phone": "+12025550189",
"currency": "USD", "currency": "USD",
"countryFullName": "United States of America" "countryFullName": "United States of America"
@ -37,6 +38,7 @@
"postalCode": "37745", "postalCode": "37745",
"country": "US", "country": "US",
"countryArea": "TN", "countryArea": "TN",
"countryAreaFullName": "Tennessee",
"phone": "+12025550169", "phone": "+12025550169",
"currency": "USD", "currency": "USD",
"countryFullName": "United States of America" "countryFullName": "United States of America"

View file

@ -14,8 +14,11 @@ Cypress.Commands.add("fillUpBasicAddress", address => {
.clearAndType(address.city) .clearAndType(address.city)
.get(ADDRESS_SELECTORS.postalCode) .get(ADDRESS_SELECTORS.postalCode)
.clearAndType(address.postalCode) .clearAndType(address.postalCode)
.fillAutocompleteSelect(ADDRESS_SELECTORS.country, address.countryFullName); .fillAutocompleteSelect(ADDRESS_SELECTORS.country, address.countryFullName)
cy.get(ADDRESS_SELECTORS.countryArea).clearAndType(address.countryArea); .fillAutocompleteSelect(
ADDRESS_SELECTORS.countryArea,
address.countryAreaFullName,
);
}); });
Cypress.Commands.add("fillUpAddressForm", address => { Cypress.Commands.add("fillUpAddressForm", address => {