summaryrefslogtreecommitdiff
path: root/spec/frontend/ide/components/ide_status_list_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/ide/components/ide_status_list_spec.js')
-rw-r--r--spec/frontend/ide/components/ide_status_list_spec.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/spec/frontend/ide/components/ide_status_list_spec.js b/spec/frontend/ide/components/ide_status_list_spec.js
index 99c27ca30fb..847464ed806 100644
--- a/spec/frontend/ide/components/ide_status_list_spec.js
+++ b/spec/frontend/ide/components/ide_status_list_spec.js
@@ -1,13 +1,14 @@
import Vuex from 'vuex';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import IdeStatusList from '~/ide/components/ide_status_list.vue';
+import TerminalSyncStatusSafe from '~/ide/components/terminal_sync/terminal_sync_status_safe.vue';
const TEST_FILE = {
name: 'lorem.md',
- eol: 'LF',
editorRow: 3,
editorColumn: 23,
fileLanguage: 'markdown',
+ content: 'abc\nndef',
};
const localVue = createLocalVue();
@@ -55,7 +56,8 @@ describe('ide/components/ide_status_list', () => {
});
it('shows file eol', () => {
- expect(wrapper.text()).toContain(TEST_FILE.name);
+ expect(wrapper.text()).not.toContain('CRLF');
+ expect(wrapper.text()).toContain('LF');
});
it('shows file editor position', () => {
@@ -78,13 +80,9 @@ describe('ide/components/ide_status_list', () => {
});
});
- it('adds slot as child of list', () => {
- createComponent({
- slots: {
- default: ['<div class="js-test">Hello</div>', '<div class="js-test">World</div>'],
- },
- });
+ it('renders terminal sync status', () => {
+ createComponent();
- expect(wrapper.find('.ide-status-list').findAll('.js-test').length).toEqual(2);
+ expect(wrapper.find(TerminalSyncStatusSafe).exists()).toBe(true);
});
});