Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
00e302e1622b
Commit
a28a0c60
authored
Oct 18, 2017
by
Clement Ho
Committed by
Phil Hughes
Oct 18, 2017
Browse files
Fix resolved discussions not expanding on side by side view
parent
51beed92eea5
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/views/discussions/_parallel_diff_discussion.html.haml
View file @
00e302e1
...
...
@@ -4,7 +4,7 @@
%td
.notes_line.old
%td
.notes_content.parallel.old
.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
%td
.notes_line.old
=
(
""
)
%td
.notes_content.parallel.old
...
...
@@ -14,7 +14,7 @@
%td
.notes_line.new
%td
.notes_content.parallel.new
.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
%td
.notes_line.new
=
(
""
)
%td
.notes_content.parallel.new
...
...
changelogs/unreleased/fix-resolved-side-by-side.yml
0 → 100644
View file @
00e302e1
---
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 @
00e302e1
...
...
@@ -97,14 +97,33 @@
visit_merge_request
end
it
'hides when resolve discussion is clicked'
do
expect
(
page
).
to
have_selector
(
'.discussion-body'
,
visible:
false
)
describe
'timeline view'
do
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
it
'shows resolved discussion when toggled'
do
find
(
".timeline-content .discussion[data-discussion-id='
#{
note
.
discussion_id
}
'] .discussion-toggle-button"
).
click
describe
'side-by-side view'
do
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
...
...
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