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
75c616fa
Commit
75c616fa
authored
Dec 17, 2019
by
Miguel Rincon
Committed by
Paul Slaughter
Dec 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate monitor chart specs to jest
https://gitlab.com/gitlab-org/gitlab/merge_requests/21714
parent
5cc3b099
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
11 deletions
+9
-11
spec/frontend/monitoring/components/charts/column_spec.js
spec/frontend/monitoring/components/charts/column_spec.js
+4
-0
spec/frontend/monitoring/components/charts/empty_chart_spec.js
...frontend/monitoring/components/charts/empty_chart_spec.js
+0
-0
spec/frontend/monitoring/components/charts/heatmap_spec.js
spec/frontend/monitoring/components/charts/heatmap_spec.js
+1
-1
spec/frontend/monitoring/components/charts/single_stat_spec.js
...frontend/monitoring/components/charts/single_stat_spec.js
+1
-1
spec/frontend/monitoring/components/charts/time_series_spec.js
...frontend/monitoring/components/charts/time_series_spec.js
+3
-9
No files found.
spec/
javascripts/monitoring
/charts/column_spec.js
→
spec/
frontend/monitoring/components
/charts/column_spec.js
View file @
75c616fa
...
@@ -4,6 +4,10 @@ import ColumnChart from '~/monitoring/components/charts/column.vue';
...
@@ -4,6 +4,10 @@ import ColumnChart from '~/monitoring/components/charts/column.vue';
const
localVue
=
createLocalVue
();
const
localVue
=
createLocalVue
();
jest
.
mock
(
'
~/lib/utils/icon_utils
'
,
()
=>
({
getSvgIconPathContent
:
jest
.
fn
().
mockResolvedValue
(
'
mockSvgPathContent
'
),
}));
describe
(
'
Column component
'
,
()
=>
{
describe
(
'
Column component
'
,
()
=>
{
let
columnChart
;
let
columnChart
;
...
...
spec/
javascripts/monitoring
/charts/empty_chart_spec.js
→
spec/
frontend/monitoring/components
/charts/empty_chart_spec.js
View file @
75c616fa
File moved
spec/
javascripts/monitoring
/charts/heatmap_spec.js
→
spec/
frontend/monitoring/components
/charts/heatmap_spec.js
View file @
75c616fa
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlHeatmap
}
from
'
@gitlab/ui/dist/charts
'
;
import
{
GlHeatmap
}
from
'
@gitlab/ui/dist/charts
'
;
import
Heatmap
from
'
~/monitoring/components/charts/heatmap.vue
'
;
import
Heatmap
from
'
~/monitoring/components/charts/heatmap.vue
'
;
import
{
graphDataPrometheusQueryRangeMultiTrack
}
from
'
../mock_data
'
;
import
{
graphDataPrometheusQueryRangeMultiTrack
}
from
'
../
../
mock_data
'
;
describe
(
'
Heatmap component
'
,
()
=>
{
describe
(
'
Heatmap component
'
,
()
=>
{
let
heatmapChart
;
let
heatmapChart
;
...
...
spec/
javascripts/monitoring
/charts/single_stat_spec.js
→
spec/
frontend/monitoring/components
/charts/single_stat_spec.js
View file @
75c616fa
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
SingleStatChart
from
'
~/monitoring/components/charts/single_stat.vue
'
;
import
SingleStatChart
from
'
~/monitoring/components/charts/single_stat.vue
'
;
import
{
graphDataPrometheusQuery
}
from
'
../mock_data
'
;
import
{
graphDataPrometheusQuery
}
from
'
../
../
mock_data
'
;
const
localVue
=
createLocalVue
();
const
localVue
=
createLocalVue
();
...
...
spec/frontend/monitoring/charts/time_series_spec.js
→
spec/frontend/monitoring/c
omponents/c
harts/time_series_spec.js
View file @
75c616fa
...
@@ -12,20 +12,14 @@ import {
...
@@ -12,20 +12,14 @@ import {
mockedQueryResultPayload
,
mockedQueryResultPayload
,
mockProjectDir
,
mockProjectDir
,
mockHost
,
mockHost
,
}
from
'
../mock_data
'
;
}
from
'
../../mock_data
'
;
import
*
as
iconUtils
from
'
~/lib/utils/icon_utils
'
;
import
*
as
iconUtils
from
'
~/lib/utils/icon_utils
'
;
const
mockSvgPathContent
=
'
mockSvgPathContent
'
;
const
mockWidgets
=
'
mockWidgets
'
;
const
mockWidgets
=
'
mockWidgets
'
;
const
mockSvgPathContent
=
'
mockSvgPathContent
'
;
jest
.
mock
(
'
~/lib/utils/icon_utils
'
,
()
=>
({
jest
.
mock
(
'
~/lib/utils/icon_utils
'
,
()
=>
({
getSvgIconPathContent
:
jest
.
fn
().
mockImplementation
(
getSvgIconPathContent
:
jest
.
fn
().
mockImplementation
(()
=>
Promise
.
resolve
(
mockSvgPathContent
)),
()
=>
new
Promise
(
resolve
=>
{
resolve
(
mockSvgPathContent
);
}),
),
}));
}));
describe
(
'
Time series component
'
,
()
=>
{
describe
(
'
Time series component
'
,
()
=>
{
...
...
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