Commit cc7531fc authored by Dan Davison's avatar Dan Davison

Merge branch 'qa-tentative-to-de-quarantine-e2e-test' into 'master'

Tentative to de-quarantine e2e test for promoting issue into epic

Closes gitlab-org/quality/staging#29

See merge request gitlab-org/gitlab-ee!13913
parents cda78970 8b080d57
...@@ -71,7 +71,7 @@ export default { ...@@ -71,7 +71,7 @@ export default {
'issue-realtime-pre-pulse': preAnimation, 'issue-realtime-pre-pulse': preAnimation,
'issue-realtime-trigger-pulse': pulseAnimation, 'issue-realtime-trigger-pulse': pulseAnimation,
}" }"
class="title" class="title qa-title"
dir="auto" dir="auto"
v-html="titleHtml" v-html="titleHtml"
></h2> ></h2>
......
...@@ -28,8 +28,9 @@ module QA ...@@ -28,8 +28,9 @@ module QA
click_element :create_epic_button click_element :create_epic_button
end end
def click_first_epic def click_first_epic(page = nil)
all_elements(:epic_title_text).first.click all_elements(:epic_title_text).first.click
page.validate_elements_present! if page
end end
end end
end end
......
...@@ -8,13 +8,8 @@ module QA ...@@ -8,13 +8,8 @@ module QA
class Show < QA::Page::Base class Show < QA::Page::Base
include QA::Page::Component::Issuable::Common include QA::Page::Component::Issuable::Common
view 'ee/app/assets/javascripts/related_issues/constants.js' do view 'app/assets/javascripts/issue_show/components/title.vue' do
element :add_issues_button element :title, required: true
end
view 'ee/app/assets/javascripts/related_issues/components/add_issuable_form.vue' do
element :add_issue_input
element :add_issue_button
end end
view 'app/assets/javascripts/vue_shared/components/issue/related_issuable_item.vue' do view 'app/assets/javascripts/vue_shared/components/issue/related_issuable_item.vue' do
...@@ -25,6 +20,15 @@ module QA ...@@ -25,6 +20,15 @@ module QA
element :close_reopen_epic_button element :close_reopen_epic_button
end end
view 'ee/app/assets/javascripts/related_issues/components/add_issuable_form.vue' do
element :add_issue_button
element :add_issue_input
end
view 'ee/app/assets/javascripts/related_issues/constants.js' do
element :add_issues_button
end
def add_issue_to_epic(issue_url) def add_issue_to_epic(issue_url)
click_element :add_issues_button click_element :add_issues_button
fill_element :add_issue_input, issue_url fill_element :add_issue_input, issue_url
......
# frozen_string_literal: true # frozen_string_literal: true
module QA module QA
# Failure issue: https://gitlab.com/gitlab-org/quality/staging/issues/29 context 'Plan' do
context 'Plan', :quarantine do
describe 'promote issue to epic' do describe 'promote issue to epic' do
let(:issue_title) { "My Awesome Issue #{SecureRandom.hex(8)}" } let(:issue_title) { "My Awesome Issue #{SecureRandom.hex(8)}" }
...@@ -10,21 +9,20 @@ module QA ...@@ -10,21 +9,20 @@ module QA
Runtime::Browser.visit(:gitlab, Page::Main::Login) Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.act { sign_in_using_credentials } Page::Main::Login.act { sign_in_using_credentials }
group = Resource::Group.fabricate! group = Resource::Group.fabricate_via_api!
project = Resource::Project.fabricate! do |project| project = Resource::Project.fabricate_via_api! do |project|
project.name = 'promote-issue-to-epic' project.name = 'promote-issue-to-epic'
project.description = 'Project to promote issue to epic' project.description = 'Project to promote issue to epic'
project.group = group project.group = group
end end
Resource::Issue.fabricate! do |issue| Resource::Issue.fabricate_via_browser_ui! do |issue|
issue.title = issue_title issue.title = issue_title
issue.project = project issue.project = project
end end
Page::Project::Issue::Show.perform do |show| Page::Project::Issue::Show.perform do |show|
show.select_all_activities_filter
show.comment('/promote') show.comment('/promote')
expect(show).to have_content("promoted to epic") expect(show).to have_content("promoted to epic")
...@@ -32,7 +30,9 @@ module QA ...@@ -32,7 +30,9 @@ module QA
group.visit! group.visit!
QA::EE::Page::Group::Menu.perform(&:click_group_epics_link) QA::EE::Page::Group::Menu.perform(&:click_group_epics_link)
QA::EE::Page::Group::Epic::Index.perform(&:click_first_epic) QA::EE::Page::Group::Epic::Index.perform do |index|
index.click_first_epic(QA::EE::Page::Group::Epic::Show)
end
expect(page).to have_content(issue_title) expect(page).to have_content(issue_title)
expect(page).to have_content(/promoted from issue .* \(closed\)/) expect(page).to have_content(/promoted from issue .* \(closed\)/)
......
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