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
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
0 deletions
+57
-0
dropdown_header.vue
...ared/components/sidebar/labels_select/dropdown_header.vue
+21
-0
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