Commit 39ee707c authored by Simon Knox's avatar Simon Knox

Don't show Jump to Discussion button on issue notes

parent 092445a4
......@@ -292,10 +292,12 @@ Please check your network connection and try again.`;
</button>
</div>
<div
v-if="note.resolvable"
class="btn-group discussion-actions"
role="group">
role="group"
>
<div
v-if="note.resolvable && !discussionResolved"
v-if="!discussionResolved"
class="btn-group"
role="group">
<a
......
---
title: Don't show Jump to Discussion button on Issues
merge_request:
author:
type: fixed
......@@ -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();
});
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment