From 0ec6bb17eb3ccd691d85de8f82915552b40600fb Mon Sep 17 00:00:00 2001 From: Alex Humphries Date: Wed, 25 Feb 2026 13:47:45 -0500 Subject: [PATCH 1/2] Fix a couple defects found while testing payment-method - INSR-8663: contact-details was inadvertently blanking out provider - INSR-8666: shop-address was overwriting a global validation rule, causing incorrect validation text to appear on later pages --- src/layouts/contact-details/contact-details.vue | 5 ++++- .../service-location/shop-address/shop-address.vue | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/layouts/contact-details/contact-details.vue b/src/layouts/contact-details/contact-details.vue index 5a84b8f3..b864ff19 100644 --- a/src/layouts/contact-details/contact-details.vue +++ b/src/layouts/contact-details/contact-details.vue @@ -245,11 +245,14 @@ export default { }; useMainStore().updateContactInfo(contactInfo); + const provider = useMainStore().serviceLocation.provider; + useMainStore().updateServiceLocation({ address: this.address, address2: this.address2, city: this.city, - isVehicleProtected: this.isVehicleProtected || 'false' + isVehicleProtected: this.isVehicleProtected || 'false', + provider }); this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD, this.$route); diff --git a/src/layouts/schedule-page/service-location/shop-address/shop-address.vue b/src/layouts/schedule-page/service-location/shop-address/shop-address.vue index 98563ad1..afc33384 100644 --- a/src/layouts/schedule-page/service-location/shop-address/shop-address.vue +++ b/src/layouts/schedule-page/service-location/shop-address/shop-address.vue @@ -68,7 +68,7 @@ groupName="chooseShop" textPosition="text-start" isRequired - validationRules="option-required" /> + validationRules="provider-required" /> {{ serviceZipPrompt }} @@ -115,7 +115,7 @@ import errorMessages from '@/constants/error-messages'; import { defineRule } from 'vee-validate'; import { required } from '@/helpers/validation-rules'; -defineRule('option-required', required(errorMessages.PROVIDER_REQUIRED)); +defineRule('provider-required', required(errorMessages.PROVIDER_REQUIRED)); const SERVICE_ZIP_QUESTION_REF_NAME = 'serviceZipCodeQuestion'; From 6ec3d55de9e50c8a830b9d40f39dba13492d7924 Mon Sep 17 00:00:00 2001 From: Alex Humphries Date: Thu, 26 Feb 2026 09:59:55 -0500 Subject: [PATCH 2/2] Update test to account for changes --- .../contact-details/contact-details.spec.js | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/layouts/contact-details/contact-details.spec.js b/src/layouts/contact-details/contact-details.spec.js index 5b5131a8..8a4d4d7b 100644 --- a/src/layouts/contact-details/contact-details.spec.js +++ b/src/layouts/contact-details/contact-details.spec.js @@ -330,6 +330,30 @@ describe('contactDetails.vue', () => { navigate: jest.fn() } }); + const provider = { + address: { + city: getRandomString(4, 20), + state: getRandomString(2, 2), + streetAddress: getRandomString(10, 50), + zipCode: getRandomInt(10000, 99999).toString(), + zipCodeCtu: getRandomInt(10000, 99999).toString() + }, + companyName: getRandomString(5, 15), + phoneNumber: getRandomInt(1000000000, 9999999999).toString(), + providerNumber: getRandomInt(100000, 999999).toString() + } + const mainInitialState = { + order: { + serviceLocation: { + provider + } + } + }; + mountOptions.global.plugins = [createTestingPinia({ + initialState: { + main: mainInitialState + } + })]; const wrapper = shallowMount(contactDetails, mountOptions); const address = getRandomString(10, 50); const address2 = getRandomString(0, 50); @@ -354,7 +378,8 @@ describe('contactDetails.vue', () => { address, address2, city, - isVehicleProtected + isVehicleProtected, + provider }); });