summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/import/github.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-16 18:25:58 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-16 18:25:58 +0000
commita5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch)
treefb69158581673816a8cd895f9d352dcb3c678b1e /qa/qa/page/project/import/github.rb
parentd16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff)
downloadgitlab-ce-a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4.tar.gz
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'qa/qa/page/project/import/github.rb')
-rw-r--r--qa/qa/page/project/import/github.rb27
1 files changed, 14 insertions, 13 deletions
diff --git a/qa/qa/page/project/import/github.rb b/qa/qa/page/project/import/github.rb
index 58c82fa14c1..dc683f7314b 100644
--- a/qa/qa/page/project/import/github.rb
+++ b/qa/qa/page/project/import/github.rb
@@ -32,24 +32,20 @@ module QA
end
def import!(full_path, name)
- unless already_imported(full_path)
- choose_test_namespace(full_path)
- set_path(full_path, name)
- import_project(full_path)
- wait_for_success
- end
+ return if already_imported(full_path)
- go_to_project(name)
+ choose_test_namespace(full_path)
+ set_path(full_path, name)
+ import_project(full_path)
+ wait_for_success
end
private
- def within_repo_path(full_path)
+ def within_repo_path(full_path, &block)
project_import_row = find_element(:project_import_row, text: full_path)
- within(project_import_row) do
- yield
- end
+ within(project_import_row, &block)
end
def choose_test_namespace(full_path)
@@ -75,8 +71,13 @@ module QA
def wait_for_success
# TODO: set reload:false and remove skip_finished_loading_check_on_refresh when
# https://gitlab.com/gitlab-org/gitlab/-/issues/292861 is fixed
- wait_until(max_duration: 60, sleep_interval: 5.0, reload: true, skip_finished_loading_check_on_refresh: true) do
- page.has_no_content?('Importing 1 repository', wait: 3.0)
+ wait_until(
+ max_duration: 90,
+ sleep_interval: 5.0,
+ reload: true,
+ skip_finished_loading_check_on_refresh: true
+ ) do
+ page.has_no_content?('Importing 1 repository')
end
end