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
3f54abb2
Commit
3f54abb2
authored
Jan 08, 2018
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make tasklist:changed test in merge_request_spec.js async
parent
62943cd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
spec/javascripts/merge_request_spec.js
spec/javascripts/merge_request_spec.js
+11
-4
No files found.
spec/javascripts/merge_request_spec.js
View file @
3f54abb2
...
@@ -19,17 +19,24 @@ import IssuablesHelper from '~/helpers/issuables_helper';
...
@@ -19,17 +19,24 @@ import IssuablesHelper from '~/helpers/issuables_helper';
$
(
'
input[type=checkbox]
'
).
attr
(
'
checked
'
,
true
)[
0
].
dispatchEvent
(
changeEvent
);
$
(
'
input[type=checkbox]
'
).
attr
(
'
checked
'
,
true
)[
0
].
dispatchEvent
(
changeEvent
);
return
expect
(
$
(
'
.js-task-list-field
'
).
val
()).
toBe
(
'
- [x] Task List Item
'
);
return
expect
(
$
(
'
.js-task-list-field
'
).
val
()).
toBe
(
'
- [x] Task List Item
'
);
});
});
return
it
(
'
submits an ajax request on tasklist:changed
'
,
function
()
{
spyOn
(
jQuery
,
'
ajax
'
).
and
.
callFake
(
function
(
req
)
{
it
(
'
submits an ajax request on tasklist:changed
'
,
(
done
)
=>
{
spyOn
(
jQuery
,
'
ajax
'
).
and
.
callFake
((
req
)
=>
{
expect
(
req
.
type
).
toBe
(
'
PATCH
'
);
expect
(
req
.
type
).
toBe
(
'
PATCH
'
);
expect
(
req
.
url
).
toBe
(
`
${
gl
.
TEST_HOST
}
/frontend-fixtures/merge-requests-project/merge_requests/1.json`
);
expect
(
req
.
url
).
toBe
(
`
${
gl
.
TEST_HOST
}
/frontend-fixtures/merge-requests-project/merge_requests/1.json`
);
return
expect
(
req
.
data
.
merge_request
.
description
).
not
.
toBe
(
null
);
expect
(
req
.
data
.
merge_request
.
description
).
not
.
toBe
(
null
);
done
();
});
});
return
$
(
'
.js-task-list-field
'
).
trigger
(
'
tasklist:changed
'
);
$
(
'
.js-task-list-field
'
).
trigger
(
'
tasklist:changed
'
);
});
});
});
});
describe
(
'
class constructor
'
,
()
=>
{
describe
(
'
class constructor
'
,
()
=>
{
beforeEach
(()
=>
{
spyOn
(
jQuery
,
'
ajax
'
).
and
.
stub
();
});
it
(
'
calls .initCloseReopenReport
'
,
()
=>
{
it
(
'
calls .initCloseReopenReport
'
,
()
=>
{
spyOn
(
IssuablesHelper
,
'
initCloseReopenReport
'
);
spyOn
(
IssuablesHelper
,
'
initCloseReopenReport
'
);
...
...
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