Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/component/snippet.rb')
-rw-r--r--qa/qa/page/component/snippet.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/qa/qa/page/component/snippet.rb b/qa/qa/page/component/snippet.rb
index 9a4b06d8ac7..459c02ec883 100644
--- a/qa/qa/page/component/snippet.rb
+++ b/qa/qa/page/component/snippet.rb
@@ -110,6 +110,18 @@ module QA
end
end
+ def has_no_file_name?(file_name, file_number = nil)
+ if file_number
+ within_element_by_index(:file_title_content, file_number - 1) do
+ has_no_text?(file_name)
+ end
+ else
+ within_element(:file_title_content) do
+ has_no_text?(file_name)
+ end
+ end
+ end
+
def has_file_content?(file_content, file_number = nil)
if file_number
within_element_by_index(:file_content, file_number - 1) do
@@ -170,6 +182,7 @@ module QA
def add_comment(comment)
fill_element(:note_field, comment)
click_element(:comment_button)
+ wait_until(reload: false) { has_element?(:note_author_content) }
end
def has_comment_author?(author_username)
@@ -194,6 +207,7 @@ module QA
click_element(:edit_comment_button)
fill_element(:edit_note_field, comment)
click_element(:save_comment_button)
+ wait_until(reload: false) { has_element?(:note_author_content) }
end
def delete_comment(comment)
@@ -201,6 +215,7 @@ module QA
accept_alert do
click_element(:delete_comment_button)
end
+ wait_until(reload: false) { has_no_text?(comment) }
end
end
end