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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
5989aa18
Commit
5989aa18
authored
Mar 05, 2018
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LabelsSelect DropdownHeader Component
parent
ab1bc5c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
0 deletions
+57
-0
app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header.vue
...ared/components/sidebar/labels_select/dropdown_header.vue
+21
-0
spec/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header_spec.js
.../components/sidebar/labels_select/dropdown_header_spec.js
+36
-0
No files found.
app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header.vue
0 → 100644
View file @
5989aa18
<
script
>
export
default
{};
</
script
>
<
template
>
<div
class=
"dropdown-title"
>
<span>
{{
__
(
'
Assign labels
'
)
}}
</span>
<button
type=
"button"
class=
"dropdown-title-button dropdown-menu-close"
:aria-label=
"__('Close')"
>
<i
aria-hidden=
"true"
class=
"fa fa-times dropdown-menu-close-icon"
data-hidden=
"true"
>
</i>
</button>
</div>
</
template
>
spec/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header_spec.js
0 → 100644
View file @
5989aa18
import
Vue
from
'
vue
'
;
import
dropdownHeaderComponent
from
'
~/vue_shared/components/sidebar/labels_select/dropdown_header.vue
'
;
import
mountComponent
from
'
../../../../helpers/vue_mount_component_helper
'
;
const
createComponent
=
()
=>
{
const
Component
=
Vue
.
extend
(
dropdownHeaderComponent
);
return
mountComponent
(
Component
);
};
describe
(
'
DropdownHeaderComponent
'
,
()
=>
{
let
vm
;
beforeEach
(()
=>
{
vm
=
createComponent
();
});
afterEach
(()
=>
{
vm
.
$destroy
();
});
describe
(
'
template
'
,
()
=>
{
it
(
'
renders header text element
'
,
()
=>
{
const
headerEl
=
vm
.
$el
.
querySelector
(
'
.dropdown-title span
'
);
expect
(
headerEl
.
innerText
.
trim
()).
toBe
(
'
Assign labels
'
);
});
it
(
'
renders `Close` button element
'
,
()
=>
{
const
closeBtnEl
=
vm
.
$el
.
querySelector
(
'
.dropdown-title button.dropdown-title-button.dropdown-menu-close
'
);
expect
(
closeBtnEl
).
not
.
toBeNull
();
expect
(
closeBtnEl
.
querySelector
(
'
.fa-times.dropdown-menu-close-icon
'
)).
not
.
toBeNull
();
});
});
});
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