diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-02-22 16:01:10 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-02-22 16:01:10 +0000 |
commit | 4753368d2f1bb62eab76bb3276f0859f8eec140d (patch) | |
tree | 73f20e0153913d51d5ba273a960b136c28ce6ee1 /spec | |
parent | 91335c59fd3a0a1dc5cd83835d086ac1699316b9 (diff) | |
parent | 0494930d7a939297a071bb817ad0227da17dda1b (diff) | |
download | gitlab-ce-4753368d2f1bb62eab76bb3276f0859f8eec140d.tar.gz |
Merge branch 'add_mr_info_to_issues_list' into 'master'
Add merge request count to each issue on issues list
Closes #19786 and #23208
See merge request !9252
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/issuables/issuable_list_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/features/issuables/issuable_list_spec.rb b/spec/features/issuables/issuable_list_spec.rb index e31bc40adc3..0bf7977fb02 100644 --- a/spec/features/issuables/issuable_list_spec.rb +++ b/spec/features/issuables/issuable_list_spec.rb @@ -30,6 +30,13 @@ describe 'issuable list', feature: true do end end + it "counts merge requests closing issues icons for each issue" do + visit_issuable_list(:issue) + + expect(page).to have_selector('.icon-merge-request-unmerged', count: 1) + expect(first('.icon-merge-request-unmerged').find(:xpath, '..')).to have_content(1) + end + def visit_issuable_list(issuable_type) if issuable_type == :issue visit namespace_project_issues_path(project.namespace, project) @@ -53,5 +60,15 @@ describe 'issuable list', feature: true do create(:award_emoji, :downvote, awardable: issuable) create(:award_emoji, :upvote, awardable: issuable) end + + if issuable_type == :issue + issue = Issue.reorder(:iid).first + merge_request = create(:merge_request, + title: FFaker::Lorem.sentence, + source_project: project, + source_branch: FFaker::Name.name) + + MergeRequestsClosingIssues.create!(issue: issue, merge_request: merge_request) + end end end |