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
04dc4bfc
Commit
04dc4bfc
authored
Feb 06, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed assignee_select_spec.js
parent
6b827a5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
spec/javascripts/boards/components/assignee_select_spec.js
spec/javascripts/boards/components/assignee_select_spec.js
+16
-9
No files found.
spec/javascripts/boards/components/assignee_select_spec.js
View file @
04dc4bfc
/* global BoardService */
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
Vue
from
'
vue
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
AssigneeSelect
from
'
~/boards/components/assignee_select.vue
'
;
import
'
~/boards/services/board_service
'
;
import
'
~/boards/stores/boards_store
'
;
...
...
@@ -86,12 +87,18 @@ describe('Assignee select component', () => {
});
describe
(
'
clicking dropdown items
'
,
()
=>
{
let
mock
;
beforeEach
(()
=>
{
const
deferred
=
new
jQuery
.
Deferred
(
);
spyOn
(
$
,
'
ajax
'
).
and
.
returnValue
(
deferred
.
resolve
(
[
mock
=
new
MockAdapter
(
axios
);
mock
.
onGet
(
'
/autocomplete/users.json
'
).
reply
(
200
,
[
assignee
,
assignee2
,
]));
]);
});
afterEach
(()
=>
{
mock
.
restore
();
});
it
(
'
sets assignee
'
,
(
done
)
=>
{
...
...
@@ -99,12 +106,12 @@ describe('Assignee select component', () => {
setTimeout
(()
=>
{
vm
.
$el
.
querySelectorAll
(
'
li a
'
)[
2
].
click
();
});
setTimeout
(()
=>
{
expect
(
activeDropdownItem
(
0
)).
toEqual
(
'
second assignee
'
);
expect
(
vm
.
board
.
assignee
).
toEqual
(
assignee2
);
done
();
setTimeout
(()
=>
{
expect
(
activeDropdownItem
(
0
)).
toEqual
(
'
second assignee
'
);
expect
(
vm
.
board
.
assignee
).
toEqual
(
assignee2
);
done
();
});
});
});
});
...
...
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