Commit ff600b84 authored by Mike Greiling's avatar Mike Greiling

Merge branch 'revert-744cb32e' into 'master'

Revert "Merge branch '12775-hide-issue-boards-switcher' into 'master'"

See merge request gitlab-org/gitlab!17546
parents d6d51d73 926cd962
......@@ -88,7 +88,7 @@ module BoardsHelper
end
def boards_link_text
if multiple_boards_available?
if current_board_parent.multiple_issue_boards_available?
s_("IssueBoards|Boards")
else
s_("IssueBoards|Board")
......
......@@ -6,7 +6,7 @@
.issues-filters{ class: ("w-100" if type == :boards_modal) }
.issues-details-filters.filtered-search-block.d-flex.flex-column.flex-md-row{ class: block_css_class, "v-pre" => type == :boards_modal }
- if type == :boards && (multiple_boards_available? || current_board_parent.boards.size > 1)
- if type == :boards
= render "shared/boards/switcher", board: board
= form_tag page_filter_path, method: :get, class: 'filter-form js-filter-form w-100' do
- if params[:search].present?
......
......@@ -19,23 +19,28 @@ describe 'Multiple Issue Boards', :js do
login_as(user)
end
it 'does not show board switcher' do
it 'hides the link to create a new board' do
visit boards_path
wait_for_requests
expect(page).not_to have_css('.boards-switcher')
end
click_button board.name
it 'shows the board switcher when group has more than one board' do
create(:board, parent: parent)
page.within('.js-boards-selector .dropdown-menu') do
expect(page).not_to have_content('Create new board')
expect(page).not_to have_content('Delete board')
end
end
it 'does not show license warning when there is one board created' do
visit boards_path
wait_for_requests
expect(page).to have_css('.boards-switcher')
click_button board.name
expect(page).not_to have_content('Some of your boards are hidden, activate a license to see them again.')
end
it 'shows license warning when group has more than one board' do
it 'shows a license warning when group has more than one board' do
create(:board, parent: parent)
visit boards_path
......
......@@ -56,8 +56,7 @@ describe 'Labels Hierarchy', :js do
context 'scoped boards' do
context 'for group boards' do
let!(:board) { create(:board, group: parent) }
let!(:board_2) { create(:board, group: parent) }
let(:board) { create(:board, group: parent) }
before do
visit group_board_path(parent, board)
......
......@@ -11,10 +11,6 @@ shared_examples_for 'multiple issue boards' do
wait_for_requests
end
it 'shows board switcher' do
expect(page).to have_css('.boards-switcher')
end
it 'shows current board name' do
page.within('.boards-switcher') do
expect(page).to have_content(board.name)
......
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