Merge pull request #612 from Safelite/feature/CSR-732
Changed the number of visible end characters of VINs on address-vehic…
This commit is contained in:
commit
41237f1309
5 changed files with 6 additions and 43 deletions
|
|
@ -351,10 +351,9 @@ describe("address-lookup.vue", () => {
|
|||
addressQuestions: mockRegistrationAddress
|
||||
},
|
||||
isCarIdDifferent: true,
|
||||
isGlassAvailableForCarId: false,
|
||||
isSelectedGlassAvailableForVehicle: false,
|
||||
})
|
||||
|
||||
|
||||
let carsFound = [{
|
||||
vin: "TEST_VIN2",
|
||||
vehicle: {
|
||||
|
|
@ -499,38 +498,6 @@ describe("address-lookup.vue", () => {
|
|||
expect(wrapper.findComponent({ ref: "alertNonServiceableZip" }).isVisible()).toBe(true);
|
||||
});
|
||||
|
||||
// test.only("if registration address is provided user clicks continue => show service zip field on continue click", async () => {
|
||||
// // Arrange
|
||||
// const mockRegistrationAddress = {
|
||||
// streetAddress: "1234 Main St",
|
||||
// city: "Columbus",
|
||||
// state: "OH",
|
||||
// zipCode: "43215"
|
||||
// }
|
||||
|
||||
// const { wrapper } = setupMocks({
|
||||
// isZipServiceable: false
|
||||
// }
|
||||
// );
|
||||
|
||||
// expect(wrapper.vm.showServiceZipField).toBeFalsy();
|
||||
// expect(wrapper.findComponent({ ref: "serviceZip" }).exists()).toBe(false);
|
||||
// store.commit(storeMutations.UPDATE_CAR_ID, "CARID");
|
||||
|
||||
// await wrapper.setData({
|
||||
// customerQuestions: {
|
||||
// addressQuestions: mockRegistrationAddress
|
||||
// }
|
||||
// })
|
||||
|
||||
// // Act
|
||||
// await wrapper.vm.forwardButtonAction();
|
||||
|
||||
// // Assert
|
||||
// expect(wrapper.vm.showServiceZipField).toBe(true);
|
||||
// expect(wrapper.findComponent({ ref: "serviceZip" }).isVisible()).toBe(true);
|
||||
// });
|
||||
|
||||
test("if registration address, service zip are provided, and user clicks continue => don't update service address", async () => {
|
||||
// Arrange
|
||||
const mockRegistrationAddress = {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ export default {
|
|||
displayVinLookupByHomeAddressNotAllowedAlert: false,
|
||||
previouslyEnteredCarId: "",
|
||||
isCarIdDifferent: false,
|
||||
isSelectedGlassAvailableForVehicle: false,
|
||||
isSelectedGlassAvailableForVehicle: true,
|
||||
customAlertData: {},
|
||||
displayInvalidZipAlert: false,
|
||||
showServiceZipField: this.getServiceZipFromStore(),
|
||||
|
|
@ -230,9 +230,6 @@ export default {
|
|||
const carFound = carsFound[0].vehicle;
|
||||
|
||||
this.isCarIdDifferent = carFound.carId !== this.$store.getters.vehicle.carId;
|
||||
console.log(this.isCarIdDifferent);
|
||||
console.log(carFound.carId);
|
||||
console.log(this.$store.getters.vehicle.carId);
|
||||
if (this.isCarIdDifferent && carFound.carId !== this.previouslyEnteredCarId) {
|
||||
// Display Alert
|
||||
this.previouslyEnteredCarId = carFound.carId;
|
||||
|
|
@ -261,7 +258,6 @@ console.log(this.$store.getters.vehicle.carId);
|
|||
|
||||
} else {
|
||||
// No VINS found.
|
||||
console.log("no vins");
|
||||
this.displayVinNotFoundAlert = true;
|
||||
return this.$refs.funnelFooter.removeLoader();
|
||||
|
||||
|
|
|
|||
|
|
@ -125,8 +125,8 @@ export default {
|
|||
// Map API result data, to address-vehicles data structure
|
||||
const mappedData = this.VehiclesFromApi.map((v) => {
|
||||
const maskSymbol = "X";
|
||||
const vinStart = maskSymbol.repeat(v.vin.length-4);
|
||||
const vinEnd = v.vin.substring(v.vin.length-4);
|
||||
const vinStart = maskSymbol.repeat(v.vin.length - 6);
|
||||
const vinEnd = v.vin.substring(v.vin.length - 6);
|
||||
return {
|
||||
vin: v.vin,
|
||||
vehicle: v.vehicle,
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ export default {
|
|||
displayVinNotFoundAlert: false,
|
||||
displayMatchedDifferentVehicleAlert: false,
|
||||
previouslyEnteredCarId: "",
|
||||
isSelectedGlassAvailableForVehicle: false,
|
||||
isSelectedGlassAvailableForVehicle: true,
|
||||
isCarIdDifferent: false,
|
||||
customAlertData: {},
|
||||
displayInvalidZipAlert: false,
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ export default {
|
|||
customAlertData: {},
|
||||
previouslyEnteredCarId: '',
|
||||
vinPopulatedOnPageLoad: this.getVinFromStore()?.length > 0,
|
||||
isSelectedGlassAvailableForVehicle: false,
|
||||
isSelectedGlassAvailableForVehicle: true,
|
||||
displayInvalidZipAlert: false,
|
||||
displayNonServiceableZipAlert: false,
|
||||
displayVinNotFoundAlert: false,
|
||||
|
|
|
|||
Loading…
Reference in a new issue