2018-03-17 18:26:18 +05:30
|
|
|
import Vue from 'vue';
|
|
|
|
import placeholderSystemNote from '~/vue_shared/components/notes/placeholder_system_note.vue';
|
2018-03-27 19:54:05 +05:30
|
|
|
import mountComponent from 'spec/helpers/vue_mount_component_helper';
|
2018-03-17 18:26:18 +05:30
|
|
|
|
|
|
|
describe('placeholder system note component', () => {
|
|
|
|
let PlaceholderSystemNote;
|
|
|
|
let vm;
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
PlaceholderSystemNote = Vue.extend(placeholderSystemNote);
|
|
|
|
});
|
|
|
|
|
|
|
|
afterEach(() => {
|
|
|
|
vm.$destroy();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should render system note placeholder with plain text', () => {
|
|
|
|
vm = mountComponent(PlaceholderSystemNote, {
|
|
|
|
note: { body: 'This is a placeholder' },
|
|
|
|
});
|
|
|
|
|
|
|
|
expect(vm.$el.tagName).toEqual('LI');
|
|
|
|
expect(vm.$el.querySelector('.timeline-content em').textContent.trim()).toEqual('This is a placeholder');
|
|
|
|
});
|
|
|
|
});
|