debian-mirror-gitlab/spec/frontend/pages/projects/learn_gitlab/components/learn_gitlab_section_card_spec.js

28 lines
721 B
JavaScript
Raw Normal View History

2021-04-29 21:17:54 +05:30
import { shallowMount } from '@vue/test-utils';
import LearnGitlabSectionCard from '~/pages/projects/learn_gitlab/components/learn_gitlab_section_card.vue';
import { testActions } from './mock_data';
const defaultSection = 'workspace';
2021-06-08 01:23:25 +05:30
const testImage = 'workspace.svg';
2021-04-29 21:17:54 +05:30
describe('Learn GitLab Section Card', () => {
let wrapper;
afterEach(() => {
wrapper.destroy();
wrapper = null;
});
const createWrapper = () => {
wrapper = shallowMount(LearnGitlabSectionCard, {
2021-06-08 01:23:25 +05:30
propsData: { section: defaultSection, actions: testActions, svg: testImage },
2021-04-29 21:17:54 +05:30
});
};
it('renders correctly', () => {
createWrapper({ completed: false });
expect(wrapper.element).toMatchSnapshot();
});
});