Commit 0e4ee261 authored by Robert Speicher's avatar Robert Speicher

Merge branch '6474-fix-assignees-list-showing-on-unsupported-license' into 'master'

Resolve "Assignee list UI should only appear in Premium or higher"

Closes #6474

See merge request gitlab-org/gitlab-ee!6171
parents e1792086 21d5eadf
.dropdown.prepend-left-10#js-add-list - if board.parent.feature_available?(:board_assignee_lists)
.dropdown.prepend-left-10#js-add-list
%button.btn.btn-create.btn-inverted.d-flex.js-new-board-list{ type: "button", data: board_list_data } %button.btn.btn-create.btn-inverted.d-flex.js-new-board-list{ type: "button", data: board_list_data }
%span Add list %span Add list
= sprite_icon('chevron-down', size: 16, css_class: 'prepend-left-5 btn-new-board-list-chevron') = sprite_icon('chevron-down', size: 16, css_class: 'prepend-left-5 btn-new-board-list-chevron')
...@@ -7,7 +8,7 @@ ...@@ -7,7 +8,7 @@
%li.nav-item.dropdown-tab-item.js-tab-button-labels %li.nav-item.dropdown-tab-item.js-tab-button-labels
%a.active{ href: '#', role: 'tab', data: { is_link: 'true', toggle: 'tab', action: 'tab-labels', target: '#tab-labels' } } %a.active{ href: '#', role: 'tab', data: { is_link: 'true', toggle: 'tab', action: 'tab-labels', target: '#tab-labels' } }
Label list Label list
%li.nav-item.dropdown-tab-item.js-tab-button-labels %li.nav-item.dropdown-tab-item.js-tab-button-assignees
%a{ href: '#', role: 'tab', data: { is_link: 'true', toggle: 'tab', action: 'tab-assignees', target: '#tab-assignees' } } %a{ href: '#', role: 'tab', data: { is_link: 'true', toggle: 'tab', action: 'tab-assignees', target: '#tab-assignees' } }
Assignee list Assignee list
.tab-content .tab-content
...@@ -18,3 +19,5 @@ ...@@ -18,3 +19,5 @@
#tab-assignees.tab-pane.tab-pane-assignees.js-tab-container-assignees{ role: 'tabpanel' } #tab-assignees.tab-pane.tab-pane-assignees.js-tab-container-assignees{ role: 'tabpanel' }
= render partial: "shared/issuable/assignee_page_default" = render partial: "shared/issuable/assignee_page_default"
= dropdown_loading = dropdown_loading
- else
= render_ce 'shared/issuable/board_create_list_dropdown', board: board
...@@ -52,6 +52,45 @@ describe 'issue boards', :js do ...@@ -52,6 +52,45 @@ describe 'issue boards', :js do
end end
end end
context 'add list dropdown' do
let(:group) { create(:group) }
let(:project) { create(:project, :public, namespace: group) }
before do
project.add_master(user)
group.add_reporter(user)
login_as(user)
end
it 'shows tabbed dropdown with labels list and assignees list' do
stub_licensed_features(board_assignee_lists: true)
visit_board_page
page.within('#js-add-list') do
page.find('.js-new-board-list').click
wait_for_requests
expect(page).to have_css('.dropdown-menu.dropdown-menu-tabs')
expect(page).to have_css('.js-tab-button-labels')
expect(page).to have_css('.js-tab-button-assignees')
end
end
it 'shows simple dropdown with only labels list' do
stub_licensed_features(board_assignee_lists: false)
visit_board_page
page.within('#js-add-list') do
page.find('.js-new-board-list').click
wait_for_requests
expect(page).to have_css('.dropdown-menu.js-tab-container-labels')
expect(page).to have_content('Create lists from labels. Issues with that label appear in that list.')
expect(page).not_to have_css('.js-tab-button-assignees')
end
end
end
def visit_board_page def visit_board_page
visit project_boards_path(project) visit project_boards_path(project)
wait_for_requests wait_for_requests
......
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