Commit 912d5405 authored by Mark Lapierre's avatar Mark Lapierre

Merge branch 'qa-fix-promote-issue-to-epic-spec' into 'master'

Fix promote issue to epic spec

Closes #35880

See merge request gitlab-org/gitlab!21077
parents 004da229 4cc6bb7a
...@@ -62,7 +62,8 @@ export default { ...@@ -62,7 +62,8 @@ export default {
:disabled="epicCreateInProgress" :disabled="epicCreateInProgress"
:placeholder="__('Title')" :placeholder="__('Title')"
type="text" type="text"
class="form-control qa-epic-title" class="form-control"
data-qa-selector="epic_title_field"
@keyup.enter.exact="createEpic" @keyup.enter.exact="createEpic"
/> />
<loading-button <loading-button
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
.issuable-info-container .issuable-info-container
.issuable-main-info .issuable-main-info
.issue-title.title .issue-title.title
%span.issue-title-text.qa-epic-title-text %span.issue-title-text{ data: { qa_selector: 'epic_title_text' } }
= link_to epic.title, epic_path(epic) = link_to epic.title, epic_path(epic)
.issuable-info .issuable-info
%span.issuable-reference %span.issuable-reference
......
...@@ -8,7 +8,7 @@ module QA ...@@ -8,7 +8,7 @@ module QA
class Index < QA::Page::Base class Index < QA::Page::Base
view 'ee/app/assets/javascripts/epic/components/epic_create.vue' do view 'ee/app/assets/javascripts/epic/components/epic_create.vue' do
element :new_epic_button element :new_epic_button
element :epic_title element :epic_title_field
element :create_epic_button element :create_epic_button
end end
...@@ -21,7 +21,7 @@ module QA ...@@ -21,7 +21,7 @@ module QA
end end
def set_title(title) def set_title(title)
fill_element :epic_title, title fill_element :epic_title_field, title
end end
def create_new_epic def create_new_epic
...@@ -32,6 +32,12 @@ module QA ...@@ -32,6 +32,12 @@ module QA
all_elements(:epic_title_text).first.click all_elements(:epic_title_text).first.click
page.validate_elements_present! if page page.validate_elements_present! if page
end end
def has_epic_title?(title)
wait do
has_element?(:epic_title_text, text: title)
end
end
end end
end end
end end
......
...@@ -38,6 +38,8 @@ module QA ...@@ -38,6 +38,8 @@ module QA
group.visit! group.visit!
Page::Group::Menu.perform(&:click_group_epics_link) Page::Group::Menu.perform(&:click_group_epics_link)
QA::EE::Page::Group::Epic::Index.perform do |index| QA::EE::Page::Group::Epic::Index.perform do |index|
expect(index).to have_epic_title(issue_title)
index.click_first_epic(QA::EE::Page::Group::Epic::Show) index.click_first_epic(QA::EE::Page::Group::Epic::Show)
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