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
Jérome Perrin
gitlab-ce
Commits
6bf781e4
Commit
6bf781e4
authored
Aug 14, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix autocomplete broken tests
parent
b67e333c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
10 deletions
+13
-10
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+1
-1
app/assets/javascripts/notes/components/issue_comment_form.vue
...ssets/javascripts/notes/components/issue_comment_form.vue
+1
-1
app/assets/javascripts/notes/components/issue_note_form.vue
app/assets/javascripts/notes/components/issue_note_form.vue
+1
-1
app/views/projects/issues/_discussion.html.haml
app/views/projects/issues/_discussion.html.haml
+1
-2
spec/features/participants_autocomplete_spec.rb
spec/features/participants_autocomplete_spec.rb
+9
-5
No files found.
app/assets/javascripts/dispatcher.js
View file @
6bf781e4
...
...
@@ -98,7 +98,7 @@ import initChangesDropdown from './init_changes_dropdown';
path
=
page
.
split
(
'
:
'
);
shortcut_handler
=
null
;
$
(
'
.js-gfm-input
'
).
each
((
i
,
el
)
=>
{
$
(
'
.js-gfm-input
:not(.js-vue-textarea)
'
).
each
((
i
,
el
)
=>
{
const
gfm
=
new
GfmAutoComplete
(
gl
.
GfmAutoComplete
&&
gl
.
GfmAutoComplete
.
dataSources
);
const
enableGFM
=
gl
.
utils
.
convertPermissionToBoolean
(
el
.
dataset
.
supportsAutocomplete
);
gfm
.
setup
(
$
(
el
),
{
...
...
app/assets/javascripts/notes/components/issue_comment_form.vue
View file @
6bf781e4
...
...
@@ -240,7 +240,7 @@
<textarea
id=
"note-body"
name=
"note[note]"
class=
"note-textarea js-vue-comment-form js-gfm-input js-autosize markdown-area"
class=
"note-textarea js-vue-comment-form js-gfm-input js-autosize markdown-area
js-vue-textarea
"
data-supports-quick-actions=
"true"
aria-label=
"Description"
v-model=
"note"
...
...
app/assets/javascripts/notes/components/issue_note_form.vue
View file @
6bf781e4
...
...
@@ -131,7 +131,7 @@
<textarea
id=
"note_note"
name=
"note[note]"
class=
"note-textarea js-gfm-input js-autosize markdown-area js-vue-issue-note-form"
class=
"note-textarea js-gfm-input js-autosize markdown-area js-vue-issue-note-form
js-vue-textarea
"
:data-supports-quick-actions=
"!isEditing"
aria-label=
"Description"
v-model=
"note"
...
...
app/views/projects/issues/_discussion.html.haml
View file @
6bf781e4
-
@gfm_form
=
true
-
content_for
:note_actions
do
-
if
can?
(
current_user
,
:update_issue
,
@issue
)
=
link_to
'Reopen issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :reopen
},
format:
'json'
),
data:
{
original_text:
"Reopen issue"
,
alternative_text:
"Comment & reopen issue"
},
class:
"btn btn-nr btn-reopen btn-comment js-note-target-reopen
#{
issue_button_visibility
(
@issue
,
false
)
}
"
,
title:
'Reopen issue'
...
...
@@ -16,5 +17,3 @@
-
content_for
:page_specific_javascripts
do
=
webpack_bundle_tag
'common_vue'
=
webpack_bundle_tag
'notes'
=
render
"layouts/init_auto_complete"
spec/features/participants_autocomplete_spec.rb
View file @
6bf781e4
...
...
@@ -11,10 +11,14 @@ feature 'Member autocomplete', :js do
sign_in
(
user
)
end
shared_examples
"open suggestions when typing @"
do
shared_examples
"open suggestions when typing @"
do
|
resource_name
|
before
do
page
.
within
(
'.new-note'
)
do
find
(
'#note_note'
).
send_keys
(
'@'
)
if
resource_name
==
'issue'
find
(
'#note-body'
).
send_keys
(
'@'
)
else
find
(
'#note_note'
).
send_keys
(
'@'
)
end
end
end
...
...
@@ -32,7 +36,7 @@ feature 'Member autocomplete', :js do
visit
project_issue_path
(
project
,
noteable
)
end
include_examples
"open suggestions when typing @"
include_examples
"open suggestions when typing @"
,
'issue'
end
context
'adding a new note on a Merge Request'
do
...
...
@@ -45,7 +49,7 @@ feature 'Member autocomplete', :js do
visit
project_merge_request_path
(
project
,
noteable
)
end
include_examples
"open suggestions when typing @"
include_examples
"open suggestions when typing @"
,
'merge_request'
end
context
'adding a new note on a Commit'
do
...
...
@@ -60,6 +64,6 @@ feature 'Member autocomplete', :js do
visit
project_commit_path
(
project
,
noteable
)
end
include_examples
"open suggestions when typing @"
include_examples
"open suggestions when typing @"
,
'commit'
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