summaryrefslogtreecommitdiff
path: root/spec/frontend/pipeline_editor/components/file-tree/file_item_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/pipeline_editor/components/file-tree/file_item_spec.js')
-rw-r--r--spec/frontend/pipeline_editor/components/file-tree/file_item_spec.js52
1 files changed, 0 insertions, 52 deletions
diff --git a/spec/frontend/pipeline_editor/components/file-tree/file_item_spec.js b/spec/frontend/pipeline_editor/components/file-tree/file_item_spec.js
deleted file mode 100644
index f12ac14c6be..00000000000
--- a/spec/frontend/pipeline_editor/components/file-tree/file_item_spec.js
+++ /dev/null
@@ -1,52 +0,0 @@
-import { GlLink } from '@gitlab/ui';
-import { shallowMount } from '@vue/test-utils';
-import FileIcon from '~/vue_shared/components/file_icon.vue';
-import PipelineEditorFileTreeItem from '~/pipeline_editor/components/file_tree/file_item.vue';
-import { mockIncludesWithBlob, mockDefaultIncludes } from '../../mock_data';
-
-describe('Pipeline editor file nav', () => {
- let wrapper;
-
- const createComponent = ({ file = mockDefaultIncludes } = {}) => {
- wrapper = shallowMount(PipelineEditorFileTreeItem, {
- propsData: {
- file,
- },
- });
- };
-
- const fileIcon = () => wrapper.findComponent(FileIcon);
- const link = () => wrapper.findComponent(GlLink);
-
- afterEach(() => {
- wrapper.destroy();
- });
-
- describe('template', () => {
- beforeEach(() => {
- createComponent();
- });
-
- it('renders file icon', () => {
- expect(fileIcon().exists()).toBe(true);
- });
-
- it('renders file name', () => {
- expect(wrapper.text()).toBe(mockDefaultIncludes.location);
- });
-
- it('links to raw path by default', () => {
- expect(link().attributes('href')).toBe(mockDefaultIncludes.raw);
- });
- });
-
- describe('when file has blob link', () => {
- beforeEach(() => {
- createComponent({ file: mockIncludesWithBlob });
- });
-
- it('links to blob path', () => {
- expect(link().attributes('href')).toBe(mockIncludesWithBlob.blob);
- });
- });
-});