Commit 93fc57a0 authored by Walmyr Lima e Silva Filho's avatar Walmyr Lima e Silva Filho

Merge branch 'e2e-test-to-delete-board-via-gui' into 'master'

Add end-to-end test to delete board via the graphical user interface

Closes gitlab-org/quality/testcases#226

See merge request gitlab-org/gitlab!18522
parents 6fdf318d efa7a51f
...@@ -316,6 +316,7 @@ export default { ...@@ -316,6 +316,7 @@ export default {
<gl-dropdown-item <gl-dropdown-item
v-if="showDelete" v-if="showDelete"
class="text-danger" class="text-danger"
data-qa-selector="delete_board_button"
@click.prevent="showPage('delete')" @click.prevent="showPage('delete')"
> >
{{ s__('IssueBoards|Delete board') }} {{ s__('IssueBoards|Delete board') }}
......
...@@ -22,6 +22,7 @@ module QA ...@@ -22,6 +22,7 @@ module QA
element :boards_dropdown element :boards_dropdown
element :boards_dropdown_content element :boards_dropdown_content
element :create_new_board_button element :create_new_board_button
element :delete_board_button
end end
view 'app/assets/javascripts/vue_shared/components/deprecated_modal.vue' do view 'app/assets/javascripts/vue_shared/components/deprecated_modal.vue' do
...@@ -128,6 +129,12 @@ module QA ...@@ -128,6 +129,12 @@ module QA
set_name(board_name) set_name(board_name)
end 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? def has_modal_board_name_field?
has_element?(:board_name_field, wait: 1) has_element?(:board_name_field, wait: 1)
end end
......
# frozen_string_literal: true
require 'securerandom'
module QA
context 'Plan' 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
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
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