Commit 8d031a87 authored by Dan Davison's avatar Dan Davison

Merge branch 'ml-update-e2e-test-use-has-file' into 'master'

Update project template e2e test to wait for files to appear

Closes #261928

See merge request gitlab-org/gitlab!44252
parents 5efd0be3 9ac41523
......@@ -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