Commit 9de12ecd authored by Walmyr Lima e Silva Filho's avatar Walmyr Lima e Silva Filho

Merge branch 'prune-end-to-end-test' into 'master'

Prune epics management end-to-end test

See merge request gitlab-org/gitlab!22526
parents a25bac1f 195cf4d3
...@@ -160,7 +160,6 @@ module QA ...@@ -160,7 +160,6 @@ module QA
module Epic module Epic
autoload :Index, 'qa/ee/page/group/epic/index' autoload :Index, 'qa/ee/page/group/epic/index'
autoload :Show, 'qa/ee/page/group/epic/show' autoload :Show, 'qa/ee/page/group/epic/show'
autoload :Edit, 'qa/ee/page/group/epic/edit'
end end
module Secure module Secure
......
# frozen_string_literal: true
module QA
module EE
module Page
module Group
module Epic
class Edit < QA::Page::Base
include QA::Page::Component::Issuable::Common
def set_title(title)
fill_element :title_input, title
end
def set_description(description)
fill_element :description_textarea, description
end
def save_changes
click_element :save_button
wait(max: 5, interval: 1, reload: false) do
has_no_element?(:save_button)
end
end
def delete_epic
page.accept_alert("Epic will be removed! Are you sure?") do
click_element :delete_button
end
end
end
end
end
end
end
end
...@@ -38,14 +38,6 @@ module QA ...@@ -38,14 +38,6 @@ module QA
has_element?(:epic_title_text, text: title) has_element?(:epic_title_text, text: title)
end end
end end
def has_no_epic?(title)
# First, check that the new epic button is present,
# meaning that the test is in the right page before
# checking that the epic is not there.
find_element(:new_epic_button)
has_no_element?(:epic_title_text, text: title)
end
end end
end end
end end
......
...@@ -54,12 +54,6 @@ module QA ...@@ -54,12 +54,6 @@ module QA
click_element :edit_button click_element :edit_button
end end
def delete_epic
page.accept_alert("Epic will be removed! Are you sure?") do
click_element :delete_epic_button
end
end
def close_reopen_epic def close_reopen_epic
click_element :close_reopen_epic_button click_element :close_reopen_epic_button
end end
......
...@@ -7,30 +7,13 @@ module QA ...@@ -7,30 +7,13 @@ module QA
Flow::Login.sign_in Flow::Login.sign_in
end end
it 'creates, edits, and deletes an epic' do it 'creates an epic' do
epic_title = 'Epic created via GUI' epic_title = 'Epic created via GUI'
epic = EE::Resource::Epic.fabricate_via_browser_ui! do |epic| EE::Resource::Epic.fabricate_via_browser_ui! do |epic|
epic.title = epic_title epic.title = epic_title
end end
expect(page).to have_content(epic_title) expect(page).to have_content(epic_title)
epic_edited_title = 'Epic edited via GUI'
EE::Page::Group::Epic::Show.perform(&:click_edit_button)
EE::Page::Group::Epic::Edit.perform do |edit|
edit.set_title(epic_edited_title)
edit.save_changes
expect(edit).to have_content(epic_edited_title)
end
epic.visit!
EE::Page::Group::Epic::Show.perform(&:click_edit_button)
EE::Page::Group::Epic::Edit.perform(&:delete_epic)
EE::Page::Group::Epic::Index.perform do |index|
expect(index).to have_no_epic(epic_edited_title)
end
end end
context 'Resources created via API' do context 'Resources created via API' do
......
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