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
1ac5f764
Commit
1ac5f764
authored
Jul 08, 2016
by
Luke "Jared" Bennett
Committed by
Luke Bennett
Aug 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed test turbolink condition
parent
40d869ee
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
app/assets/javascripts/gl_dropdown.js.coffee
app/assets/javascripts/gl_dropdown.js.coffee
+5
-5
spec/javascripts/gl_dropdown_spec.js.coffee
spec/javascripts/gl_dropdown_spec.js.coffee
+4
-3
No files found.
app/assets/javascripts/gl_dropdown.js.coffee
View file @
1ac5f764
...
...
@@ -307,7 +307,7 @@ class GitLabDropdown
shouldPropagate
:
(
e
)
=>
$target
=
$
(
e
.
target
)
if
@
options
.
multiSelect
unless
$target
.
hasClass
(
'dropdown-menu-close'
)
and
$target
.
hasClass
(
'dropdown-menu-close-icon'
)
and
$target
.
data
(
'is-link'
)
if
$target
and
not
$target
.
hasClass
(
'dropdown-menu-close'
)
and
not
$target
.
hasClass
(
'dropdown-menu-close-icon'
)
and
not
$target
.
data
(
'is-link'
)
e
.
stopPropagation
()
false
else
...
...
@@ -380,10 +380,10 @@ class GitLabDropdown
html
=
''
# Divider
return
'<li class=
'
divider
'
></li>'
if
data
is
'divider'
return
'<li class=
"divider"
></li>'
if
data
is
'divider'
# Separator is a full-width divider
return
'<li class=
'
separator
'
></li>'
if
data
is
'separator'
return
'<li class=
"separator"
></li>'
if
data
is
'separator'
# Header
return
_
.
template
(
'<li class="dropdown-header"><%- header %></li>'
)({
header
:
data
.
header
})
if
data
.
header
?
...
...
spec/javascripts/gl_dropdown_spec.js.coffee
View file @
1ac5f764
...
...
@@ -81,11 +81,12 @@ describe 'Dropdown', ->
navigateWithKeys
'down'
,
randomIndex
,
=>
spyOn
(
Turbolinks
,
'visit'
).
and
.
stub
()
navigateWithKeys
'enter'
,
null
,
=>
expect
(
@
dropdownContainerElement
).
not
.
toHaveClass
'open'
link
=
$
(
"
#{
ITEM_SELECTOR
}
:eq(
#{
randomIndex
}
) a"
,
@
dropdownMenuElement
)
expect
(
link
).
toHaveClass
'is-active'
if
link
.
attr
'href'
expect
(
Turbolinks
.
visit
).
toHaveBeenCalledWith
link
.
attr
'href
'
expect
(
@
dropdownContainerElement
).
not
.
toHaveClass
'open'
linkedLocation
=
link
.
attr
'href'
if
linkedLocation
and
linkedLocation
isnt
'#
'
expect
(
Turbolinks
.
visit
).
toHaveBeenCalledWith
linkedLocation
it
'should close on ESC keypress'
,
->
expect
(
@
dropdownContainerElement
).
toHaveClass
'open'
...
...
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