This commit is contained in:
CarlNation 2022-02-18 11:49:40 -05:00
parent 5b9dd1ce0d
commit e3cdbfbe6c
2 changed files with 4 additions and 31 deletions

View file

@ -122,37 +122,6 @@ describe("vehicle-damage.vue", () => {
});
});
describe("vehicle-damage.vue", () => {
test("Windshield Options ares initailized with api data", async (done) => {
//Arrange
const pageHeaderWidgetHeaderText = "Select Damage";
const { wrapper, apiPromise } = setupMocks({
pageHeaderWidgetHeaderText: pageHeaderWidgetHeaderText,
});
//Act
vehicleDamage.beforeRouteEnter.call(
wrapper.vm,
{ query: { fmgPage: "vehicle-damage" } },
undefined,
(c) => c(wrapper.vm)
);
//Assert
apiPromise.finally(() => {
expect(funnelSubHeader.methods.initializeComponent).toHaveBeenCalledWith(
pageHeaderWidgetHeaderText
);
done();
});
});
});
describe("vehicle-damage.vue", () => {
test("CarId set, arePagePrerequisitesValid should be true ", async () => {
//Arrange

View file

@ -79,6 +79,8 @@ export default ({
return this.selectedValues.selectedWindshieldDamageType;
},
set: function(newValue) {
this.selectedValues.selectedWindshieldChipCount = null;
this.selectedValues.selectedWindshieldReplaceOptions = null;
this.selectedValues = this.getWindshieldOptions(newValue, this.selectedWindshieldChipCountValues, this.selectedWindshieldReplaceOptionsValues);
}
},
@ -87,6 +89,7 @@ export default ({
return this.selectedValues.selectedChipCount;
},
set: function(newValue) {
this.selectedValues.selectedWindshieldReplaceOptions = null;
this.selectedValues = this.getWindshieldOptions(this.selectedWindshieldDamageTypeValues, newValue, this.selectedWindshieldReplaceOptionsValues);
}
},
@ -95,6 +98,7 @@ export default ({
return this.selectedValues.selectedWindshieldReplaceOptions;
},
set: function(newValue) {
this.selectedValues.selectedWindshieldChipCount = null;
this.selectedValues = this.getWindshieldOptions(this.selectedWindshieldDamageTypeValues, this.selectedWindshieldChipCountValues, newValue);
}
},