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
ebc7b2f3
Commit
ebc7b2f3
authored
Dec 21, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix karma specs
parent
13881488
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
spec/javascripts/issuable/related_issues/components/issue_item_spec.js
...pts/issuable/related_issues/components/issue_item_spec.js
+8
-8
spec/javascripts/issuable/related_issues/components/issue_token_spec.js
...ts/issuable/related_issues/components/issue_token_spec.js
+2
-1
No files found.
spec/javascripts/issuable/related_issues/components/issue_item_spec.js
View file @
ebc7b2f3
...
...
@@ -27,11 +27,11 @@ describe('issueItem', () => {
});
it
(
'
does not render token state
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.text-secondary
i
'
)).
toBeNull
();
expect
(
vm
.
$el
.
querySelector
(
'
.text-secondary
svg
'
)).
toBeNull
();
});
it
(
'
does not render remove button
'
,
()
=>
{
expect
(
vm
.
$
el
.
querySelector
(
'
.js-issue-token-remove-button
'
)).
toBeNull
();
expect
(
vm
.
$
refs
.
removeButton
).
toBeUndefined
();
});
describe
(
'
token title
'
,
()
=>
{
...
...
@@ -50,13 +50,13 @@ describe('issueItem', () => {
beforeEach
((
done
)
=>
{
vm
.
state
=
'
opened
'
;
Vue
.
nextTick
(()
=>
{
tokenState
=
vm
.
$el
.
querySelector
(
'
.text-secondary
i
'
);
tokenState
=
vm
.
$el
.
querySelector
(
'
.text-secondary
svg
'
);
done
();
});
});
it
(
'
renders if hasState
'
,
()
=>
{
expect
(
tokenState
).
not
.
toBeNull
();
expect
(
tokenState
).
toBeDefined
();
});
it
(
'
renders state title
'
,
()
=>
{
...
...
@@ -68,14 +68,14 @@ describe('issueItem', () => {
});
it
(
'
renders open icon when open state
'
,
()
=>
{
expect
(
tokenState
.
classList
.
contains
(
'
fa-circle-o
'
)).
toEqual
(
true
);
expect
(
tokenState
.
classList
.
contains
(
'
issue-token-state-icon-open
'
)).
toEqual
(
true
);
});
it
(
'
renders close icon when close state
'
,
(
done
)
=>
{
vm
.
state
=
'
closed
'
;
Vue
.
nextTick
(()
=>
{
expect
(
tokenState
.
classList
.
contains
(
'
fa-minus
'
)).
toEqual
(
true
);
expect
(
tokenState
.
classList
.
contains
(
'
issue-token-state-icon-closed
'
)).
toEqual
(
true
);
done
();
});
});
...
...
@@ -87,13 +87,13 @@ describe('issueItem', () => {
beforeEach
((
done
)
=>
{
vm
.
canRemove
=
true
;
Vue
.
nextTick
(()
=>
{
removeBtn
=
vm
.
$
el
.
querySelector
(
'
.js-issue-token-remove-button
'
)
;
removeBtn
=
vm
.
$
refs
.
removeButton
;
done
();
});
});
it
(
'
renders if canRemove
'
,
()
=>
{
expect
(
removeBtn
).
not
.
toBeNull
();
expect
(
removeBtn
).
toBeDefined
();
});
it
(
'
renders disabled button when removeDisabled
'
,
(
done
)
=>
{
...
...
spec/javascripts/issuable/related_issues/components/issue_token_spec.js
View file @
ebc7b2f3
...
...
@@ -138,7 +138,8 @@ describe('IssueToken', () => {
});
it
(
'
shows reference, title, and state
'
,
()
=>
{
expect
(
vm
.
$refs
.
stateIcon
.
getAttribute
(
'
aria-label
'
)).
toEqual
(
state
);
const
stateIcon
=
vm
.
$refs
.
reference
.
querySelector
(
'
svg
'
);
expect
(
stateIcon
.
getAttribute
(
'
aria-label
'
)).
toEqual
(
state
);
expect
(
vm
.
$refs
.
reference
.
textContent
.
trim
()).
toEqual
(
displayReference
);
expect
(
vm
.
$refs
.
title
.
textContent
.
trim
()).
toEqual
(
title
);
});
...
...
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