BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
f86ac8f5
Commit
f86ac8f5
authored
Jun 19, 2017
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'enable-autocomplete-on-project-snippets' into 'master'
Enable autocomplete on project snippets Closes #33911 See merge request !12286
parents
6ac777a7
a7750f1b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
12 deletions
+5
-12
dispatcher.js
app/assets/javascripts/dispatcher.js
+2
-0
show.html.haml
app/views/projects/snippets/show.html.haml
+1
-1
snippets_spec.rb
spec/features/projects/snippets_spec.rb
+2
-11
No files found.
app/assets/javascripts/dispatcher.js
View file @
f86ac8f5
...
...
@@ -226,6 +226,8 @@ import initSettingsPanels from './settings_panels';
case
'projects:snippets:edit'
:
case
'projects:snippets:create'
:
case
'projects:snippets:update'
:
new
gl
.
GLForm
(
$
(
'.snippet-form'
),
true
);
break
;
case
'snippets:new'
:
case
'snippets:edit'
:
case
'snippets:create'
:
...
...
app/views/projects/snippets/show.html.haml
View file @
f86ac8f5
...
...
@@ -9,4 +9,4 @@
.row-content-block.top-block.content-component-block
=
render
'award_emoji/awards_block'
,
awardable:
@snippet
,
inline:
true
#notes
=
render
"shared/notes/notes_with_form"
,
:autocomplete
=>
fals
e
#notes
=
render
"shared/notes/notes_with_form"
,
:autocomplete
=>
tru
e
spec/features/projects/snippets_spec.rb
View file @
f86ac8f5
...
...
@@ -33,20 +33,11 @@ describe 'Project snippets', :js, feature: true do
visit
namespace_project_snippet_path
(
project
.
namespace
,
project
,
snippets
[
0
])
end
it
'should not have autocomplete'
do
wait_for_requests
request_count_before
=
page
.
driver
.
network_traffic
.
count
it
'should have autocomplete'
do
find
(
'#note_note'
).
native
.
send_keys
(
''
)
fill_in
'note[note]'
,
with:
'@'
wait_for_requests
request_count_after
=
page
.
driver
.
network_traffic
.
count
# This selector probably won't be in place even if autocomplete was enabled
# but we want to make sure
expect
(
page
).
not_to
have_selector
(
'.atwho-view'
)
expect
(
request_count_before
).
to
eq
(
request_count_after
)
expect
(
page
).
to
have_selector
(
'.atwho-view'
)
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