summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorSimon Knox <psimyn@gmail.com>2018-03-28 16:11:06 +1100
committerSimon Knox <psimyn@gmail.com>2018-03-28 16:11:06 +1100
commit39ee707c0a1244af673f56a3dce306244f0c3718 (patch)
treec8c0365486906833e18399a7c58306639bcf2a8c /spec
parent092445a4025bc1033e2028655ba739961f5e4ebb (diff)
downloadgitlab-ce-39ee707c0a1244af673f56a3dce306244f0c3718.tar.gz
Don't show Jump to Discussion button on issue notes44717-no-resolve-issue
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/notes/components/noteable_discussion_spec.js18
1 files changed, 13 insertions, 5 deletions
diff --git a/spec/javascripts/notes/components/noteable_discussion_spec.js b/spec/javascripts/notes/components/noteable_discussion_spec.js
index 19504e4f7c8..cda550760fe 100644
--- a/spec/javascripts/notes/components/noteable_discussion_spec.js
+++ b/spec/javascripts/notes/components/noteable_discussion_spec.js
@@ -25,26 +25,34 @@ describe('issue_discussion component', () => {
});
it('should render user avatar', () => {
- expect(vm.$el.querySelector('.user-avatar-link')).toBeDefined();
+ expect(vm.$el.querySelector('.user-avatar-link')).not.toBeNull();
});
it('should render discussion header', () => {
- expect(vm.$el.querySelector('.discussion-header')).toBeDefined();
+ expect(vm.$el.querySelector('.discussion-header')).not.toBeNull();
expect(vm.$el.querySelector('.notes').children.length).toEqual(discussionMock.notes.length);
});
describe('actions', () => {
it('should render reply button', () => {
- expect(vm.$el.querySelector('.js-vue-discussion-reply').textContent.trim()).toEqual('Reply...');
+ expect(vm.$el.querySelector('.js-vue-discussion-reply').textContent.trim()).toEqual(
+ 'Reply...',
+ );
});
- it('should toggle reply form', (done) => {
+ it('should toggle reply form', done => {
vm.$el.querySelector('.js-vue-discussion-reply').click();
Vue.nextTick(() => {
- expect(vm.$refs.noteForm).toBeDefined();
+ expect(vm.$refs.noteForm).not.toBeNull();
expect(vm.isReplying).toEqual(true);
done();
});
});
+
+ it('does not render jump to discussion button', () => {
+ expect(
+ vm.$el.querySelector('*[data-original-title="Jump to next unresolved discussion"]'),
+ ).toBeNull();
+ });
});
});