Fix race condition in auto devops QA spec: ensure we wait for Install button to appear

This commit is contained in:
Dylan Griffith 2018-07-24 16:05:12 +01:00
parent ab5c97b126
commit ad05cb523d
2 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,7 @@ module QA
def install!(application_name)
within(".js-cluster-application-row-#{application_name}") do
page.has_button?('Install', wait: 30)
click_on 'Install'
end
end

View File

@ -121,8 +121,9 @@ describe 'Clusters Applications', :js do
def wait_until_helm_created!
retries = 0
while Clusters::Cluster.last.application_helm.nil? do
while Clusters::Cluster.last.application_helm.nil?
raise "Timed out waiting for helm application to be created in DB" if (retries += 1) > 3
sleep(1)
end
end