Commit 0ced66ba authored by Ramya Authappan's avatar Ramya Authappan

Merge branch 'qa-fix-roadmap-spec-flakiness' into 'master'

Fix roadmap e2e spec and update selectors

See merge request gitlab-org/gitlab!42758
parents 67149ad1 1b6005a6
...@@ -195,7 +195,8 @@ export default { ...@@ -195,7 +195,8 @@ export default {
:disabled="isSubmitButtonDisabled" :disabled="isSubmitButtonDisabled"
:loading="isSubmitting" :loading="isSubmitting"
type="submit" type="submit"
class="js-add-issuable-form-add-button float-left qa-add-issue-button" class="js-add-issuable-form-add-button float-left"
data-qa-selector="add_issue_button"
> >
{{ __('Add') }} {{ __('Add') }}
</gl-button> </gl-button>
......
...@@ -219,7 +219,8 @@ export default { ...@@ -219,7 +219,8 @@ export default {
:value="inputValue" :value="inputValue"
:placeholder="inputPlaceholder" :placeholder="inputPlaceholder"
type="text" type="text"
class="js-add-issuable-form-input add-issuable-form-input qa-add-issue-input" class="js-add-issuable-form-input add-issuable-form-input"
data-qa-selector="add_issue_field"
@input="onInput" @input="onInput"
@focus="onFocus" @focus="onFocus"
@blur="onBlur" @blur="onBlur"
......
...@@ -129,7 +129,8 @@ export default { ...@@ -129,7 +129,8 @@ export default {
:class="actionButtonClass" :class="actionButtonClass"
category="secondary" category="secondary"
variant="warning" variant="warning"
class="qa-close-reopen-epic-button gl-mt-3 gl-sm-mt-0! gl-w-full gl-sm-w-auto!" class="gl-mt-3 gl-sm-mt-0! gl-w-full gl-sm-w-auto!"
data-qa-selector="close_reopen_epic_button"
data-testid="toggle-status-button" data-testid="toggle-status-button"
@click="toggleEpicStatus(isEpicOpen)" @click="toggleEpicStatus(isEpicOpen)"
> >
......
...@@ -293,7 +293,8 @@ export default { ...@@ -293,7 +293,8 @@ export default {
:aria-label="__('Remove')" :aria-label="__('Remove')"
:disabled="itemActionInProgress" :disabled="itemActionInProgress"
icon="close" icon="close"
class="js-issue-item-remove-button qa-remove-issue-button gl-align-self-start" class="js-issue-item-remove-button gl-align-self-start"
data-qa-selector="remove_issue_button"
@click="handleRemoveClick" @click="handleRemoveClick"
/> />
<span v-if="showEmptySpacer" class="gl-p-3"></span> <span v-if="showEmptySpacer" class="gl-p-3"></span>
......
...@@ -17,7 +17,7 @@ module QA ...@@ -17,7 +17,7 @@ module QA
end end
view 'app/assets/javascripts/related_issues/components/related_issuable_input.vue' do view 'app/assets/javascripts/related_issues/components/related_issuable_input.vue' do
element :add_issue_input element :add_issue_field
end end
view 'ee/app/assets/javascripts/related_items_tree/components/epic_issue_actions_split_button.vue' do view 'ee/app/assets/javascripts/related_items_tree/components/epic_issue_actions_split_button.vue' do
...@@ -35,7 +35,7 @@ module QA ...@@ -35,7 +35,7 @@ module QA
def add_issue_to_epic(issue_url) def add_issue_to_epic(issue_url)
click_element(:epic_issue_actions_split_button) click_element(:epic_issue_actions_split_button)
find('button', text: 'Add an existing issue').click find('button', text: 'Add an existing issue').click
fill_element :add_issue_input, issue_url fill_element :add_issue_field, issue_url
# Clicking the title blurs the input # Clicking the title blurs the input
click_element :title click_element :title
click_element :add_issue_button click_element :add_issue_button
......
...@@ -18,9 +18,9 @@ module QA ...@@ -18,9 +18,9 @@ module QA
end end
def epic_present?(epic) def epic_present?(epic)
uri = URI(epic.group.web_url) epic_href_selector = "a[href*='#{epic.web_url}']"
group_relative_url = uri.path
epic_href_selector = "a[href*='#{group_relative_url}/-/epics/#{epic.iid}']" wait_for_requests
within_element(:roadmap_shell) do within_element(:roadmap_shell) do
find("[data-qa-selector='epic_details_cell'] #{epic_href_selector}") && find("[data-qa-selector='epic_details_cell'] #{epic_href_selector}") &&
......
...@@ -43,7 +43,7 @@ module QA ...@@ -43,7 +43,7 @@ module QA
end end
view 'app/assets/javascripts/related_issues/components/related_issuable_input.vue' do view 'app/assets/javascripts/related_issues/components/related_issuable_input.vue' do
element :add_issue_input element :add_issue_field
end end
view 'app/assets/javascripts/related_issues/components/related_issues_block.vue' do view 'app/assets/javascripts/related_issues/components/related_issues_block.vue' do
...@@ -57,8 +57,8 @@ module QA ...@@ -57,8 +57,8 @@ module QA
def relate_issue(issue) def relate_issue(issue)
click_element(:related_issues_plus_button) click_element(:related_issues_plus_button)
fill_element(:add_issue_input, issue.web_url) fill_element(:add_issue_field, issue.web_url)
send_keys_to_element(:add_issue_input, :enter) send_keys_to_element(:add_issue_field, :enter)
end end
def related_issuable_item def related_issuable_item
......
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