diff options
author | Sam Bigelow <sbigelow@gitlab.com> | 2019-04-24 14:09:36 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-04-24 14:09:36 +0000 |
commit | 699957ef59a516171ee6aba25e3ff6c8bb71b6bb (patch) | |
tree | 820a4723eeab38b2510577f3310a672ff5376f05 /spec/features | |
parent | 27a964078bd6cd5aab5f7146d3cd8ceadc6de794 (diff) | |
download | gitlab-ce-699957ef59a516171ee6aba25e3ff6c8bb71b6bb.tar.gz |
Resolve "Merge Request Popover is not working on the To Do page"
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/dashboard/todos/todos_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/features/dashboard/todos/todos_spec.rb b/spec/features/dashboard/todos/todos_spec.rb index fd8677feab5..d58e3b2841e 100644 --- a/spec/features/dashboard/todos/todos_spec.rb +++ b/spec/features/dashboard/todos/todos_spec.rb @@ -17,6 +17,26 @@ describe 'Dashboard Todos' do end end + context 'when the todo references a merge request' do + let(:referenced_mr) { create(:merge_request, source_project: project) } + let(:note) { create(:note, project: project, note: "Check out #{referenced_mr.to_reference}") } + let!(:todo) { create(:todo, :mentioned, user: user, project: project, author: author, note: note) } + + before do + sign_in(user) + visit dashboard_todos_path + end + + it 'renders the mr link with the extra attributes' do + link = page.find_link(referenced_mr.to_reference) + + expect(link).not_to be_nil + expect(link['data-iid']).to eq(referenced_mr.iid.to_s) + expect(link['data-project-path']).to eq(referenced_mr.project.full_path) + expect(link['data-mr-title']).to eq(referenced_mr.title) + end + end + context 'User has a todo', :js do before do create(:todo, :mentioned, user: user, project: project, target: issue, author: author) |