diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c5c951a1..74a68a86 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -175,17 +175,11 @@ stages: indexDeployVariables: __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) - - template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps - parameters: - awsCliContainer: awscli - distributionId: $(apiCfDistributionId) - paths: /* - awsProfile: $(qaDeploymentProfile) - template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps parameters: awsCliContainer: awscli distributionId: $(cfDistributionId) - paths: /iss/* + paths: /* awsProfile: $(qaDeploymentProfile) # Prod Build/Deploy @@ -230,17 +224,11 @@ stages: indexDeployVariables: __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) - - template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps - parameters: - awsCliContainer: awscli - distributionId: $(apiCfDistributionId) - paths: /* - awsProfile: $(prodDeploymentProfile) - template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps parameters: awsCliContainer: awscli distributionId: $(cfDistributionId) - paths: /iss/* + paths: /* awsProfile: $(prodDeploymentProfile) - template: templates/digital/auto-tag.yml@AzureDevOps parameters: diff --git a/package-lock.json b/package-lock.json index d1fa847c..08d9d17a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3250,9 +3250,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.7.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.15.tgz", - "integrity": "sha512-XnjpaI8Bgc3eBag2Aw4t2Uj/49lLBSStHWfqKvIuXD7FIrZyMLWp8KuAFHAqxMZYTF9l08N1ctUn9YNybZJVmQ==", + "version": "20.3.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.2.tgz", + "integrity": "sha512-vOBLVQeCQfIcF/2Y7eKFTqrMnizK5lRNQ7ykML/5RuwVXVWxYkgwS7xbt4B6fKCUPgbSL5FSsjHQpaGQP/dQmw==", "dev": true }, "node_modules/@types/normalize-package-data": { diff --git a/src/constants/coverage-statuses.js b/src/constants/coverage-statuses.js new file mode 100644 index 00000000..76d46f2e --- /dev/null +++ b/src/constants/coverage-statuses.js @@ -0,0 +1,7 @@ +const coverageStatuses = { + PENDING: "Pending", + NO_COMP: "No Comp", + VERIFIED: "Verified", +}; + +export { coverageStatuses }; \ No newline at end of file diff --git a/src/constants/endorsement-options.js b/src/constants/endorsement-options.js new file mode 100644 index 00000000..c343da16 --- /dev/null +++ b/src/constants/endorsement-options.js @@ -0,0 +1,9 @@ +const endorsementOptions = { + EDUCATOR: "Educator", + OEM_APPROVED: "OEM Approved", + FULL_GLASS: "Full Glass Coverage", + PARKING_GUARD: "Parking Guard", + REPAIR_WAIVED: "Repair Waived" +}; + +export { endorsementOptions }; \ No newline at end of file diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index ca2c297f..be1ad311 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -125,7 +125,11 @@ const endpoints = { CoveragePolicyInfo: { url: '/coverage/api/v1/coverage/get-policy-information', method: 'POST' -} + }, + RegisterClaim: { + url: '/coverage/api/v1/coverage/register-claim', + method: 'POST' + } }; export { endpoints }; diff --git a/src/digital-components/dropdown-question/dropdown-question.vue b/src/digital-components/dropdown-question/dropdown-question.vue index 35f6d25f..44f63452 100644 --- a/src/digital-components/dropdown-question/dropdown-question.vue +++ b/src/digital-components/dropdown-question/dropdown-question.vue @@ -147,6 +147,7 @@ export default { &:disabled, &.disabled { background-color: $gray-100; + color: $gray-500; filter: grayscale(100%); &:hover { box-shadow: 0 0 0 4px transparent; diff --git a/src/digital-components/textbox-question/textbox-question.vue b/src/digital-components/textbox-question/textbox-question.vue index e13f5c4b..c502681c 100644 --- a/src/digital-components/textbox-question/textbox-question.vue +++ b/src/digital-components/textbox-question/textbox-question.vue @@ -14,9 +14,8 @@ ]"> -input[type="date"]:invalid::-webkit-datetime-edit-year-field, -input[type="date"]:invalid::-webkit-datetime-edit-month-field, -input[type="date"]:invalid::-webkit-datetime-edit-day-field, -input[type="date"]:invalid::-webkit-datetime-edit-text -{ - color: white; - background-color: white; - ::placeholder { - content: " " - } -} - input[type="date"]::-webkit-inner-spin-button{ display: none; } diff --git a/src/helpers/data-generation.js b/src/helpers/data-generation.js new file mode 100644 index 00000000..635ab9b4 --- /dev/null +++ b/src/helpers/data-generation.js @@ -0,0 +1,28 @@ +import { randomUUID } from "crypto"; + +export function getRandomString(minLength = 1, maxLength = 100) { + const length = getRandomInt(minLength, maxLength + 1); + let result = ''; + const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + const charactersLength = characters.length; + for (let i = 0; i < length; i++) { + result += characters.charAt(Math.floor(Math.random() * charactersLength)); + } + return result; +} + +export function getRandomInt(min = 0, max = 1000) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min) + min); // The maximum is exclusive and the minimum is inclusive +} + +export function getRandomGuid() { + return randomUUID(); +} + +export function getRandomBoolean() { + const bools = [true, false]; + const index = getRandomInt(0,2); + return bools[index]; +} \ No newline at end of file diff --git a/src/iss-components/questions-page-layout/questions-page-layout.vue b/src/iss-components/questions-page-layout/questions-page-layout.vue index 657d02b9..9a500e89 100644 --- a/src/iss-components/questions-page-layout/questions-page-layout.vue +++ b/src/iss-components/questions-page-layout/questions-page-layout.vue @@ -16,7 +16,7 @@ alertClass="alert-warning" :manualHeadline="alertFewMoreQuestionsHeader" :manualCopy="alertFewMoreQuestionsCopy" - v-bind:isDismissible="false" + v-bind:isDismissible="false" class="mt-5"/>
- - -
-
@@ -77,8 +78,8 @@ export default { }, buttonText() { return this.customButtontext - ? this.customButtontext - : this.getCmsContent(this.cmsWidgetName, "ForwardButtonText"); + ? this.customButtontext + : this.getCmsContent(this.cmsWidgetName, "ForwardButtonText"); }, footerImageURL() { @@ -126,6 +127,7 @@ export default { diff --git a/src/layouts/service-packages/service-package-question/service-package-question.vue b/src/layouts/service-packages/service-package-question/service-package-question.vue index 8b87774e..9f6779aa 100644 --- a/src/layouts/service-packages/service-package-question/service-package-question.vue +++ b/src/layouts/service-packages/service-package-question/service-package-question.vue @@ -63,20 +63,28 @@ }, servicePackageAnswers() { if (!this.cmsWidgetName) return []; - const cmsAnswersContent = [ + const cmsAnswersContent = []; + cmsAnswersContent.push( { Name: 'TierOne', cmsWidgetName: 'EconomyServicePackage' - }, - { - Name: 'TierTwo', - cmsWidgetName: 'StandardServicePackage' - }, + } + ); + if(this.shouldDisplayTierTwoPackage) + { + cmsAnswersContent.push( + { + Name: 'TierTwo', + cmsWidgetName: 'StandardServicePackage' + }, + ); + } + cmsAnswersContent.push( { Name: 'TierThree', cmsWidgetName: 'PremiumServicePackage' } - ]; + ); //if cms content has not yet loaded, skip if (this.getCmsContent(cmsAnswersContent[0].cmsWidgetName, 'HeaderText') == '') { return {}; @@ -96,27 +104,18 @@ return this.lineItemsContainsPartType(partTypeStrings.RECALIBRATION); }, frontWipersApplicableForTierTwo() { - const store = useMainStore(); const frontWipersAreAvailable = this.lineItemsContainsPartType( partTypeStrings.FRONT_WIPER ); - const isRepair = store.order.damage.isRepair; - const glassToReplaceContainsWindshield = this.glassToReplaceContainsGlassLocation( - glassLocations.WINDSHIELD - ); - if (frontWipersAreAvailable) { - if (isRepair) { - return true; - } else { - if (glassToReplaceContainsWindshield) { - return true; - } else { - return false; - } - } - } else { - return false; + const glassToReplaceContainsWindshield = this.glassToReplaceContainsGlassLocation(glassLocations.WINDSHIELD); + + if(frontWipersAreAvailable && (useMainStore().order.damage.isRepair || glassToReplaceContainsWindshield)) + { + return true; } + + return false; + }, rearWiperApplicableForTierTwo() { const rearWiperIsAvailable = this.lineItemsContainsPartType(partTypeStrings.REAR_WIPER); diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue index 5106203c..8d850808 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -51,6 +51,7 @@ groupName="BackGlassReplaceOptionsQuestion" validationRules="replace-options-required" /> { - selectedGlassToReplace.push({ - glassLocation: damageLocationsSelected.WINDSHIELD, - glassName: wsItem, - }); - } - ); - } - - if (this.isDriverSideReplace) { - this.sideDoorOptionsData.selectedDriverSideReplaceOptions.forEach((driverItem) => { - selectedGlassToReplace.push({ - glassLocation: damageLocationsSelected.DRIVER, - glassName: driverItem, - }); - }); - } - - if (this.isPassengerSideReplace) { - this.sideDoorOptionsData.selectedPassengerSideReplaceOptions.forEach( - (passengerItem) => { - selectedGlassToReplace.push({ - glassLocation: damageLocationsSelected.PASSENGER, - glassName: passengerItem, - }); - } - ); - } - - if (this.isRearWindowDamageLocation) { - selectedGlassToReplace.push({ - glassLocation: damageLocationsSelected.REAR, - glassName: this.selectedRearReplaceOptions, - }); - } - - return selectedGlassToReplace; - }, - }, - computed: { - isWindshieldDamageLocation() { - return this.selectedDamageLocations.some((selectedDamages) => { - return selectedDamages.toUpperCase() === damageLocationsCms.WINDSHIELD; - }); - }, - isSideDoorDamageLocation() { - return this.selectedDamageLocations.some((selectedDamages) => { - return selectedDamages.toUpperCase() === damageLocationsCms.SIDEDOOR; - }); - }, - isRearWindowDamageLocation() { - return this.selectedDamageLocations.some((selectedDamages) => { - return selectedDamages.toUpperCase() === damageLocationsCms.REARWINDOW; - }); - }, - isWindshieldRepair() { - return ( - this.isWindshieldDamageLocation && - this.selectedWindshieldOptions.selectedWindshieldDamageType === - damageLocationsSelected.REPAIR - ); - }, - isDriverSideReplace() { - if (!this.isSideDoorDamageLocation) return false; - - return this.sideDoorOptionsData.selectedDoorSides.some((selectedDriverSide) => { - return selectedDriverSide.toUpperCase() === damageLocationsCms.DRIVERSIDE; - }); - }, - isPassengerSideReplace() { - if (!this.isSideDoorDamageLocation) return false; - - return this.sideDoorOptionsData.selectedDoorSides.some((selectedPassengerSide) => { - return selectedPassengerSide.toUpperCase() === damageLocationsCms.PASSENGERSIDE; - }); - }, - hasRepairReplaceConflict() { - return ( - this.isWindshieldDamageLocation && - this.selectedDamageLocations.length > 1 && - this.isWindshieldRepair - ); - }, - hasSplitSingleConflict() { - if ( - !this.selectedDamageLocations?.includes("Windshield") || - this.selectedWindshieldOptions.selectedWindshieldDamageType === - damageLocationsSelected.REPAIR || - !this.selectedWindshieldOptions.selectedWindshieldReplaceOptions - ) - return false; - - return ( - this.selectedWindshieldOptions.selectedWindshieldReplaceOptions?.some( - (selectedSingleWindshield) => { - return ( - selectedSingleWindshield.toUpperCase() === - damageLocationsSelected.SINGLE.toUpperCase() - ); - } - ) && - (this.selectedWindshieldOptions.selectedWindshieldReplaceOptions?.some( - (selectedDriverWindshield) => { - return ( - selectedDriverWindshield.toUpperCase() === - damageLocationsSelected.DRIVER.toUpperCase() - ); - } - ) || - this.selectedWindshieldOptions.selectedWindshieldReplaceOptions?.some( - (selectedPassengerWindshield) => { - return ( - selectedPassengerWindshield.toUpperCase() === - damageLocationsSelected.PASSENGER.toUpperCase() - ); - } - )) - ); - }, - shouldDisplayVehicleChangeAlert() { - return this.$route.params[this.routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]; } }, - components: { - siteHeader, - siteFooter, - vehicleBanner, - siteSubHeader, - sideDoorOptions, - damageLocationQuestion, - windshieldOptions, - replaceOptionsQuestion, - Form, - alert, + selectedGlassToReplace() { + const selectedGlassToReplace = []; + if (this.isWindshieldDamageLocation && !this.isWindshieldRepair) { + this.selectedWindshieldOptions.selectedWindshieldReplaceOptions.forEach( + (wsItem) => { + selectedGlassToReplace.push({ + glassLocation: damageLocationsSelected.WINDSHIELD, + glassName: wsItem, + }); + } + ); + } + + if (this.isDriverSideReplace) { + this.sideDoorOptionsData.selectedDriverSideReplaceOptions.forEach((driverItem) => { + selectedGlassToReplace.push({ + glassLocation: damageLocationsSelected.DRIVER, + glassName: driverItem, + }); + }); + } + + if (this.isPassengerSideReplace) { + this.sideDoorOptionsData.selectedPassengerSideReplaceOptions.forEach( + (passengerItem) => { + selectedGlassToReplace.push({ + glassLocation: damageLocationsSelected.PASSENGER, + glassName: passengerItem, + }); + } + ); + } + + if (this.isRearWindowDamageLocation) { + selectedGlassToReplace.push({ + glassLocation: damageLocationsSelected.REAR, + glassName: this.selectedRearReplaceOptions, + }); + } + + return selectedGlassToReplace; }, - }; - + }, + computed: { + isWindshieldDamageLocation() { + return this.selectedDamageLocations.some((selectedDamages) => { + return selectedDamages.toUpperCase() === damageLocationsCms.WINDSHIELD; + }); + }, + isSideDoorDamageLocation() { + return this.selectedDamageLocations.some((selectedDamages) => { + return selectedDamages.toUpperCase() === damageLocationsCms.SIDEDOOR; + }); + }, + isRearWindowDamageLocation() { + return this.selectedDamageLocations.some((selectedDamages) => { + return selectedDamages.toUpperCase() === damageLocationsCms.REARWINDOW; + }); + }, + isWindshieldRepair() { + return ( + this.isWindshieldDamageLocation && + this.selectedWindshieldOptions.selectedWindshieldDamageType === + damageLocationsSelected.REPAIR + ); + }, + isDriverSideReplace() { + if (!this.isSideDoorDamageLocation) return false; + + return this.sideDoorOptionsData.selectedDoorSides.some((selectedDriverSide) => { + return selectedDriverSide.toUpperCase() === damageLocationsCms.DRIVERSIDE; + }); + }, + isPassengerSideReplace() { + if (!this.isSideDoorDamageLocation) return false; + + return this.sideDoorOptionsData.selectedDoorSides.some((selectedPassengerSide) => { + return selectedPassengerSide.toUpperCase() === damageLocationsCms.PASSENGERSIDE; + }); + }, + hasRepairReplaceConflict() { + return ( + this.isWindshieldDamageLocation && + this.selectedDamageLocations.length > 1 && + this.isWindshieldRepair + ); + }, + hasSplitSingleConflict() { + if ( + !this.selectedDamageLocations?.includes("Windshield") || + this.selectedWindshieldOptions.selectedWindshieldDamageType === + damageLocationsSelected.REPAIR || + !this.selectedWindshieldOptions.selectedWindshieldReplaceOptions + ) + return false; + + return ( + this.selectedWindshieldOptions.selectedWindshieldReplaceOptions?.some( + (selectedSingleWindshield) => { + return ( + selectedSingleWindshield.toUpperCase() === + damageLocationsSelected.SINGLE.toUpperCase() + ); + } + ) && + (this.selectedWindshieldOptions.selectedWindshieldReplaceOptions?.some( + (selectedDriverWindshield) => { + return ( + selectedDriverWindshield.toUpperCase() === + damageLocationsSelected.DRIVER.toUpperCase() + ); + } + ) || + this.selectedWindshieldOptions.selectedWindshieldReplaceOptions?.some( + (selectedPassengerWindshield) => { + return ( + selectedPassengerWindshield.toUpperCase() === + damageLocationsSelected.PASSENGER.toUpperCase() + ); + } + )) + ); + }, + shouldDisplayVehicleChangeAlert() { + return this.$route.params[this.routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]; + } + }, + + components: { + siteHeader, + siteFooter, + vehicleBanner, + siteSubHeader, + sideDoorOptions, + damageLocationQuestion, + windshieldOptions, + replaceOptionsQuestion, + Form, + alert, + }, +}; + diff --git a/src/layouts/vehicle-lookup/vehicle-lookup.spec.js b/src/layouts/vehicle-lookup/vehicle-lookup.spec.js index 085136f3..398ce254 100644 --- a/src/layouts/vehicle-lookup/vehicle-lookup.spec.js +++ b/src/layouts/vehicle-lookup/vehicle-lookup.spec.js @@ -1,12 +1,11 @@ /* eslint-env jest */ import { mount } from '@vue/test-utils'; import { navigationScenarios } from '@/router/router-constants/navigation-scenarios'; -import { issPageValues } from '@/router/router-constants/issPage-values'; import { queryStrings } from '@/constants/query-strings'; import { GaActions } from "@/constants/analytics"; import VehicleLookup from './vehicle-lookup.vue'; import {vinLookupMethodSelections} from '@/constants/vin-lookup-methods'; -import { useMainStore } from '../../store'; +import { useMainStore } from '@/store'; import { createTestingPinia } from '@pinia/testing'; import { mapStores } from "pinia"; diff --git a/src/layouts/vehicle-lookup/vehicle-lookup.vue b/src/layouts/vehicle-lookup/vehicle-lookup.vue index 9bebbd57..ee7d74df 100644 --- a/src/layouts/vehicle-lookup/vehicle-lookup.vue +++ b/src/layouts/vehicle-lookup/vehicle-lookup.vue @@ -11,7 +11,7 @@ - + diff --git a/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue b/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue index a5e862bd..88802069 100644 --- a/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue +++ b/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue @@ -181,12 +181,12 @@ export default { }, AutoSelectIfSinglePart() { - if (this.partsForSelectedTint?.length > 0) + if (this.partsForSelectedTint?.length > 0) { // Check if only a single part is present for the tint and set the v-model if it is. if (this.partsForSelectedTint?.length == 1) { this.selectedPartNumber = { value: this.partsForSelectedTint[0].partNumber }; - + // //select element with matching partNumber this.$nextTick(() => { const radioInput = document.querySelector('input[value=' + this.selectedPartNumber + ']'); @@ -199,7 +199,7 @@ export default { } } }, - + // Loads the preselected values from the store. LoadPreselectedValues() { this.$nextTick(() => { @@ -208,7 +208,7 @@ export default { { this.selectedTint = this.modelValue.color; } - }); + }); }, replaceAllSpaceWithDash(str) { diff --git a/src/layouts/vehicle-selection/vehicle-selection.vue b/src/layouts/vehicle-selection/vehicle-selection.vue index 1e86b9fb..d0996a69 100644 --- a/src/layouts/vehicle-selection/vehicle-selection.vue +++ b/src/layouts/vehicle-selection/vehicle-selection.vue @@ -1,5 +1,5 @@