Merge branch 'develop' into feature/SSR-131
This commit is contained in:
commit
34acc1c6ca
3 changed files with 8 additions and 15 deletions
|
|
@ -5,9 +5,8 @@
|
|||
<div class="select-car-form rounded text-center">
|
||||
<vehicleBanner cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage="true"/>
|
||||
<siteSubHeader
|
||||
cmsWidgetName="SiteSubHeaderWidget"
|
||||
cmsWidgetName="SiteSubHeaderWidget"
|
||||
:hasBackButton="true"
|
||||
:backButtonAccessibleText="backButtonAccessibleText"
|
||||
@click-event="backButtonAction"
|
||||
/>
|
||||
<div class="fade-on-route-transition">
|
||||
|
|
@ -97,12 +96,6 @@
|
|||
this.$route
|
||||
);
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
backButtonAccessibleText()
|
||||
{
|
||||
return this.getCmsContent(this.cmsWidgetName, "BackButtonAccessibleText")
|
||||
},
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -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 = [],
|
||||
}) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
};
|
||||
},
|
||||
props: {
|
||||
modelValue: String,
|
||||
modelValue: Number,
|
||||
cmsWidgetName: String,
|
||||
},
|
||||
components: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue