Commit 136666c5 authored by Désirée Chevalier's avatar Désirée Chevalier Committed by Mark Lapierre

Add retry to removing related issue e2e spec

parent 600a387b
...@@ -70,7 +70,10 @@ module QA ...@@ -70,7 +70,10 @@ module QA
end end
def click_remove_related_issue_button 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 end
def click_close_issue_button def click_close_issue_button
......
# frozen_string_literal: true # frozen_string_literal: true
module QA module QA
RSpec.describe 'Plan', :reliable do RSpec.describe 'Plan' do
describe 'Related issues' do describe 'Related issues' do
let(:project) do let(:project) do
Resource::Project.fabricate_via_api! do |project| Resource::Project.fabricate_via_api! do |project|
...@@ -30,19 +30,14 @@ module QA ...@@ -30,19 +30,14 @@ module QA
Page::Project::Issue::Show.perform do |show| Page::Project::Issue::Show.perform do |show|
max_wait = 60 max_wait = 60
wait_interval = 1
show.relate_issue(issue_2) 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_text(issue_2.title, wait: max_wait)
expect(show.related_issuable_item).to have_content(issue_2.title)
end
show.click_remove_related_issue_button show.click_remove_related_issue_button
show.wait_until(reload: false, max_duration: max_wait, sleep_interval: wait_interval) do expect(show).to have_no_text(issue_2.title, wait: max_wait)
expect(show).not_to have_content(issue_2.title)
end
end end
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