fix test
This commit is contained in:
parent
6f63484dff
commit
8e5dddd7cc
1 changed files with 16 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ import { mount, flushPromises } from '@vue/test-utils';
|
|||
import { createTestingPinia } from '@pinia/testing';
|
||||
import navigationScenarios from '@/router/router-constants/navigation-scenarios';
|
||||
import routerParams from '@/router/router-constants/router-params';
|
||||
import { useMainStore } from '@/store';
|
||||
import vehicleCategories from '@/constants/vehicle-categories';
|
||||
import VehicleDamageComponent from '@/layouts/vehicle-damage/vehicle-damage.vue';
|
||||
|
||||
|
|
@ -69,6 +70,21 @@ describe('vehicle-damage.vue', () => {
|
|||
const wrapper = mount(VehicleDamageComponent, mountOptions);
|
||||
const siteFooterWrapper = wrapper.getComponent({ ref: 'siteFooter' });
|
||||
|
||||
useMainStore().getSupportingItems = jest.fn().mockImplementation(() => Promise.resolve({
|
||||
data: { data: [
|
||||
{
|
||||
description: null,
|
||||
partNumber: 'SUPPLIES-REPAIR',
|
||||
partType: 'REPAIR FEE'
|
||||
},
|
||||
{
|
||||
description: null,
|
||||
partNumber: 'WSREPAIR',
|
||||
partType: 'REPAIR FEE'
|
||||
}
|
||||
] }
|
||||
}));
|
||||
|
||||
siteFooterWrapper.vm.$emit('forwardClicked');
|
||||
|
||||
await flushPromises();
|
||||
|
|
|
|||
Loading…
Reference in a new issue