Commit c40010b3 authored by Ash McKenzie's avatar Ash McKenzie

New Geo wait with text helper QA method

parent 6a662c68
......@@ -3,11 +3,21 @@ module QA
module Page
module Project
module Show
def wait_for_repository_replication
wait(max: Runtime::Geo.max_file_replication_time) do
def wait_for_repository_replication(max_wait: Runtime::Geo.max_file_replication_time)
wait_until_geo_max_replication_time(max_wait: max_wait) do
!page.has_text?(/No repository|The repository for this project is empty/)
end
end
def wait_for_repository_replication_with(text, max_wait: Runtime::Geo.max_file_replication_time)
wait_until_geo_max_replication_time(max_wait: max_wait) do
page.has_text?(text)
end
end
def wait_until_geo_max_replication_time(max_wait: Runtime::Geo.max_file_replication_time)
wait(max: max_wait) { yield }
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