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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
aa9aa11d
Commit
aa9aa11d
authored
Mar 09, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added regression tests
parent
2edd42ca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
spec/features/merge_requests/diff_notes_avatars_spec.rb
spec/features/merge_requests/diff_notes_avatars_spec.rb
+50
-0
No files found.
spec/features/merge_requests/diff_notes_avatars_spec.rb
View file @
aa9aa11d
...
@@ -23,6 +23,56 @@ feature 'Diff note avatars', feature: true, js: true do
...
@@ -23,6 +23,56 @@ feature 'Diff note avatars', feature: true, js: true do
login_as
user
login_as
user
end
end
context
'discussion tab'
do
before
do
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
end
it
'does not show avatars on discussion tab'
do
expect
(
page
).
not_to
have_selector
(
'.js-avatar-container'
)
expect
(
page
).
not_to
have_selector
(
'.diff-comment-avatar-holders'
)
end
it
'does not render avatars after commening on discussion tab'
do
click_button
'Reply...'
page
.
within
(
'.js-discussion-note-form'
)
do
find
(
'.note-textarea'
).
native
.
send_keys
(
'Test comment'
)
click_button
'Comment'
end
expect
(
page
).
to
have_content
(
'Test comment'
)
expect
(
page
).
not_to
have_selector
(
'.js-avatar-container'
)
expect
(
page
).
not_to
have_selector
(
'.diff-comment-avatar-holders'
)
end
end
context
'commit view'
do
before
do
visit
namespace_project_commit_path
(
project
.
namespace
,
project
,
merge_request
.
commits
.
first
.
id
)
end
it
'does not render avatar after commenting'
do
first
(
'.diff-line-num'
).
trigger
(
'mouseover'
)
find
(
'.js-add-diff-note-button'
).
click
page
.
within
(
'.js-discussion-note-form'
)
do
find
(
'.note-textarea'
).
native
.
send_keys
(
'test comment'
)
click_button
'Comment'
wait_for_ajax
end
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
expect
(
page
).
to
have_content
(
'test comment'
)
expect
(
page
).
not_to
have_selector
(
'.js-avatar-container'
)
expect
(
page
).
not_to
have_selector
(
'.diff-comment-avatar-holders'
)
end
end
%w(inline parallel)
.
each
do
|
view
|
%w(inline parallel)
.
each
do
|
view
|
context
"
#{
view
}
view"
do
context
"
#{
view
}
view"
do
before
do
before
do
...
...
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