Commit 21d5eadf authored by Kushal Pandya's avatar Kushal Pandya

Add tests for dropdown list type check

parent 481b2e91
......@@ -52,6 +52,45 @@ describe 'issue boards', :js do
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
visit project_boards_path(project)
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