summaryrefslogtreecommitdiff
path: root/qa/qa/page/project
diff options
context:
space:
mode:
authorSanad Liaquat <sliaquat@gitlab.com>2019-02-25 18:37:27 +0500
committerSanad Liaquat <sliaquat@gitlab.com>2019-02-25 18:37:27 +0500
commitddef2f1fbd3af7e91cb568adc8258043e05f15fc (patch)
treea5a25ece3dbf0da743ec49660638b6e891fc2a53 /qa/qa/page/project
parent20d84d804e2faa000b01465065de6d2be1b37ecd (diff)
downloadgitlab-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')
-rw-r--r--qa/qa/page/project/import/github.rb21
-rw-r--r--qa/qa/page/project/issue/show.rb12
-rw-r--r--qa/qa/page/project/pipeline/show.rb2
-rw-r--r--qa/qa/page/project/settings/deploy_keys.rb4
4 files changed, 31 insertions, 8 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
diff --git a/qa/qa/page/project/issue/show.rb b/qa/qa/page/project/issue/show.rb
index 1c25be5fd0c..9df3db1bba0 100644
--- a/qa/qa/page/project/issue/show.rb
+++ b/qa/qa/page/project/issue/show.rb
@@ -23,6 +23,10 @@ module QA
element :filter_options
end
+ view 'app/assets/javascripts/notes/components/noteable_note.vue' do
+ element :noteable_note_item
+ end
+
# Adds a comment to an issue
# attachment option should be an absolute path
def comment(text, attachment: nil)
@@ -36,6 +40,12 @@ module QA
click_element :comment_button
end
+ def has_comment?(comment_text)
+ wait(reload: false) do
+ has_element?(:noteable_note_item, text: comment_text)
+ end
+ end
+
def select_comments_only_filter
select_filter_with_text('Show comments only')
end
@@ -54,7 +64,7 @@ module QA
retry_on_exception do
click_body
click_element :discussion_filter
- find_element(:filter_options, text).click
+ find_element(:filter_options, text: text).click
end
end
end
diff --git a/qa/qa/page/project/pipeline/show.rb b/qa/qa/page/project/pipeline/show.rb
index 22b0a168964..6f8a66bf527 100644
--- a/qa/qa/page/project/pipeline/show.rb
+++ b/qa/qa/page/project/pipeline/show.rb
@@ -43,7 +43,7 @@ module QA::Page
end
def go_to_job(job_name)
- find_element(:job_link, job_name).click
+ find_element(:job_link, text: job_name).click
end
def go_to_first_job
diff --git a/qa/qa/page/project/settings/deploy_keys.rb b/qa/qa/page/project/settings/deploy_keys.rb
index 5da8d352e74..e0f9e84096d 100644
--- a/qa/qa/page/project/settings/deploy_keys.rb
+++ b/qa/qa/page/project/settings/deploy_keys.rb
@@ -33,14 +33,14 @@ module QA
def find_fingerprint(title)
within_project_deploy_keys do
- find_element(:key, title)
+ find_element(:key, text: title)
.find(element_selector_css(:key_fingerprint)).text
end
end
def has_key?(title, fingerprint)
within_project_deploy_keys do
- find_element(:key, title)
+ find_element(:key, text: title)
.has_css?(element_selector_css(:key_fingerprint), text: fingerprint)
end
end