CSR-735 | Fix tests

This commit is contained in:
Scott Kiener 2022-08-29 11:35:38 -04:00
parent 06abbc03df
commit 2296379e02
2 changed files with 2 additions and 3 deletions

View file

@ -29,7 +29,6 @@ export default ({
get: function() { get: function() {
// Convert to CMS answer name from bool // Convert to CMS answer name from bool
var cmsAnswerValue = this.modelValue ? "InsuranceAnswer" : "CashAnswer"; var cmsAnswerValue = this.modelValue ? "InsuranceAnswer" : "CashAnswer";
// list-button-horizontal expects an array of values
return cmsAnswerValue; return cmsAnswerValue;
}, },
set: function(newValue) { set: function(newValue) {

View file

@ -194,7 +194,7 @@ describe("list-button-horizontal.vue", () => {
}); });
wrapper.vm.handleCheckChange(); wrapper.vm.handleCheckChange();
// Assert // Assert
expect(wrapper.emitted()["isCheckedChanged"][0]).toEqual([{value: "List Card Checkbox", checkValue: Boolean}]); expect(wrapper.emitted()["isCheckedChanged"][0]).toEqual([{value: "List Card Checkbox", checkValue: Boolean, buttonId: undefined, checkValue: undefined}]);
}); });
it("Should set checkValue data if selectedButtonIDs has value(s)", async () => { it("Should set checkValue data if selectedButtonIDs has value(s)", async () => {
@ -215,7 +215,7 @@ describe("list-button-horizontal.vue", () => {
}, },
}); });
// Assert // Assert
expect(wrapper.componentVM.checkValue).toEqual("Car-Front"); expect(wrapper.componentVM.checkValue).toEqual(["Car-Front"]);
}); });
it("Should run handleCheckChange if selectingInitiatesLoad is false and handleInputChange is triggered", async () => { it("Should run handleCheckChange if selectingInitiatesLoad is false and handleInputChange is triggered", async () => {