Commit 9d973fa3 authored by Mark Lapierre's avatar Mark Lapierre

Merge branch 'refactor-test-to-avoid-flakiness' into 'master'

Refactor test to avoid flakiness

Closes #35785

See merge request gitlab-org/gitlab!19770
parents 94c87eb8 fc0ffa81
......@@ -32,15 +32,22 @@ module QA
issue_1.visit!
Page::Project::Issue::Show.perform do |show|
max_wait = 60
wait_interval = 1
show.relate_issue(issue_2)
expect(show).to have_content("marked this issue as related to ##{issue_2.iid}")
expect(show.related_issuable_item).to have_content(issue_2.title)
show.wait(reload: false, max: max_wait, interval: wait_interval) do
expect(show).to have_content("marked this issue as related to ##{issue_2.iid}")
expect(show.related_issuable_item).to have_content(issue_2.title)
end
show.click_remove_related_issue_button
expect(show).to have_content("removed the relation with ##{issue_2.iid}")
expect(show).not_to have_content(issue_2.title)
show.wait(reload: false, max: max_wait, interval: wait_interval) do
expect(show).to have_content("removed the relation with ##{issue_2.iid}")
expect(show).not_to have_content(issue_2.title)
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