2020-04-22 17:21:12 +01:00
|
|
|
// Copyright (C) 2020 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
import Vuex from 'vuex';
|
2022-09-08 15:11:09 +01:00
|
|
|
import { createLocalVue, shallowMount } from '@vue/test-utils';
|
2020-04-22 17:21:12 +01:00
|
|
|
|
2022-09-08 15:11:09 +01:00
|
|
|
import { ProjectsApiMock } from '../mock/api/projects';
|
2020-04-22 17:21:12 +01:00
|
|
|
|
|
|
|
import { PaymentsHttpApi } from '@/api/payments';
|
2020-12-01 16:53:57 +00:00
|
|
|
import { router } from '@/router';
|
2020-04-22 17:21:12 +01:00
|
|
|
import { makePaymentsModule } from '@/store/modules/payments';
|
|
|
|
import { makeProjectsModule } from '@/store/modules/projects';
|
|
|
|
|
2022-09-08 15:11:09 +01:00
|
|
|
import OnboardingTourArea from '@/components/onboardingTour/OnboardingTourArea.vue';
|
2020-04-22 17:21:12 +01:00
|
|
|
|
|
|
|
const localVue = createLocalVue();
|
|
|
|
localVue.use(Vuex);
|
|
|
|
|
|
|
|
const projectsApi = new ProjectsApiMock();
|
|
|
|
const projectsModule = makeProjectsModule(projectsApi);
|
|
|
|
const paymentsApi = new PaymentsHttpApi();
|
|
|
|
const paymentsModule = makePaymentsModule(paymentsApi);
|
|
|
|
|
2022-09-08 15:11:09 +01:00
|
|
|
const store = new Vuex.Store({ modules: { projectsModule, paymentsModule } });
|
2020-04-22 17:21:12 +01:00
|
|
|
|
|
|
|
describe('OnboardingTourArea.vue', () => {
|
|
|
|
it('renders correctly', (): void => {
|
|
|
|
const wrapper = shallowMount(OnboardingTourArea, {
|
|
|
|
store,
|
|
|
|
localVue,
|
2020-12-01 16:53:57 +00:00
|
|
|
router,
|
2020-04-22 17:21:12 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
});
|