Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
46eef996
Commit
46eef996
authored
Feb 17, 2021
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change how reply button placeholder is selected in capybara
utilize find_field instead of class selector
parent
ff6e0e26
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
15 additions
and
16 deletions
+15
-16
app/assets/javascripts/diffs/components/diff_discussion_reply.vue
...ts/javascripts/diffs/components/diff_discussion_reply.vue
+1
-1
app/assets/javascripts/notes/components/discussion_reply_placeholder.vue
...scripts/notes/components/discussion_reply_placeholder.vue
+0
-1
spec/features/issues/gfm_autocomplete_spec.rb
spec/features/issues/gfm_autocomplete_spec.rb
+1
-1
spec/features/merge_request/batch_comments_spec.rb
spec/features/merge_request/batch_comments_spec.rb
+1
-1
spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb
.../user_resolves_diff_notes_and_discussions_resolve_spec.rb
+5
-5
spec/features/merge_request/user_sees_avatar_on_diff_notes_spec.rb
...ures/merge_request/user_sees_avatar_on_diff_notes_spec.rb
+3
-3
spec/features/merge_request/user_sees_discussions_spec.rb
spec/features/merge_request/user_sees_discussions_spec.rb
+1
-1
spec/features/merge_request/user_sees_notes_from_forked_project_spec.rb
...merge_request/user_sees_notes_from_forked_project_spec.rb
+1
-1
spec/features/merge_request/user_suggests_changes_on_diff_spec.rb
...tures/merge_request/user_suggests_changes_on_diff_spec.rb
+1
-1
spec/frontend/notes/components/discussion_reply_placeholder_spec.js
...end/notes/components/discussion_reply_placeholder_spec.js
+1
-1
No files found.
app/assets/javascripts/diffs/components/diff_discussion_reply.vue
View file @
46eef996
...
@@ -35,7 +35,7 @@ export default {
...
@@ -35,7 +35,7 @@ export default {
<slot
v-if=
"hasForm"
name=
"form"
></slot>
<slot
v-if=
"hasForm"
name=
"form"
></slot>
<template
v-else-if=
"renderReplyPlaceholder"
>
<template
v-else-if=
"renderReplyPlaceholder"
>
<reply-placeholder
<reply-placeholder
:placeholder-text=
"__('Start a new discussion
...
')"
:placeholder-text=
"__('Start a new discussion
…
')"
@
focus=
"$emit('showNewDiscussionForm')"
@
focus=
"$emit('showNewDiscussionForm')"
/>
/>
</
template
>
</
template
>
...
...
app/assets/javascripts/notes/components/discussion_reply_placeholder.vue
View file @
46eef996
...
@@ -16,7 +16,6 @@ export default {
...
@@ -16,7 +16,6 @@ export default {
rows=
"1"
rows=
"1"
class=
"reply-placeholder-text-field js-vue-discussion-reply"
class=
"reply-placeholder-text-field js-vue-discussion-reply"
:placeholder=
"placeholderText"
:placeholder=
"placeholderText"
:title=
"__('Reply to comment')"
:aria-label=
"__('Reply to comment')"
:aria-label=
"__('Reply to comment')"
@
focus=
"$emit('focus')"
@
focus=
"$emit('focus')"
></textarea>
></textarea>
...
...
spec/features/issues/gfm_autocomplete_spec.rb
View file @
46eef996
...
@@ -1008,7 +1008,7 @@ RSpec.describe 'GFM autocomplete', :js do
...
@@ -1008,7 +1008,7 @@ RSpec.describe 'GFM autocomplete', :js do
end
end
def
start_and_cancel_discussion
def
start_and_cancel_discussion
find
(
'.js-vue-discussion-reply
'
).
click
find
_field
(
'Reply…
'
).
click
fill_in
(
'note_note'
,
with:
'Whoops!'
)
fill_in
(
'note_note'
,
with:
'Whoops!'
)
...
...
spec/features/merge_request/batch_comments_spec.rb
View file @
46eef996
...
@@ -223,7 +223,7 @@ end
...
@@ -223,7 +223,7 @@ end
def
write_reply_to_discussion
(
button_text:
'Start a review'
,
text:
'Line is wrong'
,
resolve:
false
,
unresolve:
false
)
def
write_reply_to_discussion
(
button_text:
'Start a review'
,
text:
'Line is wrong'
,
resolve:
false
,
unresolve:
false
)
page
.
within
(
first
(
'.diff-files-holder .discussion-reply-holder'
))
do
page
.
within
(
first
(
'.diff-files-holder .discussion-reply-holder'
))
do
fi
rst
(
'.js-vue-discussion-reply'
).
click
fi
nd_field
(
'Reply…'
,
match: :first
).
click
fill_in
(
'note_note'
,
with:
text
)
fill_in
(
'note_note'
,
with:
text
)
...
...
spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb
View file @
46eef996
...
@@ -149,7 +149,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
...
@@ -149,7 +149,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
it
'allows user to comment'
do
it
'allows user to comment'
do
page
.
within
'.diff-content'
do
page
.
within
'.diff-content'
do
find
(
'.js-vue-discussion-reply
'
).
click
find
_field
(
'Reply…
'
).
click
find
(
".js-unresolve-checkbox"
).
set
false
find
(
".js-unresolve-checkbox"
).
set
false
find
(
'.js-note-text'
).
set
'testing'
find
(
'.js-note-text'
).
set
'testing'
...
@@ -179,7 +179,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
...
@@ -179,7 +179,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
it
'allows user to comment & unresolve thread'
do
it
'allows user to comment & unresolve thread'
do
page
.
within
'.diff-content'
do
page
.
within
'.diff-content'
do
find
(
'.js-vue-discussion-reply
'
).
click
find
_field
(
'Reply…
'
).
click
find
(
'.js-note-text'
).
set
'testing'
find
(
'.js-note-text'
).
set
'testing'
...
@@ -208,7 +208,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
...
@@ -208,7 +208,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
it
'allows user to comment & resolve thread'
do
it
'allows user to comment & resolve thread'
do
page
.
within
'.diff-content'
do
page
.
within
'.diff-content'
do
find
(
'.js-vue-discussion-reply
'
).
click
find
_field
(
'Reply…
'
).
click
find
(
'.js-note-text'
).
set
'testing'
find
(
'.js-note-text'
).
set
'testing'
...
@@ -442,7 +442,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
...
@@ -442,7 +442,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
it
'allows user to comment & resolve thread'
do
it
'allows user to comment & resolve thread'
do
page
.
within
'.diff-content'
do
page
.
within
'.diff-content'
do
find
(
'.js-vue-discussion-reply
'
).
click
find
_field
(
'Reply…
'
).
click
find
(
'.js-note-text'
).
set
'testing'
find
(
'.js-note-text'
).
set
'testing'
...
@@ -461,7 +461,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
...
@@ -461,7 +461,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
page
.
within
'.diff-content'
do
page
.
within
'.diff-content'
do
click_button
'Resolve thread'
click_button
'Resolve thread'
find
(
'.js-vue-discussion-reply
'
).
click
find
_field
(
'Reply…
'
).
click
find
(
'.js-note-text'
).
set
'testing'
find
(
'.js-note-text'
).
set
'testing'
...
...
spec/features/merge_request/user_sees_avatar_on_diff_notes_spec.rb
View file @
46eef996
...
@@ -37,7 +37,7 @@ RSpec.describe 'Merge request > User sees avatars on diff notes', :js do
...
@@ -37,7 +37,7 @@ RSpec.describe 'Merge request > User sees avatars on diff notes', :js do
end
end
it
'does not render avatars after commenting on discussion tab'
do
it
'does not render avatars after commenting on discussion tab'
do
find
(
'.js-vue-discussion-reply
'
).
click
find
_field
(
'Reply…
'
).
click
page
.
within
(
'.js-discussion-note-form'
)
do
page
.
within
(
'.js-discussion-note-form'
)
do
find
(
'.note-textarea'
).
native
.
send_keys
(
'Test comment'
)
find
(
'.note-textarea'
).
native
.
send_keys
(
'Test comment'
)
...
@@ -132,7 +132,7 @@ RSpec.describe 'Merge request > User sees avatars on diff notes', :js do
...
@@ -132,7 +132,7 @@ RSpec.describe 'Merge request > User sees avatars on diff notes', :js do
end
end
it
'adds avatar when commenting'
do
it
'adds avatar when commenting'
do
fi
rst
(
'.js-vue-discussion-reply'
).
click
fi
nd_field
(
'Reply…'
,
match: :first
).
click
page
.
within
'.js-discussion-note-form'
do
page
.
within
'.js-discussion-note-form'
do
find
(
'.js-note-text'
).
native
.
send_keys
(
'Test'
)
find
(
'.js-note-text'
).
native
.
send_keys
(
'Test'
)
...
@@ -151,7 +151,7 @@ RSpec.describe 'Merge request > User sees avatars on diff notes', :js do
...
@@ -151,7 +151,7 @@ RSpec.describe 'Merge request > User sees avatars on diff notes', :js do
it
'adds multiple comments'
do
it
'adds multiple comments'
do
3
.
times
do
3
.
times
do
fi
rst
(
'.js-vue-discussion-reply'
).
click
fi
nd_field
(
'Reply…'
,
match: :first
).
click
page
.
within
'.js-discussion-note-form'
do
page
.
within
'.js-discussion-note-form'
do
find
(
'.js-note-text'
).
native
.
send_keys
(
'Test'
)
find
(
'.js-note-text'
).
native
.
send_keys
(
'Test'
)
...
...
spec/features/merge_request/user_sees_discussions_spec.rb
View file @
46eef996
...
@@ -60,7 +60,7 @@ RSpec.describe 'Merge request > User sees threads', :js do
...
@@ -60,7 +60,7 @@ RSpec.describe 'Merge request > User sees threads', :js do
it
'can be replied to'
do
it
'can be replied to'
do
within
(
".discussion[data-discussion-id='
#{
discussion_id
}
']"
)
do
within
(
".discussion[data-discussion-id='
#{
discussion_id
}
']"
)
do
find
(
'.js-vue-discussion-reply
'
).
click
find
_field
(
'Reply…
'
).
click
fill_in
'note[note]'
,
with:
'Test!'
fill_in
'note[note]'
,
with:
'Test!'
click_button
'Comment'
click_button
'Comment'
...
...
spec/features/merge_request/user_sees_notes_from_forked_project_spec.rb
View file @
46eef996
...
@@ -27,7 +27,7 @@ RSpec.describe 'Merge request > User sees notes from forked project', :js do
...
@@ -27,7 +27,7 @@ RSpec.describe 'Merge request > User sees notes from forked project', :js do
expect
(
page
).
to
have_content
(
'A commit comment'
)
expect
(
page
).
to
have_content
(
'A commit comment'
)
page
.
within
(
'.discussion-notes'
)
do
page
.
within
(
'.discussion-notes'
)
do
find
(
'.js-vue-discussion-reply
'
).
click
find
_field
(
'Reply…
'
).
click
scroll_to
(
page
.
find
(
'#note_note'
,
visible:
false
))
scroll_to
(
page
.
find
(
'#note_note'
,
visible:
false
))
find
(
'#note_note'
).
send_keys
(
'A reply comment'
)
find
(
'#note_note'
).
send_keys
(
'A reply comment'
)
find
(
'.js-comment-button'
).
click
find
(
'.js-comment-button'
).
click
...
...
spec/features/merge_request/user_suggests_changes_on_diff_spec.rb
View file @
46eef996
...
@@ -83,7 +83,7 @@ RSpec.describe 'User comments on a diff', :js do
...
@@ -83,7 +83,7 @@ RSpec.describe 'User comments on a diff', :js do
wait_for_requests
wait_for_requests
fi
rst
(
'.js-vue-discussion-reply'
).
click
fi
nd_field
(
'Reply…'
,
match: :first
).
click
find
(
'.js-suggestion-btn'
).
click
find
(
'.js-suggestion-btn'
).
click
...
...
spec/frontend/notes/components/discussion_reply_placeholder_spec.js
View file @
46eef996
...
@@ -31,6 +31,6 @@ describe('ReplyPlaceholder', () => {
...
@@ -31,6 +31,6 @@ describe('ReplyPlaceholder', () => {
});
});
it
(
'
should render reply button
'
,
()
=>
{
it
(
'
should render reply button
'
,
()
=>
{
expect
(
findTextarea
().
element
.
placeholder
).
toEqual
(
placeholderText
);
expect
(
findTextarea
().
attributes
(
'
placeholder
'
)
).
toEqual
(
placeholderText
);
});
});
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment