Commit eeb5239e authored by Walmyr Lima's avatar Walmyr Lima

Adjust epic management end-to-end test

This adjustment is needed due to a feature change. Now, the way we
relate issues to epics has changed, and so the test needed to be
updated accordingly.

This change is related to the following failure in the following
nightly pipeline:
https://gitlab.com/gitlab-org/quality/nightly/-/jobs/347826845
parent 1d8f7f5c
...@@ -77,6 +77,7 @@ export default { ...@@ -77,6 +77,7 @@ export default {
<template> <template>
<li <li
class="tree-item list-item pt-0 pb-0" class="tree-item list-item pt-0 pb-0"
data-qa-selector="related_issue_item"
:class="{ :class="{
'has-children': hasChildren, 'has-children': hasChildren,
'item-expanded': childrenFlags[itemReference].itemExpanded, 'item-expanded': childrenFlags[itemReference].itemExpanded,
......
...@@ -12,10 +12,6 @@ module QA ...@@ -12,10 +12,6 @@ module QA
element :title, required: true element :title, required: true
end end
view 'app/assets/javascripts/vue_shared/components/issue/related_issuable_item.vue' do
element :remove_related_issue_button
end
view 'ee/app/assets/javascripts/epic/components/epic_header.vue' do view 'ee/app/assets/javascripts/epic/components/epic_header.vue' do
element :close_reopen_epic_button element :close_reopen_epic_button
end end
...@@ -28,8 +24,12 @@ module QA ...@@ -28,8 +24,12 @@ module QA
element :add_issue_input element :add_issue_input
end end
view 'ee/app/assets/javascripts/related_issues/components/related_issues_block.vue' do view 'ee/app/assets/javascripts/related_items_tree/components/tree_item.vue' do
element :related_issuable_item element :related_issue_item
end
view 'ee/app/assets/javascripts/related_items_tree/components/tree_item_body.vue' do
element :remove_issue_button
end end
view 'ee/app/assets/javascripts/related_issues/constants.js' do view 'ee/app/assets/javascripts/related_issues/constants.js' do
...@@ -49,7 +49,9 @@ module QA ...@@ -49,7 +49,9 @@ module QA
end end
def remove_issue_from_epic def remove_issue_from_epic
click_element :remove_related_issue_button click_element :remove_issue_button
# Capybara code is used below due to the modal being defined in the @gitlab/ui project
find('#item-remove-confirmation___BV_modal_footer_ .btn-danger').click
end end
def click_edit_button def click_edit_button
...@@ -66,12 +68,12 @@ module QA ...@@ -66,12 +68,12 @@ module QA
click_element :close_reopen_epic_button click_element :close_reopen_epic_button
end end
def has_related_issuable_item? def has_related_issue_item?
has_element?(:related_issuable_item) has_element?(:related_issue_item)
end end
def has_no_related_issuable_item? def has_no_related_issue_item?
has_no_element?(:related_issuable_item) has_no_element?(:related_issue_item)
end end
end end
end end
......
...@@ -44,11 +44,11 @@ module QA ...@@ -44,11 +44,11 @@ module QA
EE::Page::Group::Epic::Show.perform do |show| EE::Page::Group::Epic::Show.perform do |show|
show.add_issue_to_epic(issue.web_url) show.add_issue_to_epic(issue.web_url)
expect(show).to have_related_issuable_item expect(show).to have_related_issue_item
show.remove_issue_from_epic show.remove_issue_from_epic
expect(show).to have_no_related_issuable_item expect(show).to have_no_related_issue_item
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