completed tests, removed old 404 page and cleared up a few warnings

This commit is contained in:
Jason Wheeler 2022-11-09 12:12:42 -05:00
parent 4475508db5
commit 292c46fe34
7 changed files with 11 additions and 20 deletions

View file

@ -152,7 +152,7 @@ describe("dropdownQuestion.vue", () => {
const wrapper = shallowMount(dropdownQuestion, {
propsData: {
options: {},
modelValue: 0,
modelValue: "0",
},
mixins: [mockMixin]
});

View file

@ -37,6 +37,8 @@ export default {
disableAutoFill: Boolean,
validationRules: String,
cmsWidgetName: String,
hasError: Boolean,
errors: Array
},
setup(props) {
const propsClone = Object.assign({}, props);

View file

@ -55,6 +55,7 @@ export default {
validationRules: String,
cmsWidgetName: String,
maxLength: String,
disableAutoFill: Boolean,
},
setup(props) {
const propsClone = Object.assign({}, props);

View file

@ -9,7 +9,6 @@
</template>
<script>
import { useMainStore } from "@/store";
export default {
name: "vehicle-banner",
props: {
@ -25,7 +24,7 @@ export default {
return this.genericVehicleImage;
}
const imageUrl = useMainStore().order.vehicle.imageUrl;
const imageUrl = this.mainStore.order.vehicle.imageUrl;
if (!imageUrl || imageUrl === "NULL"){
return this.getUnmatchedVehicleIcon();
}
@ -53,7 +52,7 @@ export default {
},
methods: {
getUnmatchedVehicleIcon(){
switch(useMainStore().order.vehicle.category){
switch(this.mainStore.order.vehicle.category){
case this.vehicleCategories.CAR:
return this.carUnmatchedVehicleIcon;
case this.vehicleCategories.SUV:

View file

@ -1,11 +0,0 @@
<template>
<div>
404: Page Not Found
</div>
</template>
<script>
export default {
name: 'error-404'
}
</script>

View file

@ -1,5 +1,4 @@
export const issPageValues = {
ERROR_404: "error-404",
WELCOME_PAGE: "welcome-page",
VEHICLE_MAKE: "vehicle-make",
VEHICLE_YEAR: "vehicle-year",

View file

@ -3,6 +3,7 @@ import { createApp } from 'vue';
import { createPinia } from "pinia";
import App from '@/App.vue';
describe("Store", () => {
let store;
@ -36,7 +37,7 @@ describe("Store", () => {
},
};
store.addEventToBus(store, event);
store.addEventToBus(event);
expect(store.applicationUser.eventBus[0]).toEqual(event);
});
@ -53,11 +54,11 @@ describe("Store", () => {
},
};
store.addEventToBus(store, event);
store.addEventToBus(event);
expect(store.applicationUser.eventBus.length).toBe(1);
store.removeEventFromBus(store, { category: event.category, subCategory: event.subCategory })
store.removeEventFromBus({ category: event.category, subCategory: event.subCategory })
expect(store.applicationUser.eventBus.length).toBe(0);
});
@ -74,7 +75,7 @@ describe("Store", () => {
},
};
store.addEventToBus(store, event);
store.addEventToBus(event);
const actual = store.eventBusItem(event.category, event.subCategory)