Commit 11ba5ccd authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Always show new issue in Open list

parent 54db08f2
...@@ -39,14 +39,13 @@ ...@@ -39,14 +39,13 @@
{{ list.issuesSize }} {{ list.issuesSize }}
= render_if_exists "shared/boards/components/list_weight" = render_if_exists "shared/boards/components/list_weight"
- if can?(current_user, :admin_list, current_board_parent) %button.issue-count-badge-add-button.btn.btn-sm.btn-default.ml-1.has-tooltip.js-no-trigger-collapse{ type: "button",
%button.issue-count-badge-add-button.btn.btn-sm.btn-default.ml-1.has-tooltip.js-no-trigger-collapse{ type: "button", "@click" => "showNewIssueForm",
"@click" => "showNewIssueForm", "v-if" => 'list.type == "backlog" || (!disabled && list.type !== "closed")',
"v-if" => 'list.type !== "closed"', "aria-label" => _("New issue"),
"aria-label" => _("New issue"), "title" => _("New issue"),
"title" => _("New issue"), data: { placement: "top", container: "body" } }
data: { placement: "top", container: "body" } } = icon("plus", class: "js-no-trigger-collapse")
= icon("plus", class: "js-no-trigger-collapse")
%board-list{ "v-if" => 'list.type !== "blank" && list.type !== "promotion"', %board-list{ "v-if" => 'list.type !== "blank" && list.type !== "promotion"',
":list" => "list", ":list" => "list",
......
...@@ -94,8 +94,14 @@ describe 'Issue Boards new issue', :js do ...@@ -94,8 +94,14 @@ describe 'Issue Boards new issue', :js do
wait_for_requests wait_for_requests
end end
it 'does not display new issue button' do it 'displays new issue button in open list' do
expect(page).to have_selector('.issue-count-badge-add-button', count: 0) expect(first('.board')).to have_selector('.issue-count-badge-add-button', count: 1)
end
it 'does not display new issue button in label list' do
page.within('.board:nth-child(2)') do
expect(page).not_to have_selector('.issue-count-badge-add-button')
end
end end
end end
end end
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