Commit b9867966 authored by charlieablett's avatar charlieablett

Move divergent ee code from boards_spec

parent 5840c36a
......@@ -6,6 +6,8 @@ describe 'issue boards', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :public) }
let!(:board) { create(:board, project: project) }
let(:milestone) { create(:milestone, title: "v2.2", project: project) }
let!(:board_with_milestone) { create(:board, project: project, milestone: milestone) }
context 'issue board focus mode' do
before do
......@@ -141,6 +143,22 @@ describe 'issue boards', :js do
end
end
context 'locked milestone' do
before do
visit project_board_path(project, board_with_milestone)
wait_for_requests
end
it 'should not have remove button' do
expect(page).to have_selector('.js-visual-token .remove-token', count: 0)
end
it 'should not be able to be backspaced' do
find('.input-token .filtered-search').native.send_key(:backspace)
expect(page).to have_selector('.js-visual-token', count: 1)
end
end
def badge(list)
find(".board[data-id='#{list.id}'] .issue-count-badge")
end
......
......@@ -6,9 +6,7 @@ describe 'Issue Boards', :js do
let(:group) { create(:group, :nested) }
let(:project) { create(:project, :public, namespace: group) }
let(:milestone) { create(:milestone, title: "v2.2", project: project) }
let!(:board) { create(:board, project: project) }
let!(:board_with_milestone) { create(:board, project: project, milestone: milestone) }
let(:board) { create(:board, project: project) }
let(:user) { create(:user) }
let!(:user2) { create(:user) }
......@@ -23,7 +21,7 @@ describe 'Issue Boards', :js do
context 'no lists' do
before do
visit project_boards_path(project)
visit project_board_path(project, board)
wait_for_requests
expect(page).to have_selector('.board', count: 3)
end
......@@ -89,7 +87,7 @@ describe 'Issue Boards', :js do
let!(:issue10) { create(:labeled_issue, project: project, title: 'issue +', description: 'A+ great issue', labels: [a_plus]) }
before do
visit project_boards_path(project)
visit project_board_path(project, board)
wait_for_requests
......@@ -168,7 +166,7 @@ describe 'Issue Boards', :js do
create(:labeled_issue, project: project, labels: [planning])
end
visit project_boards_path(project)
visit project_board_path(project, board)
wait_for_requests
page.within(find('.board:nth-child(2)')) do
......@@ -528,25 +526,9 @@ describe 'Issue Boards', :js do
end
end
context 'locked milestone' do
before do
visit project_board_path(project, board_with_milestone)
wait_for_requests
end
it 'should not have remove button' do
expect(page).to have_selector('.js-visual-token .remove-token', count: 0)
end
it 'should not be able to be backspaced' do
find('.input-token .filtered-search').native.send_key(:backspace)
expect(page).to have_selector('.js-visual-token', count: 1)
end
end
context 'keyboard shortcuts' do
before do
visit project_boards_path(project)
visit project_board_path(project, board)
wait_for_requests
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