Skip to content
Snippets Groups Projects
Commit 6305f1dc authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 1d388ed8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -101,37 +101,6 @@ describe('noteable_discussion component', () => {
});
});
 
describe('methods', () => {
describe('jumpToNextDiscussion', () => {
it('expands next unresolved thread', done => {
const discussion2 = getJSONFixture(discussionWithTwoUnresolvedNotes)[0];
discussion2.resolved = false;
discussion2.active = true;
discussion2.id = 'next'; // prepare this for being identified as next one (to be jumped to)
store.dispatch('setInitialNotes', [discussionMock, discussion2]);
window.mrTabs.currentAction = 'show';
wrapper.vm
.$nextTick()
.then(() => {
spyOn(wrapper.vm, 'expandDiscussion').and.stub();
const nextDiscussionId = discussion2.id;
setFixtures(`<div class="discussion" data-discussion-id="${nextDiscussionId}"></div>`);
wrapper.vm.jumpToNextDiscussion();
expect(wrapper.vm.expandDiscussion).toHaveBeenCalledWith({
discussionId: nextDiscussionId,
});
})
.then(done)
.catch(done.fail);
});
});
});
describe('for resolved thread', () => {
beforeEach(() => {
const discussion = getJSONFixture(discussionWithTwoUnresolvedNotes)[0];
Loading
Loading
Loading
Loading
@@ -263,7 +263,7 @@ RSpec.shared_examples 'mentions in notes' do |mentionable_type|
 
it 'returns all mentionable mentions' do
expect(mentionable.user_mentions.count).to eq 1
expect(mentionable.referenced_users).to eq [user, user2]
expect(mentionable.referenced_users).to match_array([user, user2])
expect(mentionable.referenced_projects(user)).to eq [mentionable.project].compact # epic.project is nil, and we want empty []
expect(mentionable.referenced_groups(user)).to eq [group]
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment