updates to unit testing
This commit is contained in:
parent
c282e3bfca
commit
9a0467d5ac
1 changed files with 9 additions and 0 deletions
|
|
@ -6,6 +6,12 @@ import { queryStrings } from '@/constants/query-strings';
|
|||
import { GaActions } from "@/constants/analytics";
|
||||
import VehicleLookup from './vehicle-lookup.vue';
|
||||
import {vinLookupMethodSelections} from '@/constants/vin-lookup-methods';
|
||||
import { useMainStore } from '../../store';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { mapStores } from "pinia";
|
||||
|
||||
const pinia = createTestingPinia();
|
||||
useMainStore(pinia);
|
||||
|
||||
const vinLookupMethodsMockData = {
|
||||
QuestionText: 'To find the right part, let’s get your VIN. Or we can look it up for you!',
|
||||
|
|
@ -63,6 +69,7 @@ function setupMocks() {
|
|||
mixins: [
|
||||
{
|
||||
computed: {
|
||||
...mapStores(useMainStore),
|
||||
GaActions() {
|
||||
return GaActions;
|
||||
},
|
||||
|
|
@ -181,6 +188,8 @@ describe('vehicle-lookup.vue', () => {
|
|||
answersFromCms: vinLookupMethodsMockData.Answers,
|
||||
});
|
||||
|
||||
useMainStore().updateVehicleVin = jest.fn();
|
||||
|
||||
const lookupByManualVinOptionLabel = wrapper.find('[data-test-id="vin-lookup-methods-button-question"] label[for="VinLookupMethods-ManualVin"]');
|
||||
await lookupByManualVinOptionLabel.trigger('mousedown');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue