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
8776744c
Commit
8776744c
authored
Oct 30, 2019
by
Ezekiel Kigbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display error message if fetchTasksByTypeData fails
parent
4da2f986
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
ee/spec/frontend/analytics/cycle_analytics/components/base_spec.js
...rontend/analytics/cycle_analytics/components/base_spec.js
+22
-0
No files found.
ee/spec/frontend/analytics/cycle_analytics/components/base_spec.js
View file @
8776744c
...
...
@@ -423,5 +423,27 @@ describe('Cycle Analytics component', () => {
);
});
});
it
(
'
will display an error if the fetchTasksByTypeData request fails
'
,
()
=>
{
expect
(
findFlashError
()).
toBeNull
();
mock
.
onGet
(
'
/groups/foo/-/labels
'
)
.
replyOnce
(
httpStatusCodes
.
OK
,
{
response
:
{
...
mockData
.
groupLabels
}
})
.
onGet
(
'
/groups/foo/-/cycle_analytics
'
)
.
replyOnce
(
httpStatusCodes
.
OK
,
{
response
:
{
status
:
httpStatusCodes
.
OK
}
})
.
onGet
(
'
/-/analytics/type_of_work/tasks_by_type
'
)
.
replyOnce
(
httpStatusCodes
.
BAD_REQUEST
,
{
response
:
{
status
:
httpStatusCodes
.
BAD_REQUEST
},
});
wrapper
.
vm
.
onGroupSelect
(
mockData
.
group
);
return
waitForPromises
().
then
(()
=>
{
expect
(
findFlashError
().
innerText
.
trim
()).
toEqual
(
'
There was an error fetching data for the chart
'
,
);
});
});
});
});
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