Commit 972573e3 authored by Tomislav Nikic's avatar Tomislav Nikic Committed by Dan Davison

Adding changes to CE from EE

All the changes done to files that are also inside CE and need to be
ported.
parent 7dccb444
......@@ -44,7 +44,6 @@ export default {
class="d-none d-sm-block"
/>
<reply-placeholder
class="qa-discussion-reply"
:button-text="__('Start a new discussion...')"
@onClick="$emit('showNewDiscussionForm')"
/>
......
......@@ -263,6 +263,7 @@ export default {
:disabled="!diffHasDiscussions(diffFile)"
:class="{ active: hasExpandedDiscussions }"
class="js-btn-vue-toggle-comments btn"
data-qa-selector="toggle_comments_button"
type="button"
@click="handleToggleDiscussions"
>
......
......@@ -41,8 +41,8 @@ export default {
<template>
<div class="discussion-with-resolve-btn clearfix">
<reply-placeholder
data-qa-selector="discussion_reply_tab"
:button-text="s__('MergeRequests|Reply...')"
class="qa-discussion-reply"
@onClick="$emit('showReplyForm')"
/>
......
......@@ -293,12 +293,16 @@ export default {
<input
v-model="isUnresolving"
type="checkbox"
class="qa-unresolve-review-discussion"
data-qa-selector="unresolve_review_discussion_checkbox"
/>
{{ __('Unresolve thread') }}
</template>
<template v-else>
<input v-model="isResolving" type="checkbox" class="qa-resolve-review-discussion" />
<input
v-model="isResolving"
type="checkbox"
data-qa-selector="resolve_review_discussion_checkbox"
/>
{{ __('Resolve thread') }}
</template>
</label>
......
......@@ -32,7 +32,7 @@
.merge-request-tabs-holder{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') }
.merge-request-tabs-container
%ul.merge-request-tabs.nav-tabs.nav.nav-links
%li.notes-tab.qa-notes-tab
%li.notes-tab{ data: { qa_selector: 'notes_tab'} }
= tab_link_for @merge_request, :show, force_link: @commit.present? do
= _("Discussion")
%span.badge.badge-pill= @merge_request.related_notes.user.count
......
......@@ -20,13 +20,17 @@ module QA
end
base.view 'app/assets/javascripts/notes/components/discussion_actions.vue' do
element :discussion_reply
element :discussion_reply_tab
end
base.view 'app/assets/javascripts/notes/components/toggle_replies_widget.vue' do
element :expand_replies
element :collapse_replies
end
base.view 'app/assets/javascripts/diffs/components/diff_file_header.vue' do
element :toggle_comments_button
end
end
def start_discussion(text)
......@@ -36,8 +40,12 @@ module QA
click_element :comment_button
end
def toggle_comments
all_elements(:toggle_comments_button).last.click
end
def type_reply_to_discussion(reply_text)
all_elements(:discussion_reply).last.click
all_elements(:discussion_reply_tab).last.click
fill_element :reply_input, reply_text
end
......
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