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
Léo-Paul Géneau
gitlab-ce
Commits
183a52f8
Commit
183a52f8
authored
Dec 09, 2016
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix single note edit form specs.
parent
0143573d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
app/assets/javascripts/notes.js
app/assets/javascripts/notes.js
+3
-3
spec/features/notes_on_merge_requests_spec.rb
spec/features/notes_on_merge_requests_spec.rb
+2
-1
spec/javascripts/notes_spec.js
spec/javascripts/notes_spec.js
+1
-0
No files found.
app/assets/javascripts/notes.js
View file @
183a52f8
...
...
@@ -56,7 +56,7 @@
// We are in the Merge Requests page so we need another edit form for Changes tab
if
(
gl
.
utils
.
getPagePath
(
1
)
===
'
merge_requests
'
)
{
$
(
'
.note-edit-form
'
).
clone
()
.
addClass
(
'
mr-
discussion
-edit-form
'
).
insertAfter
(
'
.note-edit-form
'
);
.
addClass
(
'
mr-
note
-edit-form
'
).
insertAfter
(
'
.note-edit-form
'
);
}
}
...
...
@@ -569,10 +569,10 @@
};
Notes
.
prototype
.
getEditFormSelector
=
function
(
$el
)
{
var
selector
=
'
.note-edit-form:not(.mr-
discussion
-edit-form)
'
;
var
selector
=
'
.note-edit-form:not(.mr-
note
-edit-form)
'
;
if
(
$el
.
parents
(
'
#diffs
'
).
length
)
{
selector
=
'
.note-edit-form.mr-
discussion
-edit-form
'
;
selector
=
'
.note-edit-form.mr-
note
-edit-form
'
;
}
return
selector
;
...
...
spec/features/notes_on_merge_requests_spec.rb
View file @
183a52f8
...
...
@@ -71,7 +71,8 @@ describe 'Comments', feature: true do
describe
'when editing a note'
,
js:
true
do
it
'there should be a hidden edit form'
do
is_expected
.
to
have_css
(
'.note-edit-form'
,
visible:
false
,
count:
1
)
is_expected
.
to
have_css
(
'.note-edit-form:not(.mr-note-edit-form)'
,
visible:
false
,
count:
1
)
is_expected
.
to
have_css
(
'.note-edit-form.mr-note-edit-form'
,
visible:
false
,
count:
1
)
end
describe
'editing the note'
do
...
...
spec/javascripts/notes_spec.js
View file @
183a52f8
...
...
@@ -19,6 +19,7 @@
fixture
.
load
(
commentsTemplate
);
gl
.
utils
.
disableButtonIfEmptyField
=
_
.
noop
;
window
.
project_uploads_path
=
'
http://test.host/uploads
'
;
$
(
'
body
'
).
data
(
'
page
'
,
'
projects:issues:show
'
);
});
describe
(
'
task lists
'
,
function
()
{
...
...
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