diff options
| author | Filipa Lacerda <filipa@gitlab.com> | 2017-07-28 11:20:17 +0100 |
|---|---|---|
| committer | Filipa Lacerda <filipa@gitlab.com> | 2017-07-28 11:30:13 +0100 |
| commit | 7639fb189c2fb5664cc8a89c03680d5de4b22db3 (patch) | |
| tree | 527bb8441f2b9599488a64ad288c40c86426aacb /spec/javascripts | |
| parent | 6530035fb031ab00a8d3fd6726b6d71296b462e8 (diff) | |
| download | gitlab-ce-7639fb189c2fb5664cc8a89c03680d5de4b22db3.tar.gz | |
[ci skip] Adds tests for placeholder system note
Diffstat (limited to 'spec/javascripts')
| -rw-r--r-- | spec/javascripts/notes/components/issue_placeholder_note_spec.js | 43 | ||||
| -rw-r--r-- | spec/javascripts/notes/components/issue_placeholder_system_note_spec.js | 25 |
2 files changed, 68 insertions, 0 deletions
diff --git a/spec/javascripts/notes/components/issue_placeholder_note_spec.js b/spec/javascripts/notes/components/issue_placeholder_note_spec.js new file mode 100644 index 00000000000..f4d8e01bfe6 --- /dev/null +++ b/spec/javascripts/notes/components/issue_placeholder_note_spec.js @@ -0,0 +1,43 @@ +import Vue from 'vue'; +import placeholderNote from '~/notes/components/issue_placeholder_note.vue'; + +describe('issue placeholder system note component', () => { + let mountComponent; + beforeEach(() => { + const PlaceholderNote = Vue.extend(placeholderNote); + + mountComponent = props => new PlaceholderNote({ + propsData: { + note: props, + }, + }).$mount(); + }); + + describe('user information', () => { + it('should render user avatar with link', () => { + + }); + }); + + describe('note content', () => { + it('should render note header information', () => { + + }); + + it('should render note body', () => { + + }); + + it('should render system note placeholder with markdown', () => { + + }); + + it('should render emojis', () => { + + }); + + it('should render slash commands', () => { + + }); + }); +}); diff --git a/spec/javascripts/notes/components/issue_placeholder_system_note_spec.js b/spec/javascripts/notes/components/issue_placeholder_system_note_spec.js new file mode 100644 index 00000000000..fd28b33d60b --- /dev/null +++ b/spec/javascripts/notes/components/issue_placeholder_system_note_spec.js @@ -0,0 +1,25 @@ +import Vue from 'vue'; +import placeholderSystemNote from '~/notes/components/issue_placeholder_system_note.vue'; + +describe('issue placeholder system note component', () => { + let mountComponent; + beforeEach(() => { + const PlaceholderSystemNote = Vue.extend(placeholderSystemNote); + + mountComponent = props => new PlaceholderSystemNote({ + propsData: { + note: { + body: props, + }, + }, + }).$mount(); + }); + + it('should render system note placeholder with plain text', () => { + const vm = mountComponent('This is a placeholder'); + + expect(vm.$el.tagName).toEqua('LI'); + + expect(vm.$el.querySelector('.timeline-content i').textContent.trim()).toEqua('This is a placeholder'); + }); +}); |
