Merge pull request #614 from Safelite/BRM-re-add-vin-lookup-changes-for-test-page

Re add vin lookup changes for test page so Quote page will work locally.
This commit is contained in:
bmauger 2022-07-14 15:06:38 -04:00 committed by GitHub
commit 63ec72c1ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 35 deletions

View file

@ -5,6 +5,7 @@ module.exports = {
preset: "@vue/cli-plugin-unit-jest", preset: "@vue/cli-plugin-unit-jest",
transform: { "^.+\\.vue$": "vue-jest" }, transform: { "^.+\\.vue$": "vue-jest" },
moduleFileExtensions: ["js", "vue"], moduleFileExtensions: ["js", "vue"],
modulePathIgnorePatterns: ["vin-lookup"],
collectCoverageFrom: [ collectCoverageFrom: [
"src/**/*.{js,vue}", "src/**/*.{js,vue}",
"!src/main.js", "!src/main.js",
@ -16,7 +17,8 @@ module.exports = {
"!src/layouts/reveal/**/*.vue", "!src/layouts/reveal/**/*.vue",
"!src/ux-components/text-link/**/*.vue", "!src/ux-components/text-link/**/*.vue",
"!src/common-components/question-chain/**/*.vue", "!src/common-components/question-chain/**/*.vue",
"!src/layouts/quote/**/*.vue", "!src/layouts/quote/**/*.vue", // Temporary
"!src/layouts/vin-lookup/**/*.vue", //Temporary for Quote page testing
// END // END
], // ! means exclude from coverage. ], // ! means exclude from coverage.
testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"], testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"],

View file

@ -330,12 +330,12 @@ export default {
return this.$refs.funnelFooter.removeLoader(); return this.$refs.funnelFooter.removeLoader();
}, },
async navigateForward(){ async navigateForward(){
if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) { this.$router.navigate(this.navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, this.$route, {}, {});
this.$router.navigate(this.navigationScenarios.SELECTED_VIN_HAS_MISMATCHED_GLASS, this.$route, {}, { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true }); if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) {
} else { this.$router.navigate(this.navigationScenarios.SELECTED_VIN_HAS_MISMATCHED_GLASS, this.$route, {}, { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true });
await this.navigateForwardWithSingleCarMatch(); } else {
} await this.navigateForwardWithSingleCarMatch();
}
}, },
}, },
mounted() { mounted() {

View file

@ -114,12 +114,13 @@ const routingTable = [
}, },
{ {
scenario: navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, scenario: navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS,
destinationFmgPageValue: fmgPageValues.PART_QUESTIONS //destinationFmgPageValue: fmgPageValues.PART_QUESTIONS
destinationFmgPageValue: fmgPageValues.QUOTE,
}, },
{ {
scenario: navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, scenario: navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS,
destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS
} },
], ],
}, },
{ {
@ -186,10 +187,6 @@ const routingTable = [
{ {
scenario: navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, scenario: navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS,
destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS
},
{
scenario: navigationScenarios.SELECTED_PROVIDE_VIN_DIFFERENT_WAY,
destinationFmgPageValue: fmgPageValues.ESTIMATE
} }
], ],
}, },