2020-10-24 23:57:45 +05:30
|
|
|
import { createLocalVue, shallowMount } from '@vue/test-utils';
|
2021-03-11 19:13:27 +05:30
|
|
|
import Vuex from 'vuex';
|
|
|
|
import DeployFreezeModal from '~/deploy_freeze/components/deploy_freeze_modal.vue';
|
2020-10-24 23:57:45 +05:30
|
|
|
import DeployFreezeSettings from '~/deploy_freeze/components/deploy_freeze_settings.vue';
|
|
|
|
import DeployFreezeTable from '~/deploy_freeze/components/deploy_freeze_table.vue';
|
|
|
|
import createStore from '~/deploy_freeze/store';
|
2021-01-29 00:20:46 +05:30
|
|
|
import { timezoneDataFixture } from '../helpers';
|
2020-10-24 23:57:45 +05:30
|
|
|
|
|
|
|
const localVue = createLocalVue();
|
|
|
|
localVue.use(Vuex);
|
|
|
|
|
|
|
|
describe('Deploy freeze settings', () => {
|
|
|
|
let wrapper;
|
|
|
|
let store;
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
store = createStore({
|
|
|
|
projectId: '8',
|
|
|
|
timezoneData: timezoneDataFixture,
|
|
|
|
});
|
|
|
|
jest.spyOn(store, 'dispatch').mockImplementation();
|
|
|
|
wrapper = shallowMount(DeployFreezeSettings, {
|
|
|
|
localVue,
|
|
|
|
store,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
afterEach(() => {
|
|
|
|
wrapper.destroy();
|
|
|
|
wrapper = null;
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('Deploy freeze table contains components', () => {
|
|
|
|
it('contains deploy freeze table', () => {
|
|
|
|
expect(wrapper.find(DeployFreezeTable).exists()).toBe(true);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('contains deploy freeze modal', () => {
|
|
|
|
expect(wrapper.find(DeployFreezeModal).exists()).toBe(true);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|