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, { const wrapper = shallowMount(dropdownQuestion, {
propsData: { propsData: {
options: {}, options: {},
modelValue: 0, modelValue: "0",
}, },
mixins: [mockMixin] mixins: [mockMixin]
}); });

View file

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

View file

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

View file

@ -9,7 +9,6 @@
</template> </template>
<script> <script>
import { useMainStore } from "@/store";
export default { export default {
name: "vehicle-banner", name: "vehicle-banner",
props: { props: {
@ -25,7 +24,7 @@ export default {
return this.genericVehicleImage; return this.genericVehicleImage;
} }
const imageUrl = useMainStore().order.vehicle.imageUrl; const imageUrl = this.mainStore.order.vehicle.imageUrl;
if (!imageUrl || imageUrl === "NULL"){ if (!imageUrl || imageUrl === "NULL"){
return this.getUnmatchedVehicleIcon(); return this.getUnmatchedVehicleIcon();
} }
@ -53,7 +52,7 @@ export default {
}, },
methods: { methods: {
getUnmatchedVehicleIcon(){ getUnmatchedVehicleIcon(){
switch(useMainStore().order.vehicle.category){ switch(this.mainStore.order.vehicle.category){
case this.vehicleCategories.CAR: case this.vehicleCategories.CAR:
return this.carUnmatchedVehicleIcon; return this.carUnmatchedVehicleIcon;
case this.vehicleCategories.SUV: 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 = { export const issPageValues = {
ERROR_404: "error-404",
WELCOME_PAGE: "welcome-page", WELCOME_PAGE: "welcome-page",
VEHICLE_MAKE: "vehicle-make", VEHICLE_MAKE: "vehicle-make",
VEHICLE_YEAR: "vehicle-year", VEHICLE_YEAR: "vehicle-year",

View file

@ -3,6 +3,7 @@ import { createApp } from 'vue';
import { createPinia } from "pinia"; import { createPinia } from "pinia";
import App from '@/App.vue'; import App from '@/App.vue';
describe("Store", () => { describe("Store", () => {
let store; let store;
@ -36,7 +37,7 @@ describe("Store", () => {
}, },
}; };
store.addEventToBus(store, event); store.addEventToBus(event);
expect(store.applicationUser.eventBus[0]).toEqual(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); 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); 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) const actual = store.eventBusItem(event.category, event.subCategory)