+
@@ -29,7 +51,7 @@ import { errorMessages } from "@/constants/error-messages";
defineRule("first-name-required", required(errorMessages.FIRST_NAME_REQUIRED));
defineRule("last-name-required", required(errorMessages.LAST_NAME_REQUIRED));
defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIRED));
-defineRule("email-address-format", regex(/^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+).([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT));
+defineRule("email-address-format", regex(/^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT));
export default ({
name: "customer-questions",
diff --git a/src/layouts/address-vehicles/address-vehicles-question/address-vehicles-question.spec.js1 b/src/layouts/address-vehicles/address-vehicles-question/address-vehicles-question.spec.js1
new file mode 100644
index 000000000..05fd2a0eb
--- /dev/null
+++ b/src/layouts/address-vehicles/address-vehicles-question/address-vehicles-question.spec.js1
@@ -0,0 +1,113 @@
+import { shallowMount } from "@vue/test-utils";
+import addressVehiclesQuestion from "@/layouts/address-vehicles/address-vehicles-question/address-vehicles-question";
+import { getMountOptions } from "@/helpers/unit-test-helper.js";
+// import store from "@/store";
+
+// jest.mock("@/store", () => { return {}; }, { virtual: true });
+
+describe("addressVehiclesQuestion.vue", () => {
+
+ it("Should include button-question component", () => {
+ // Arrange
+ const wrapper = shallowMount(addressVehiclesQuestion, {
+ propsData: {
+ // vehicles: [
+ // {
+ // "Name": "testname",
+ // "Text": "testtext",
+ // }
+ // ]
+ }
+ });
+
+ // console.log('wrapper.html: ', wrapper.html());
+
+ // Assert
+ const buttonQuestion = wrapper.find('button-question-stub');
+ expect(buttonQuestion).toBe;
+ });
+
+ it("on initialize should pass in questionText", () => {
+ // Arrange
+ const wrapper = shallowMount(addressVehiclesQuestion, {
+ propsData: {},
+ });
+
+ //Act
+ addressVehiclesQuestion.methods.initializeComponent.call(wrapper.vm, {QuestionText: 'Testing question text'});
+
+ // console.log('wrapper.html: ', wrapper.html());
+ // console.log('wrapper.vm.questionText: ', wrapper.vm.questionText);
+
+ // Assert
+ expect(wrapper.vm.questionText).toEqual('Testing question text');
+ });
+
+ // it("Alert should show if prop isCarIdDifferent is true", () => {
+ // // Arrange
+ // const wrapper = shallowMount(addressVehiclesQuestion, setupMountOptions({
+ // propsData: {
+ // isCarIdDifferent: true,
+ // }
+ // }));
+
+ // //Act
+ // const alert = wrapper.find('alert');
+ // console.log('wrapper.html: ', wrapper.html());
+ // console.log('wrapper.vm.questionText: ', wrapper.vm.questionText);
+
+ // // Assert
+ // // expect(wrapper.vm.questionText).toEqual('Testing question text');
+ // });
+
+});
+
+
+
+function setupMountOptions(mountOptionsMockData = {}) {
+ // //Mock store
+ // store.dispatch = jest.fn(() => {});
+ // store.getters = {};
+
+ // const mockMixin = {
+ // methods: {
+ // getCmsContent: jest.fn().mockImplementation(() => {
+ // return '';
+ // }),
+ // getDamageString: jest.fn().mockImplementation(() => {
+ // return '';
+ // })
+ // },
+ // store: {
+ // dispatch: store.dispatch,
+ // getters: store.getters,
+ // },
+ // }
+
+ const mockGetCmsContent = jest.fn();
+ mockGetCmsContent((cmsWidget, field) => {
+ return field
+ });
+ const defaultMountOptions = {
+ // route: { query: { fmgPage: 'page-name' } },
+ mixins: {
+ methods: {
+ getCmsContent: mockGetCmsContent,
+ },
+ },
+ global: {
+ mocks: {
+ store: {
+ dispatch: store.dispatch,
+ getters: store.getters,
+ },
+ },
+ },
+ };
+ const baseMountOptions = getMountOptions(Object.assign(defaultMountOptions, mountOptionsMockData));
+ const allMountOptions = Object.assign(defaultMountOptions, baseMountOptions);
+
+ console.log('what are allMountOptions??? ', allMountOptions);
+
+ return allMountOptions;
+}
\ No newline at end of file
diff --git a/src/layouts/address-vehicles/address-vehicles-question/address-vehicles-question.vue b/src/layouts/address-vehicles/address-vehicles-question/address-vehicles-question.vue
new file mode 100644
index 000000000..95d2b1fd0
--- /dev/null
+++ b/src/layouts/address-vehicles/address-vehicles-question/address-vehicles-question.vue
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/layouts/address-vehicles/address-vehicles.spec.js1 b/src/layouts/address-vehicles/address-vehicles.spec.js1
new file mode 100644
index 000000000..f4dab360c
--- /dev/null
+++ b/src/layouts/address-vehicles/address-vehicles.spec.js1
@@ -0,0 +1,26 @@
+import { shallowMount } from "@vue/test-utils";
+import addressVehicles from "@/layouts/address-vehicles/address-vehicles";
+
+describe("addressVehicles.vue", () => {
+
+ it("Should include address-vehicles-question component", () => {
+ // Arrange
+ const wrapper = shallowMount(addressVehicles, {
+ propsData: {
+ vehicles: [
+ {
+ "Name": "testname",
+ "Text": "testtext",
+ }
+ ]
+ }
+ });
+
+ // console.log('wrapper.html: ', wrapper.html());
+
+ // Assert
+ const addressVehiclesQuestion = wrapper.find('address-vehicles-question-stub');
+ expect(addressVehiclesQuestion).toBe;
+ });
+
+});
diff --git a/src/layouts/address-vehicles/address-vehicles.vue b/src/layouts/address-vehicles/address-vehicles.vue
new file mode 100644
index 000000000..34937bfb7
--- /dev/null
+++ b/src/layouts/address-vehicles/address-vehicles.vue
@@ -0,0 +1,243 @@
+
+
+
+
+
+
+
diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue
index e76f05435..17aa1b632 100644
--- a/src/layouts/license-plate-lookup/license-plate-lookup.vue
+++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue
@@ -8,28 +8,69 @@
@@ -46,25 +87,25 @@ import alert from "@/ux-components/alert/alert";
import textboxQuestion from "@/common-components/textbox-question/textbox-question";
import loadingModal from '@/common-components/loading-modal/loading-modal.vue';
// Supporting files
-import {
- fetchCmsContentForPage
+import {
+ fetchCmsContentForPage
} from "@/helpers/cms-content-helper";
import {
- settleAllPromises
+ settleAllPromises
} from "@/helpers/layout-helper";
import store from "@/store";
import baseMixin from "@/mixins/base-mixin.js";
import {
- storeActions
+ storeActions
} from "@/constants/store-actions";
import {
- storeMutations
+ storeMutations
} from "@/constants/store-mutations";
import {
- errorMessages
+ errorMessages
} from "@/constants/error-messages";
-import {
- navigateAfterSaveToHeritageFunnel
+import {
+ navigateAfterSaveToHeritageFunnel
} from "@/helpers/heritage-integration/navigation-helper";
import {
getDamageString,
@@ -92,7 +133,7 @@ defineRule(
defineRule(
"email-address-format",
regex(
- /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+).([a-zA-Z]{2,})$/,
+ /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,})$/,
errorMessages.EMAIL_ADDRESS_FORMAT
)
);
@@ -256,7 +297,7 @@ export default {
vinLookup.data.vehicle,
zipValidation.data.state
);
-
+
this.navigateForward();
},
navigateForward() {
@@ -281,10 +322,7 @@ export default {
});
},
lookupVin(plate, state) {
- return baseMixin.methods.dispatchStoreAction(
- storeActions.LOOKUP_VIN_BY_PLATE,
- { licensePlate: plate, licenseState: state }
- );
+ return baseMixin.methods.dispatchStoreAction(storeActions.LOOKUP_VIN_BY_PLATE,{ licensePlate: plate, licenseState: state }, false);
},
updateCustomerInfo(vin, vehicleInfo, registrationState) {
if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) {
@@ -335,4 +373,4 @@ export default {
loadingModal,
},
};
-
\ No newline at end of file
+
diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue
index a4b2bfdc8..ddeae5bec 100644
--- a/src/layouts/vehicle-damage/vehicle-damage.vue
+++ b/src/layouts/vehicle-damage/vehicle-damage.vue
@@ -87,8 +87,6 @@ import { required } from "@/helpers/validation-rules";
import { errorMessages } from "@/constants/error-messages";
import { damageLocationsCms } from "@/constants/damage-locations-cms.js";
import { damageLocationsSelected } from "@/constants/damage-locations-selected.js";
-import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
-import { queryStrings } from "@/constants/query-strings";
import store from "@/store";
import baseMixin from "@/mixins/base-mixin";
diff --git a/src/layouts/vehicle-damage/windshield-options/windshield-options.vue b/src/layouts/vehicle-damage/windshield-options/windshield-options.vue
index 1e9cfbc0a..6e7c844ff 100644
--- a/src/layouts/vehicle-damage/windshield-options/windshield-options.vue
+++ b/src/layouts/vehicle-damage/windshield-options/windshield-options.vue
@@ -10,7 +10,7 @@