This commit is contained in:
Kroell 2023-05-04 16:22:45 -04:00
parent 22d3e1501d
commit bb055c4806
2 changed files with 3 additions and 3 deletions

View file

@ -83,7 +83,7 @@ describe("glass-part-question.vue", () => {
},
],
};
const { wrapper } = setupMocks(featureListData);
//Act
@ -94,7 +94,7 @@ describe("glass-part-question.vue", () => {
await wrapper.setData({ selectedTint: "Green Tint" });
// to trigger the computed setter
wrapper.vm.selectedPartNumber = "DB12209GTYN";
//Assert
expect(wrapper.emitted()["update:modelValue"][0]).toEqual([
{ partNumber: "DB12209GTYN", color: "Green Tint" },

View file

@ -118,7 +118,7 @@ export default {
return this.modelValue?.partNumber;
},
set(newValue) {
const part = !newValue ? null : this.partsForSelectedTint.filter((part) => part.partNumber == newValue.value)[0]
const part = this.partsForSelectedTint.filter((part) => part.partNumber == newValue?.value)[0];
this.$emit("update:modelValue", part);
},
},