Merge pull request #61 from Safelite/defect/Digital/SSR-153

SSR.-153. Resolve "Invalid prop" warning after a year is selected in "vehicle-year" page
This commit is contained in:
Johan Gunawan 2022-12-06 09:22:03 -05:00 committed by GitHub
commit 915dc8634e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -6,8 +6,8 @@ import { useMainStore } from "@/store";
describe("year-question.vue", () => {
test("Selected year is emitted upon selection.", async () => {
//Arrange
const { wrapper } = setupMocks({ modelValueProp: "2020" });
const yearToSelect = "2021";
const { wrapper } = setupMocks({ modelValueProp: 2020 });
const yearToSelect = 2021;
//Act
wrapper.setValue({ modelValue: yearToSelect });
@ -15,7 +15,7 @@ describe("year-question.vue", () => {
//Assert
expect(wrapper.emitted()["update:modelValue"][0]).toEqual([
{ modelValue: "2021" },
{ modelValue: 2021 },
]);
});
});
@ -24,7 +24,7 @@ describe("year-question.vue", () => {
test("Data from store api are used as radio question answers.", async () => {
//Arrange
const { wrapper, cmsContent } = setupMocks({
dataFromStoreApi: ["2023", "2022", "2021"],
dataFromStoreApi: [2023, 2022, 2021],
});
//Act
@ -46,7 +46,7 @@ describe("year-question.vue", () => {
function setupMocks({
modelValueProp = "1900",
modelValueProp = 1900,
cmsQuestionText = "CMS text goes here",
dataFromStoreApi = [],
}) {

View file

@ -24,7 +24,7 @@
};
},
props: {
modelValue: String,
modelValue: Number,
cmsWidgetName: String,
},
components: {