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
Tatuya Kamada
gitlab-ce
Commits
e3d92a6c
Commit
e3d92a6c
authored
Jan 02, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for note edit and fix one commented spec.
parent
09fc4f55
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
9 deletions
+29
-9
changelogs/unreleased/single-edit-comment-widget-2.yml
changelogs/unreleased/single-edit-comment-widget-2.yml
+5
-0
spec/features/notes_on_merge_requests_spec.rb
spec/features/notes_on_merge_requests_spec.rb
+24
-9
No files found.
changelogs/unreleased/single-edit-comment-widget-2.yml
0 → 100644
View file @
e3d92a6c
---
title
:
Refactored note edit form to improve frontend performance on MR and Issues
pages, especially pages with has a lot of discussions in it
merge_request
:
8356
author
:
spec/features/notes_on_merge_requests_spec.rb
View file @
e3d92a6c
...
...
@@ -78,7 +78,7 @@ describe 'Comments', feature: true do
describe
'editing the note'
do
before
do
find
(
'.note'
).
hover
find
(
".js-note-edit"
).
click
find
(
'.js-note-edit'
).
click
end
it
'shows the note edit form and hide the note body'
do
...
...
@@ -89,14 +89,29 @@ describe 'Comments', feature: true do
end
end
# TODO: fix after 7.7 release
# it "should reset the edit note form textarea with the original content of the note if cancelled" do
# within(".current-note-edit-form") do
# fill_in "note[note]", with: "Some new content"
# find(".btn-cancel").click
# expect(find(".js-note-text", visible: false).text).to eq note.note
# end
# end
it
'should reset the edit note form textarea with the original content of the note if cancelled'
do
within
(
'.current-note-edit-form'
)
do
fill_in
'note[note]'
,
with:
'Some new content'
find
(
'.btn-cancel'
).
click
expect
(
find
(
'.js-note-text'
,
visible:
false
).
text
).
to
eq
''
end
end
it
'allows using markdown buttons after saving a note and then trying to edit it again'
do
page
.
within
(
'.current-note-edit-form'
)
do
fill_in
'note[note]'
,
with:
'This is the new content'
find
(
'.btn-save'
).
click
end
find
(
'.note'
).
hover
find
(
'.js-note-edit'
).
click
page
.
within
(
'.current-note-edit-form'
)
do
expect
(
find
(
'#note_note'
).
value
).
to
eq
(
'This is the new content'
)
find
(
'.js-md:first-child'
).
click
expect
(
find
(
'#note_note'
).
value
).
to
eq
(
'This is the new content****'
)
end
end
it
'appends the edited at time to the note'
do
page
.
within
(
'.current-note-edit-form'
)
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