.btn.btn-default.discussion-create-issue-btn.has-tooltip{title: "Resolve all discussions in new issue",
"aria-label"=>"Resolve all discussions in new issue",
"data-container"=>"body"}
=link_tocustom_icon('icon_mr_issue'),new_namespace_project_issue_path(@project.namespace,@project,merge_request_for_resolving_discussions: merge_request.iid),title: "Resolve all discussions in new issue",class: 'new-issue-for-discussion'
it'shows a button to resolve all discussions by creating a new issue'do
within('li#resolve-count-app')do
expect(page).tohave_link"Resolve all discussions in new issue",href: new_namespace_project_issue_path(project.namespace,project,merge_request_for_resolving_discussions: merge_request.iid)
expect(page).not_tohave_link'open an issue to resolve them later'
expect(page).not_tohave_link"Resolve all discussions in new issue",href: new_namespace_project_issue_path(project.namespace,project,merge_request_for_resolving_discussions: merge_request.iid)
end
end
end
end
context'merge request has discussions that need to be resolved'do
click_link"Resolve all discussions in new issue",href: new_namespace_project_issue_path(project.namespace,project,merge_request_for_resolving_discussions: merge_request.iid)
end
end
it'shows a warning that the merge request contains unresolved discussions'do
it_behaves_like'creating an issue for a discussion'
expect(page).tohave_content'This merge request has unresolved discussions'
end
context'for a project where all discussions need to be resolved before merging'do
it'has a link to resolve all discussions by creating an issue'do
context'with the internal tracker disabled'do
page.within'.mr-widget-body'do
beforedo
expect(page).tohave_link'open an issue to resolve them later',href: new_namespace_project_issue_path(project.namespace,project,merge_request_for_resolving_discussions: merge_request.iid)
expect(page).not_tohave_link'open an issue to resolve them later'
end
end
end
end
context'creating an issue for discussions'do
context'merge request has discussions that need to be resolved'do
beforedo
beforedo
page.click_link'open an issue to resolve them later',href: new_namespace_project_issue_path(project.namespace,project,merge_request_for_resolving_discussions: merge_request.iid)
it'has a link to resolve all discussions by creating an issue'do
page.within'.mr-widget-body'do
expect(page).tohave_link'open an issue to resolve them later',href: new_namespace_project_issue_path(project.namespace,project,merge_request_for_resolving_discussions: merge_request.iid)
end
end
end
it_behaves_like'creating an issue for a discussion'
context'creating an issue for discussions'do
beforedo
page.click_link'open an issue to resolve them later',href: new_namespace_project_issue_path(project.namespace,project,merge_request_for_resolving_discussions: merge_request.iid)
end
it_behaves_like'creating an issue for a discussion'