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

Wait for files to appear

This uses `have_file` instead of `have_content` so that the test uses
the built-in waits to wait for loading. It also checks specifically for
file, not just for the text content (which could appear elsewhere on
the page).
parent 3934a31b
......@@ -58,10 +58,12 @@ module QA
namespace: Runtime::Namespace.name(reset_cache: false),
template_name: built_in)
Page::Project::Show.perform(&:wait_for_import_success)
Page::Project::Show.perform do |project|
project.wait_for_import_success
expect(page).to have_content("Initialized from '#{built_in}' project template")
expect(page).to have_content(".ruby-version")
expect(project).to have_content("Initialized from '#{built_in}' project template")
expect(project).to have_file(".ruby-version")
end
end
end
......@@ -104,9 +106,12 @@ module QA
namespace: Runtime::Namespace.path,
template_name: @template_project.name)
Page::Project::Show.perform(&:wait_for_import_success)
@files.each do |file|
expect(page).to have_content(file[:name])
Page::Project::Show.perform do |project|
project.wait_for_import_success
@files.each do |file|
expect(project).to have_file(file[:name])
end
end
end
end
......@@ -151,9 +156,12 @@ module QA
namespace: Runtime::Namespace.sandbox_name,
template_name: @template_project.name)
Page::Project::Show.perform(&:wait_for_import_success)
@files.each do |file|
expect(page).to have_content(file[:name])
Page::Project::Show.perform do |project|
project.wait_for_import_success
@files.each do |file|
expect(project).to have_file(file[:name])
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