summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorat.ramya <rauthappan@gitlab.com>2018-10-30 10:13:15 +0530
committerat.ramya <rauthappan@gitlab.com>2018-10-30 14:42:51 +0530
commitdbef128fa306c851cc11ffa722276f45ab8d9205 (patch)
tree543d09b6ecf9fe156e7eeef17aa0e73630e5da53 /qa
parent25b658cf6545f1ab7b1aecc902e6f833af3e3949 (diff)
downloadgitlab-ce-dbef128fa306c851cc11ffa722276f45ab8d9205.tar.gz
Adding methods
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/merge_request/show.rb33
1 files changed, 32 insertions, 1 deletions
diff --git a/qa/qa/page/merge_request/show.rb b/qa/qa/page/merge_request/show.rb
index ed487d94c33..b52072d35ac 100644
--- a/qa/qa/page/merge_request/show.rb
+++ b/qa/qa/page/merge_request/show.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module QA
module Page
module MergeRequest
@@ -45,7 +47,7 @@ module QA
element :discussion_reply
end
- view 'app/assets/javascripts/diffs/components/parallel_diff_table_row.vue' do
+ view 'app/assets/javascripts/diffs/components/inline_diff_table_row.vue' do
element :new_diff_line
end
@@ -132,6 +134,35 @@ module QA
click_element :squash_checkbox
end
+
+ def go_to_discussions_tab
+ click_element :notes_tab
+ end
+
+ def go_to_diffs_tab
+ click_element :diffs_tab
+ end
+
+ def add_comment_to_diff(text)
+ wait(time: 5) do
+ page.has_text?("No newline at end of file")
+ end
+ all_elements(:new_diff_line).first.hover
+ click_element :diff_comment
+ fill_element :reply_input, text
+ end
+
+ def start_discussion(text)
+ fill_element :comment_input, text
+ click_element :note_dropdown
+ click_element :discussion_option
+ click_element :comment_button
+ end
+
+ def reply_to_discussion(reply_text)
+ all_elements(:discussion_reply).first.click
+ fill_element :reply_input, reply_text
+ end
end
end
end