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 {
<template>
<li
class="tree-item list-item pt-0 pb-0"
data-qa-selector="related_issue_item"
:class="{
'has-children': hasChildren,
'item-expanded': childrenFlags[itemReference].itemExpanded,
......
......@@ -12,10 +12,6 @@ module QA
element :title, required: true
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
element :close_reopen_epic_button
end
......@@ -28,8 +24,12 @@ module QA
element :add_issue_input
end
view 'ee/app/assets/javascripts/related_issues/components/related_issues_block.vue' do
element :related_issuable_item
view 'ee/app/assets/javascripts/related_items_tree/components/tree_item.vue' do
element :related_issue_item
end
view 'ee/app/assets/javascripts/related_items_tree/components/tree_item_body.vue' do
element :remove_issue_button
end
view 'ee/app/assets/javascripts/related_issues/constants.js' do
......@@ -49,7 +49,9 @@ module QA
end
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
def click_edit_button
......@@ -66,12 +68,12 @@ module QA
click_element :close_reopen_epic_button
end
def has_related_issuable_item?
has_element?(:related_issuable_item)
def has_related_issue_item?
has_element?(:related_issue_item)
end
def has_no_related_issuable_item?
has_no_element?(:related_issuable_item)
def has_no_related_issue_item?
has_no_element?(:related_issue_item)
end
end
end
......
......@@ -44,11 +44,11 @@ module QA
EE::Page::Group::Epic::Show.perform do |show|
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
expect(show).to have_no_related_issuable_item
expect(show).to have_no_related_issue_item
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