diff options
author | Nick Thomas <nick@gitlab.com> | 2018-11-05 11:34:10 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-11-05 11:34:10 +0000 |
commit | 2ae6c47ddd27d9f76bc2e4326e91fc8d272896c1 (patch) | |
tree | 422f799992c437e2200ed638fcea45adbce4106b /qa | |
parent | 7d4b717c92d0e2f1db07fb3de0ce356b15d2f7df (diff) | |
parent | 1b4e3e7438ba9d5e5fb169a960e368ee463c1c31 (diff) | |
download | gitlab-ce-2ae6c47ddd27d9f76bc2e4326e91fc8d272896c1.tar.gz |
Merge branch 'qa-batch-comments-e2e-tests' into 'master'
QA Selectors for Batch Comment E2E Automation
See merge request gitlab-org/gitlab-ce!22681
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/merge_request/show.rb | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/qa/qa/page/merge_request/show.rb b/qa/qa/page/merge_request/show.rb index 376606afb5d..2e69a89e386 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 @@ -23,6 +25,32 @@ module QA element :squash_checkbox end + view 'app/views/projects/merge_requests/show.html.haml' do + element :notes_tab + element :diffs_tab + end + + view 'app/assets/javascripts/diffs/components/diff_line_gutter_content.vue' do + element :diff_comment + end + + view 'app/assets/javascripts/notes/components/comment_form.vue' do + element :note_dropdown + element :discussion_option + end + + view 'app/assets/javascripts/notes/components/note_form.vue' do + element :reply_input + end + + view 'app/assets/javascripts/notes/components/noteable_discussion.vue' do + element :discussion_reply + end + + view 'app/assets/javascripts/diffs/components/inline_diff_table_row.vue' do + element :new_diff_line + end + view 'app/views/shared/issuable/_sidebar.html.haml' do element :labels_block end @@ -106,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).last.click + fill_element :reply_input, reply_text + end end end end |