2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-12-04 20:38:33 +05:30
|
|
|
require 'spec_helper'
|
2018-11-18 11:00:15 +05:30
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
RSpec.describe 'Group Boards' do
|
2018-11-18 11:00:15 +05:30
|
|
|
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
|
|
|
|
|
2021-02-22 17:27:13 +05:30
|
|
|
it 'adds an issue to the backlog' do
|
2018-11-18 11:00:15 +05:30
|
|
|
page.within(find('.board', match: :first)) do
|
|
|
|
issue_title = 'New Issue'
|
|
|
|
find(:css, '.issue-count-badge-add-button').click
|
2021-03-08 18:12:59 +05:30
|
|
|
|
|
|
|
wait_for_requests
|
|
|
|
|
2018-11-18 11:00:15 +05:30
|
|
|
expect(find('.board-new-issue-form')).to be_visible
|
|
|
|
|
|
|
|
fill_in 'issue_title', with: issue_title
|
|
|
|
|
2021-03-08 18:12:59 +05:30
|
|
|
page.within("[data-testid='project-select-dropdown']") do
|
|
|
|
find('button.gl-dropdown-toggle').click
|
|
|
|
|
|
|
|
find('.gl-new-dropdown-item button').click
|
|
|
|
end
|
2018-11-18 11:00:15 +05:30
|
|
|
|
2021-04-29 21:17:54 +05:30
|
|
|
click_button 'Create issue'
|
2018-11-18 11:00:15 +05:30
|
|
|
|
|
|
|
expect(page).to have_content(issue_title)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|