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
b7d43f5f
Commit
b7d43f5f
authored
Nov 14, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix autocomplete spec
parent
aa36924a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
spec/javascripts/issuable/related_issues/components/add_issuable_form_spec.js
...uable/related_issues/components/add_issuable_form_spec.js
+45
-0
No files found.
spec/javascripts/issuable/related_issues/components/add_issuable_form_spec.js
View file @
b7d43f5f
...
...
@@ -121,6 +121,48 @@ describe('AddIssuableForm', () => {
});
});
describe
(
'
autocomplete
'
,
()
=>
{
describe
(
'
with autoCompleteSources
'
,
()
=>
{
beforeEach
(()
=>
{
vm
=
new
AddIssuableForm
({
propsData
:
{
inputValue
:
''
,
autoCompleteSources
:
{
issues
:
'
/fake/issues/path
'
,
},
},
}).
$mount
();
});
it
(
'
shows placeholder text
'
,
()
=>
{
expect
(
vm
.
$refs
.
input
.
placeholder
).
toEqual
(
'
Paste issue link or <#issue id>
'
);
});
it
(
'
has GfmAutoComplete
'
,
()
=>
{
expect
(
vm
.
gfmAutoComplete
).
toBeDefined
();
});
});
describe
(
'
with autoCompleteSources
'
,
()
=>
{
beforeEach
(()
=>
{
vm
=
new
AddIssuableForm
({
propsData
:
{
inputValue
:
''
,
autoCompleteSources
:
{},
},
}).
$mount
();
});
it
(
'
shows placeholder text
'
,
()
=>
{
expect
(
vm
.
$refs
.
input
.
placeholder
).
toEqual
(
'
Paste issue link
'
);
});
it
(
'
does not have GfmAutoComplete
'
,
()
=>
{
expect
(
vm
.
gfmAutoComplete
).
not
.
toBeDefined
();
});
});
});
describe
(
'
methods
'
,
()
=>
{
let
addIssuableFormInputSpy
;
let
addIssuableFormBlurSpy
;
...
...
@@ -147,6 +189,9 @@ describe('AddIssuableForm', () => {
pendingIssuables
:
[
issuable1
,
],
autoCompleteSources
:
{
issues
:
'
/fake/issues/path
'
,
},
},
}).
$mount
(
el
);
});
...
...
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