Commit 16761366 authored by Ramya Authappan's avatar Ramya Authappan

Merge branch '118473-click-popovers-in-mr-qa-tests' into 'master'

Dismiss popover in MR

See merge request gitlab-org/gitlab!22235
parents eae1e557 1fd5848b
......@@ -57,7 +57,12 @@ export default {
<icon name="external-link" :size="10" />
</gl-link>
</p>
<gl-button variant="primary" size="sm" @click="onDismiss">
<gl-button
variant="primary"
size="sm"
data-qa-selector="dismiss_popover_button"
@click="onDismiss"
>
{{ __('Got it') }}
</gl-button>
</gl-popover>
......
......@@ -12,7 +12,7 @@ export default {
</script>
<template>
<timeline-entry-item class="note note-wrapper">
<timeline-entry-item class="note note-wrapper" data-qa-selector="skeleton_note">
<div class="timeline-icon"></div>
<div class="timeline-content">
<div class="note-header"></div>
......
......@@ -6,6 +6,10 @@ module QA
class Show < Page::Base
include Page::Component::Note
view 'app/assets/javascripts/mr_tabs_popover/components/popover.vue' do
element :dismiss_popover_button
end
view 'app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue' do
element :dropdown_toggle
element :download_email_patches
......@@ -42,6 +46,10 @@ module QA
element :squash_checkbox
end
view 'app/assets/javascripts/vue_shared/components/notes/skeleton_note.vue' do
element :skeleton_note
end
view 'app/views/projects/merge_requests/show.html.haml' do
element :notes_tab
element :diffs_tab
......@@ -69,28 +77,30 @@ module QA
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
click_element(:diff_comment)
fill_element(:reply_input, text)
end
def click_discussions_tab
click_element :notes_tab
click_element(:notes_tab)
finished_loading?
wait_for_loading
end
def click_diffs_tab
click_element :diffs_tab
click_element(:diffs_tab)
finished_loading?
wait_for_loading
click_element(:dismiss_popover_button) if has_element?(:dismiss_popover_button)
end
def click_pipeline_link
click_element :pipeline_link
click_element(:pipeline_link)
end
def edit!
click_element :edit_button
click_element(:edit_button)
end
def fast_forward_possible?
......@@ -203,6 +213,10 @@ module QA
has_element?(:merge_request_error_content)
end
end
def wait_for_loading
finished_loading? && has_no_element?(:skeleton_note)
end
end
end
end
......
......@@ -70,7 +70,6 @@ module QA
Page::MergeRequest::Show.perform do |show|
show.click_discussions_tab
show.refresh
show.resolve_discussion_at_index(0)
expect(show).to have_content("Can you check this line of code?")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment