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
aea013ea
Commit
aea013ea
authored
Jun 03, 2019
by
Winnie Hellmann
Committed by
Clement Ho
Jun 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move NoteApp tests to Jest
parent
8a2afff0
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
114 additions
and
109 deletions
+114
-109
app/assets/javascripts/gfm_auto_complete.js
app/assets/javascripts/gfm_auto_complete.js
+1
-0
app/assets/javascripts/notes/components/noteable_note.vue
app/assets/javascripts/notes/components/noteable_note.vue
+6
-3
app/assets/javascripts/notes/components/notes_app.vue
app/assets/javascripts/notes/components/notes_app.vue
+4
-0
spec/frontend/helpers/jquery.js
spec/frontend/helpers/jquery.js
+6
-0
spec/frontend/notes/components/note_app_spec.js
spec/frontend/notes/components/note_app_spec.js
+97
-106
No files found.
app/assets/javascripts/gfm_auto_complete.js
View file @
aea013ea
import
$
from
'
jquery
'
;
import
$
from
'
jquery
'
;
import
'
at.js
'
;
import
_
from
'
underscore
'
;
import
_
from
'
underscore
'
;
import
glRegexp
from
'
./lib/utils/regexp
'
;
import
glRegexp
from
'
./lib/utils/regexp
'
;
import
AjaxCache
from
'
./lib/utils/ajax_cache
'
;
import
AjaxCache
from
'
./lib/utils/ajax_cache
'
;
...
...
app/assets/javascripts/notes/components/noteable_note.vue
View file @
aea013ea
...
@@ -10,7 +10,7 @@ import Flash from '../../flash';
...
@@ -10,7 +10,7 @@ import Flash from '../../flash';
import
userAvatarLink
from
'
../../vue_shared/components/user_avatar/user_avatar_link.vue
'
;
import
userAvatarLink
from
'
../../vue_shared/components/user_avatar/user_avatar_link.vue
'
;
import
noteHeader
from
'
./note_header.vue
'
;
import
noteHeader
from
'
./note_header.vue
'
;
import
noteActions
from
'
./note_actions.vue
'
;
import
noteActions
from
'
./note_actions.vue
'
;
import
n
oteBody
from
'
./note_body.vue
'
;
import
N
oteBody
from
'
./note_body.vue
'
;
import
eventHub
from
'
../event_hub
'
;
import
eventHub
from
'
../event_hub
'
;
import
noteable
from
'
../mixins/noteable
'
;
import
noteable
from
'
../mixins/noteable
'
;
import
resolvable
from
'
../mixins/resolvable
'
;
import
resolvable
from
'
../mixins/resolvable
'
;
...
@@ -21,7 +21,7 @@ export default {
...
@@ -21,7 +21,7 @@ export default {
userAvatarLink
,
userAvatarLink
,
noteHeader
,
noteHeader
,
noteActions
,
noteActions
,
n
oteBody
,
N
oteBody
,
TimelineEntryItem
,
TimelineEntryItem
,
},
},
mixins
:
[
noteable
,
resolvable
,
draftMixin
],
mixins
:
[
noteable
,
resolvable
,
draftMixin
],
...
@@ -209,7 +209,10 @@ export default {
...
@@ -209,7 +209,10 @@ export default {
// we need to do this to prevent noteForm inconsistent content warning
// we need to do this to prevent noteForm inconsistent content warning
// this is something we intentionally do so we need to recover the content
// this is something we intentionally do so we need to recover the content
this
.
note
.
note
=
noteText
;
this
.
note
.
note
=
noteText
;
this
.
$refs
.
noteBody
.
note
.
note
=
noteText
;
const
{
noteBody
}
=
this
.
$refs
;
if
(
noteBody
)
{
noteBody
.
note
.
note
=
noteText
;
}
},
},
},
},
};
};
...
...
app/assets/javascripts/notes/components/notes_app.vue
View file @
aea013ea
...
@@ -127,6 +127,9 @@ export default {
...
@@ -127,6 +127,9 @@ export default {
initUserPopovers
(
this
.
$el
.
querySelectorAll
(
'
.js-user-link
'
));
initUserPopovers
(
this
.
$el
.
querySelectorAll
(
'
.js-user-link
'
));
});
});
},
},
beforeDestroy
()
{
this
.
stopPolling
();
},
methods
:
{
methods
:
{
...
mapActions
([
...
mapActions
([
'
setLoadingState
'
,
'
setLoadingState
'
,
...
@@ -144,6 +147,7 @@ export default {
...
@@ -144,6 +147,7 @@ export default {
'
expandDiscussion
'
,
'
expandDiscussion
'
,
'
startTaskList
'
,
'
startTaskList
'
,
'
convertToDiscussion
'
,
'
convertToDiscussion
'
,
'
stopPolling
'
,
]),
]),
fetchNotes
()
{
fetchNotes
()
{
if
(
this
.
isFetching
)
return
null
;
if
(
this
.
isFetching
)
return
null
;
...
...
spec/frontend/helpers/jquery.js
0 → 100644
View file @
aea013ea
import
$
from
'
jquery
'
;
global
.
$
=
$
;
global
.
jQuery
=
$
;
export
default
$
;
spec/
javascripts
/notes/components/note_app_spec.js
→
spec/
frontend
/notes/components/note_app_spec.js
View file @
aea013ea
This diff is collapsed.
Click to expand it.
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