diff options
author | Sanad Liaquat <sliaquat@gitlab.com> | 2019-02-25 18:37:27 +0500 |
---|---|---|
committer | Sanad Liaquat <sliaquat@gitlab.com> | 2019-02-25 18:37:27 +0500 |
commit | ddef2f1fbd3af7e91cb568adc8258043e05f15fc (patch) | |
tree | a5a25ece3dbf0da743ec49660638b6e891fc2a53 /qa/qa/page/project/import/github.rb | |
parent | 20d84d804e2faa000b01465065de6d2be1b37ecd (diff) | |
download | gitlab-ce-ddef2f1fbd3af7e91cb568adc8258043e05f15fc.tar.gz |
Update GitHub Import test
Removes the unnecessary :orchestrated tag and updates a few
selectors. Also wait_for_success for import before proceeding.
The test is currently placed in quarantine because of a bug.
Diffstat (limited to 'qa/qa/page/project/import/github.rb')
-rw-r--r-- | qa/qa/page/project/import/github.rb | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/qa/qa/page/project/import/github.rb b/qa/qa/page/project/import/github.rb index 488157d9878..45c8d834a74 100644 --- a/qa/qa/page/project/import/github.rb +++ b/qa/qa/page/project/import/github.rb @@ -29,12 +29,19 @@ module QA 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) - page.within(%Q(tr[data-qa-repo-path="#{full_path}"])) do + wait(reload: false) do + has_element?(:project_import_row, text: full_path) + end + + project_import_row = find_element(:project_import_row, text: full_path) + + within(project_import_row) do yield end end @@ -44,18 +51,24 @@ module QA click_element :project_namespace_select end - select_item(Runtime::Namespace.path) + search_and_select(Runtime::Namespace.path) end def set_path(full_path, name) within_repo_path(full_path) do - fill_in 'path', with: name + fill_element(:project_path_field, name) end end def import_project(full_path) within_repo_path(full_path) do - click_button 'Import' + click_element(:import_button) + end + end + + def wait_for_success + wait(max: 60, interval: 1.0, reload: false) do + page.has_content?('Done', wait: 1.0) end end end |