2019-07-25 01:24:42 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-08-29 03:56:52 -04:00
|
|
|
require 'spec_helper'
|
2018-08-01 12:17:56 -04:00
|
|
|
|
2020-06-16 14:09:01 -04:00
|
|
|
RSpec.describe 'Group Boards' do
|
2018-08-01 12:17:56 -04:00
|
|
|
let(:group) { create(:group) }
|
|
|
|
let!(:project) { create(:project_empty_repo, group: group) }
|
|
|
|
let(:user) { create(:group_member, :maintainer, user: create(:user), group: group ).user }
|
|
|
|
|
|
|
|
before do
|
|
|
|
sign_in(user)
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'Creates a an issue', :js do
|
|
|
|
before do
|
|
|
|
visit group_boards_path(group)
|
|
|
|
end
|
|
|
|
|
2020-12-09 13:09:48 -05:00
|
|
|
it 'adds an issue to the backlog' do
|
2018-08-01 12:17:56 -04:00
|
|
|
page.within(find('.board', match: :first)) do
|
|
|
|
issue_title = 'New Issue'
|
|
|
|
find(:css, '.issue-count-badge-add-button').click
|
2020-12-23 04:10:13 -05:00
|
|
|
|
|
|
|
wait_for_requests
|
|
|
|
|
2018-08-01 12:17:56 -04:00
|
|
|
expect(find('.board-new-issue-form')).to be_visible
|
|
|
|
|
|
|
|
fill_in 'issue_title', with: issue_title
|
|
|
|
|
2020-12-23 04:10:13 -05:00
|
|
|
page.within("[data-testid='project-select-dropdown']") do
|
|
|
|
find('button.gl-dropdown-toggle').click
|
|
|
|
|
|
|
|
find('.gl-new-dropdown-item button').click
|
|
|
|
end
|
2018-08-01 12:17:56 -04:00
|
|
|
|
|
|
|
click_button 'Submit issue'
|
|
|
|
|
|
|
|
expect(page).to have_content(issue_title)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|