Commit 9dd669c5 authored by Anastasia McDonald's avatar Anastasia McDonald

Improve flaky snippet_index_page_spec test

Wait for snippet statistics to be created and computed
See https://gitlab.com/gitlab-org/gitlab/-/issues/338313
parent aeadad8d
......@@ -35,8 +35,10 @@ module QA
end
def has_number_of_files?(snippet_title, number)
retry_until(max_attempts: 5, reload: true, sleep_interval: 1) do # snippet statistics computation can take a few moments
within_element(:snippet_link, snippet_title: snippet_title) do
has_element?(:snippet_file_count_content, snippet_files: number)
has_element?(:snippet_file_count_content, snippet_files: number, wait: 5)
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