Commit fa78fdbf authored by Walmyr Lima e Silva Filho's avatar Walmyr Lima e Silva Filho

Merge branch 'replace-e2e-test-by-rspec-test' into 'master'

Replace end-to-end test by RSpec test

Closes #34936 and #35354

See merge request gitlab-org/gitlab!21410
parents 1f57c998 1f5bae23
......@@ -315,8 +315,7 @@ export default {
<gl-dropdown-item
v-if="showDelete"
class="text-danger"
data-qa-selector="delete_board_button"
class="text-danger js-delete-board"
@click.prevent="showPage('delete')"
>
{{ s__('IssueBoards|Delete board') }}
......
# frozen_string_literal: true
require 'spec_helper'
describe 'Group Boards', :js do
let(:group) { create(:group) }
let!(:board_ux) { create(:board, group: group, name: 'UX') }
let!(:board_dev) { create(:board, group: group, name: 'Dev') }
let(:user) { create(:group_member, user: create(:user), group: group ).user }
before do
stub_licensed_features(multiple_group_issue_boards: true)
sign_in(user)
visit group_boards_path(group)
wait_for_requests
end
it 'deletes a group issue board' do
click_boards_dropdown
wait_for_requests
find(:css, '.js-delete-board button').click
find(:css, '.board-config-modal .js-primary-button').click
click_boards_dropdown
page.within('.js-boards-selector') do
expect(page).not_to have_content(board_dev.name)
expect(page).to have_content(board_ux.name)
end
end
def click_boards_dropdown
find(:css, '.js-dropdown-toggle').click
end
end
......@@ -22,7 +22,6 @@ module QA
element :boards_dropdown
element :boards_dropdown_content
element :create_new_board_button
element :delete_board_button
end
view 'app/assets/javascripts/vue_shared/components/deprecated_modal.vue' do
......@@ -129,12 +128,6 @@ module QA
set_name(board_name)
end
def delete_current_board
click_boards_dropdown_button
click_element(:delete_board_button)
click_element(:save_changes_button)
end
def has_modal_board_name_field?
has_element?(:board_name_field, wait: 1)
end
......
# frozen_string_literal: true
require 'securerandom'
module QA
# Failure issue: https://gitlab.com/gitlab-org/gitlab/issues/34936
context 'Plan', :quarantine do
describe 'Group issue boards' do
let(:board_1) { "Board-1-#{SecureRandom.hex(4)}" }
let(:board_2) { "Board-2-#{SecureRandom.hex(4)}" }
let(:group) do
QA::Resource::Group.fabricate_via_api!
end
before do
Flow::Login.sign_in
create_group_board(board_1)
create_group_board(board_2)
Page::Main::Menu.perform(&:go_to_groups)
Page::Dashboard::Groups.perform do |groups|
groups.click_group(group.path)
end
Page::Group::Menu.perform(&:go_to_issue_boards)
end
it 'deletes a group issue board via the GUI' do
EE::Page::Component::IssueBoard::Show.perform do |show|
show.delete_current_board
show.click_boards_dropdown_button
expect(show.boards_dropdown_content).not_to have_content(board_1)
expect(show.boards_dropdown_content).to have_content(board_2)
end
end
def create_group_board(name)
QA::EE::Resource::Board::GroupBoard.fabricate_via_api! do |group_board|
group_board.group = group
group_board.name = name
end
end
end
end
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