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
d284f678
Commit
d284f678
authored
Nov 14, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix timing issues in karma tests
parent
76585993
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
spec/javascripts/issuable/related_issues/components/related_issues_root_spec.js
...ble/related_issues/components/related_issues_root_spec.js
+8
-9
No files found.
spec/javascripts/issuable/related_issues/components/related_issues_root_spec.js
View file @
d284f678
...
@@ -26,7 +26,7 @@ const issuable2 = {
...
@@ -26,7 +26,7 @@ const issuable2 = {
destroy_relation_path
:
'
/foo/bar/issues/124/related_issues/1
'
,
destroy_relation_path
:
'
/foo/bar/issues/124/related_issues/1
'
,
};
};
describe
(
'
RelatedIssuesRoot
'
,
()
=>
{
f
describe
(
'
RelatedIssuesRoot
'
,
()
=>
{
let
RelatedIssuesRoot
;
let
RelatedIssuesRoot
;
let
vm
;
let
vm
;
...
@@ -138,6 +138,7 @@ describe('RelatedIssuesRoot', () => {
...
@@ -138,6 +138,7 @@ describe('RelatedIssuesRoot', () => {
describe
(
'
onPendingFormSubmit
'
,
()
=>
{
describe
(
'
onPendingFormSubmit
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
spyOn
(
relatedIssuesService
.
prototype
,
'
fetchRelatedIssues
'
).
and
.
returnValue
(
Promise
.
reject
());
vm
=
new
RelatedIssuesRoot
({
vm
=
new
RelatedIssuesRoot
({
propsData
:
defaultProps
,
propsData
:
defaultProps
,
}).
$mount
();
}).
$mount
();
...
@@ -250,23 +251,21 @@ describe('RelatedIssuesRoot', () => {
...
@@ -250,23 +251,21 @@ describe('RelatedIssuesRoot', () => {
});
});
describe
(
'
fetchRelatedIssues
'
,
()
=>
{
describe
(
'
fetchRelatedIssues
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
((
done
)
=>
{
vm
=
new
RelatedIssuesRoot
({
vm
=
new
RelatedIssuesRoot
({
propsData
:
defaultProps
,
propsData
:
defaultProps
,
}).
$mount
();
}).
$mount
();
// wait for internal call to fetchRelatedIssues to resolve
setTimeout
(()
=>
Vue
.
nextTick
(
done
));
});
});
describe
(
'
when the network has not responded yet
'
,
()
=>
{
describe
(
'
when the network has not responded yet
'
,
()
=>
{
it
(
'
should be fetching
'
,
(
done
)
=>
{
it
(
'
should be fetching
'
,
(
done
)
=>
{
vm
.
fetchRelatedIssues
();
vm
.
fetchRelatedIssues
();
setTimeout
(()
=>
{
Vue
.
nextTick
(()
=>
{
expect
(
vm
.
isFetching
).
toEqual
(
true
);
expect
(
vm
.
isFetching
).
toEqual
(
true
);
done
();
setTimeout
(()
=>
Vue
.
nextTick
(
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