2019-07-25 05:24:42 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-08-29 07:56:52 +00:00
|
|
|
require 'spec_helper'
|
2018-08-01 16:17:56 +00:00
|
|
|
|
2020-06-16 18:09:01 +00:00
|
|
|
RSpec.describe 'Group Boards' do
|
2018-08-01 16:17:56 +00: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 18:09:48 +00:00
|
|
|
it 'adds an issue to the backlog' do
|
2018-08-01 16:17:56 +00:00
|
|
|
page.within(find('.board', match: :first)) do
|
|
|
|
issue_title = 'New Issue'
|
|
|
|
find(:css, '.issue-count-badge-add-button').click
|
2020-12-23 09:10:13 +00:00
|
|
|
|
|
|
|
wait_for_requests
|
|
|
|
|
2018-08-01 16:17:56 +00:00
|
|
|
expect(find('.board-new-issue-form')).to be_visible
|
|
|
|
|
|
|
|
fill_in 'issue_title', with: issue_title
|
|
|
|
|
2020-12-23 09:10:13 +00: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 16:17:56 +00:00
|
|
|
|
2021-04-01 12:08:56 +00:00
|
|
|
click_button 'Create issue'
|
2018-08-01 16:17:56 +00:00
|
|
|
|
|
|
|
expect(page).to have_content(issue_title)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|