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
Boxiang Sun
gitlab-ce
Commits
a28a0c60
Commit
a28a0c60
authored
Oct 18, 2017
by
Clement Ho
Committed by
Phil Hughes
Oct 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix resolved discussions not expanding on side by side view
parent
e4b465d7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
7 deletions
+31
-7
app/views/discussions/_parallel_diff_discussion.html.haml
app/views/discussions/_parallel_diff_discussion.html.haml
+2
-2
changelogs/unreleased/fix-resolved-side-by-side.yml
changelogs/unreleased/fix-resolved-side-by-side.yml
+5
-0
spec/features/merge_requests/diff_notes_resolve_spec.rb
spec/features/merge_requests/diff_notes_resolve_spec.rb
+24
-5
No files found.
app/views/discussions/_parallel_diff_discussion.html.haml
View file @
a28a0c60
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
%td
.notes_line.old
%td
.notes_line.old
%td
.notes_content.parallel.old
%td
.notes_content.parallel.old
.content
{
class:
(
'hide'
unless
discussions_left
.
any?
(
&
:expanded?
))
}
.content
{
class:
(
'hide'
unless
discussions_left
.
any?
(
&
:expanded?
))
}
=
render
partial:
"discussions/notes"
,
collection:
discussions_left
,
as: :discussion
,
line_type:
'old'
=
render
partial:
"discussions/notes"
,
collection:
discussions_left
,
as: :discussion
,
line_type:
'old'
,
locals:
{
disable_collapse_class:
true
}
-
else
-
else
%td
.notes_line.old
=
(
""
)
%td
.notes_line.old
=
(
""
)
%td
.notes_content.parallel.old
%td
.notes_content.parallel.old
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
%td
.notes_line.new
%td
.notes_line.new
%td
.notes_content.parallel.new
%td
.notes_content.parallel.new
.content
{
class:
(
'hide'
unless
discussions_right
.
any?
(
&
:expanded?
))
}
.content
{
class:
(
'hide'
unless
discussions_right
.
any?
(
&
:expanded?
))
}
=
render
partial:
"discussions/notes"
,
collection:
discussions_right
,
as: :discussion
,
line_type:
'new'
=
render
partial:
"discussions/notes"
,
collection:
discussions_right
,
as: :discussion
,
line_type:
'new'
,
locals:
{
disable_collapse_class:
true
}
-
else
-
else
%td
.notes_line.new
=
(
""
)
%td
.notes_line.new
=
(
""
)
%td
.notes_content.parallel.new
%td
.notes_content.parallel.new
...
...
changelogs/unreleased/fix-resolved-side-by-side.yml
0 → 100644
View file @
a28a0c60
---
title
:
Fix resolved discussions not expanding on side by side view
merge_request
:
author
:
type
:
fixed
spec/features/merge_requests/diff_notes_resolve_spec.rb
View file @
a28a0c60
...
@@ -97,14 +97,33 @@ feature 'Diff notes resolve', :js do
...
@@ -97,14 +97,33 @@ feature 'Diff notes resolve', :js do
visit_merge_request
visit_merge_request
end
end
it
'hides when resolve discussion is clicked'
do
describe
'timeline view'
do
expect
(
page
).
to
have_selector
(
'.discussion-body'
,
visible:
false
)
it
'hides when resolve discussion is clicked'
do
expect
(
page
).
to
have_selector
(
'.discussion-body'
,
visible:
false
)
end
it
'shows resolved discussion when toggled'
do
find
(
".timeline-content .discussion[data-discussion-id='
#{
note
.
discussion_id
}
'] .discussion-toggle-button"
).
click
expect
(
page
.
find
(
".timeline-content #note_
#{
note
.
noteable_id
}
"
)).
to
be_visible
end
end
end
it
'shows resolved discussion when toggled'
do
describe
'side-by-side view'
do
find
(
".timeline-content .discussion[data-discussion-id='
#{
note
.
discussion_id
}
'] .discussion-toggle-button"
).
click
before
do
page
.
within
(
'.merge-request-tabs'
)
{
click_link
'Changes'
}
page
.
find
(
'#parallel-diff-btn'
).
click
end
expect
(
page
.
find
(
".timeline-content #note_
#{
note
.
noteable_id
}
"
)).
to
be_visible
it
'hides when resolve discussion is clicked'
do
expect
(
page
).
to
have_selector
(
'.diffs .diff-file .notes_holder'
,
visible:
false
)
end
it
'shows resolved discussion when toggled'
do
find
(
'.diff-comment-avatar-holders'
).
click
expect
(
find
(
'.diffs .diff-file .notes_holder'
)).
to
be_visible
end
end
end
end
end
...
...
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