Commit f4762056 authored by Mark Lapierre's avatar Mark Lapierre

Merge branch 'qa-add-retry-remove-issue' into 'master'

Add retry to removing related issue e2e spec

See merge request gitlab-org/gitlab!41916
parents 38f4988e 136666c5
......@@ -70,7 +70,10 @@ module QA
end
def click_remove_related_issue_button
click_element(:remove_related_issue_button)
retry_until(sleep_interval: 5) do
click_element(:remove_related_issue_button)
has_no_element?(:remove_related_issue_button, wait: QA::Support::Repeater::DEFAULT_MAX_WAIT_TIME)
end
end
def click_close_issue_button
......
# frozen_string_literal: true
module QA
RSpec.describe 'Plan', :reliable do
RSpec.describe 'Plan' do
describe 'Related issues' do
let(:project) do
Resource::Project.fabricate_via_api! do |project|
......@@ -30,19 +30,14 @@ module QA
Page::Project::Issue::Show.perform do |show|
max_wait = 60
wait_interval = 1
show.relate_issue(issue_2)
show.wait_until(reload: false, max_duration: max_wait, sleep_interval: wait_interval) do
expect(show.related_issuable_item).to have_content(issue_2.title)
end
expect(show.related_issuable_item).to have_text(issue_2.title, wait: max_wait)
show.click_remove_related_issue_button
show.wait_until(reload: false, max_duration: max_wait, sleep_interval: wait_interval) do
expect(show).not_to have_content(issue_2.title)
end
expect(show).to have_no_text(issue_2.title, wait: max_wait)
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