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
6505f205
Commit
6505f205
authored
Jan 15, 2020
by
Illya Klymov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless attachToDocument property
attachToDocument property is not needed
parent
4ac2a641
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
40 deletions
+16
-40
spec/frontend/monitoring/components/charts/time_series_spec.js
...frontend/monitoring/components/charts/time_series_spec.js
+0
-1
spec/frontend/monitoring/components/dashboard_spec.js
spec/frontend/monitoring/components/dashboard_spec.js
+14
-29
spec/frontend/monitoring/components/dashboard_time_url_spec.js
...frontend/monitoring/components/dashboard_time_url_spec.js
+1
-4
spec/frontend/monitoring/components/dashboard_time_window_spec.js
...ntend/monitoring/components/dashboard_time_window_spec.js
+1
-4
spec/frontend/monitoring/panel_type_spec.js
spec/frontend/monitoring/panel_type_spec.js
+0
-2
No files found.
spec/frontend/monitoring/components/charts/time_series_spec.js
View file @
6505f205
...
@@ -59,7 +59,6 @@ describe('Time series component', () => {
...
@@ -59,7 +59,6 @@ describe('Time series component', () => {
default
:
mockWidgets
,
default
:
mockWidgets
,
},
},
store
,
store
,
attachToDocument
:
true
,
});
});
});
});
...
...
spec/frontend/monitoring/components/dashboard_spec.js
View file @
6505f205
...
@@ -61,7 +61,7 @@ describe('Dashboard', () => {
...
@@ -61,7 +61,7 @@ describe('Dashboard', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
mock
.
onGet
(
mockApiEndpoint
).
reply
(
statusCodes
.
OK
,
metricsGroupsAPIResponse
);
mock
.
onGet
(
mockApiEndpoint
).
reply
(
statusCodes
.
OK
,
metricsGroupsAPIResponse
);
createShallowWrapper
(
{},
{
attachToDocument
:
true
}
);
createShallowWrapper
();
});
});
afterEach
(()
=>
{
afterEach
(()
=>
{
...
@@ -77,7 +77,7 @@ describe('Dashboard', () => {
...
@@ -77,7 +77,7 @@ describe('Dashboard', () => {
beforeEach
(
done
=>
{
beforeEach
(
done
=>
{
mock
.
onGet
(
mockApiEndpoint
).
reply
(
statusCodes
.
OK
,
metricsGroupsAPIResponse
);
mock
.
onGet
(
mockApiEndpoint
).
reply
(
statusCodes
.
OK
,
metricsGroupsAPIResponse
);
createShallowWrapper
(
{},
{
attachToDocument
:
true
}
);
createShallowWrapper
();
wrapper
.
vm
.
$nextTick
(
done
);
wrapper
.
vm
.
$nextTick
(
done
);
});
});
...
@@ -97,7 +97,7 @@ describe('Dashboard', () => {
...
@@ -97,7 +97,7 @@ describe('Dashboard', () => {
});
});
it
(
'
shows up a loading state
'
,
done
=>
{
it
(
'
shows up a loading state
'
,
done
=>
{
createShallowWrapper
({
hasMetrics
:
true
}
,
{
attachToDocument
:
true
}
);
createShallowWrapper
({
hasMetrics
:
true
});
wrapper
.
vm
wrapper
.
vm
.
$nextTick
()
.
$nextTick
()
...
@@ -112,7 +112,7 @@ describe('Dashboard', () => {
...
@@ -112,7 +112,7 @@ describe('Dashboard', () => {
it
(
'
hides the group panels when showPanels is false
'
,
done
=>
{
it
(
'
hides the group panels when showPanels is false
'
,
done
=>
{
createMountedWrapper
(
createMountedWrapper
(
{
hasMetrics
:
true
,
showPanels
:
false
},
{
hasMetrics
:
true
,
showPanels
:
false
},
{
attachToDocument
:
true
,
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
},
{
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
},
);
);
setupComponentStore
(
wrapper
);
setupComponentStore
(
wrapper
);
...
@@ -134,10 +134,7 @@ describe('Dashboard', () => {
...
@@ -134,10 +134,7 @@ describe('Dashboard', () => {
it
(
'
fetches the metrics data with proper time window
'
,
done
=>
{
it
(
'
fetches the metrics data with proper time window
'
,
done
=>
{
jest
.
spyOn
(
store
,
'
dispatch
'
);
jest
.
spyOn
(
store
,
'
dispatch
'
);
createMountedWrapper
(
createMountedWrapper
({
hasMetrics
:
true
},
{
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
});
{
hasMetrics
:
true
},
{
attachToDocument
:
true
,
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
},
);
wrapper
.
vm
.
$store
.
commit
(
wrapper
.
vm
.
$store
.
commit
(
`monitoringDashboard/
${
types
.
RECEIVE_ENVIRONMENTS_DATA_SUCCESS
}
`
,
`monitoringDashboard/
${
types
.
RECEIVE_ENVIRONMENTS_DATA_SUCCESS
}
`
,
...
@@ -159,10 +156,7 @@ describe('Dashboard', () => {
...
@@ -159,10 +156,7 @@ describe('Dashboard', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
mock
.
onGet
(
mockApiEndpoint
).
reply
(
statusCodes
.
OK
,
metricsGroupsAPIResponse
);
mock
.
onGet
(
mockApiEndpoint
).
reply
(
statusCodes
.
OK
,
metricsGroupsAPIResponse
);
createMountedWrapper
(
createMountedWrapper
({
hasMetrics
:
true
},
{
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
});
{
hasMetrics
:
true
},
{
attachToDocument
:
true
,
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
},
);
setupComponentStore
(
wrapper
);
setupComponentStore
(
wrapper
);
});
});
...
@@ -214,10 +208,7 @@ describe('Dashboard', () => {
...
@@ -214,10 +208,7 @@ describe('Dashboard', () => {
});
});
it
(
'
hides the environments dropdown list when there is no environments
'
,
done
=>
{
it
(
'
hides the environments dropdown list when there is no environments
'
,
done
=>
{
createMountedWrapper
(
createMountedWrapper
({
hasMetrics
:
true
},
{
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
});
{
hasMetrics
:
true
},
{
attachToDocument
:
true
,
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
},
);
wrapper
.
vm
.
$store
.
commit
(
wrapper
.
vm
.
$store
.
commit
(
`monitoringDashboard/
${
types
.
RECEIVE_METRICS_DATA_SUCCESS
}
`
,
`monitoringDashboard/
${
types
.
RECEIVE_METRICS_DATA_SUCCESS
}
`
,
...
@@ -242,10 +233,7 @@ describe('Dashboard', () => {
...
@@ -242,10 +233,7 @@ describe('Dashboard', () => {
});
});
it
(
'
renders the datetimepicker dropdown
'
,
done
=>
{
it
(
'
renders the datetimepicker dropdown
'
,
done
=>
{
createMountedWrapper
(
createMountedWrapper
({
hasMetrics
:
true
},
{
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
});
{
hasMetrics
:
true
},
{
attachToDocument
:
true
,
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
},
);
setupComponentStore
(
wrapper
);
setupComponentStore
(
wrapper
);
...
@@ -262,7 +250,7 @@ describe('Dashboard', () => {
...
@@ -262,7 +250,7 @@ describe('Dashboard', () => {
beforeEach
(
done
=>
{
beforeEach
(
done
=>
{
mock
.
onGet
(
mockApiEndpoint
).
reply
(
200
,
metricsGroupsAPIResponse
);
mock
.
onGet
(
mockApiEndpoint
).
reply
(
200
,
metricsGroupsAPIResponse
);
createShallowWrapper
({
hasMetrics
:
true
}
,
{
attachToDocument
:
true
}
);
createShallowWrapper
({
hasMetrics
:
true
});
setupComponentStore
(
wrapper
);
setupComponentStore
(
wrapper
);
wrapper
.
vm
.
$nextTick
(
done
);
wrapper
.
vm
.
$nextTick
(
done
);
...
@@ -296,7 +284,7 @@ describe('Dashboard', () => {
...
@@ -296,7 +284,7 @@ describe('Dashboard', () => {
});
});
beforeEach
(
done
=>
{
beforeEach
(
done
=>
{
createShallowWrapper
({
hasMetrics
:
true
}
,
{
attachToDocument
:
true
}
);
createShallowWrapper
({
hasMetrics
:
true
});
setupComponentStore
(
wrapper
);
setupComponentStore
(
wrapper
);
...
@@ -413,7 +401,7 @@ describe('Dashboard', () => {
...
@@ -413,7 +401,7 @@ describe('Dashboard', () => {
beforeEach
(
done
=>
{
beforeEach
(
done
=>
{
mock
.
onGet
(
mockApiEndpoint
).
reply
(
statusCodes
.
OK
,
metricsGroupsAPIResponse
);
mock
.
onGet
(
mockApiEndpoint
).
reply
(
statusCodes
.
OK
,
metricsGroupsAPIResponse
);
createShallowWrapper
({
hasMetrics
:
true
}
,
{
attachToDocument
:
true
}
);
createShallowWrapper
({
hasMetrics
:
true
});
wrapper
.
vm
.
$store
.
commit
(
wrapper
.
vm
.
$store
.
commit
(
`monitoringDashboard/
${
types
.
SET_ALL_DASHBOARDS
}
`
,
`monitoringDashboard/
${
types
.
SET_ALL_DASHBOARDS
}
`
,
...
@@ -450,10 +438,7 @@ describe('Dashboard', () => {
...
@@ -450,10 +438,7 @@ describe('Dashboard', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
mock
.
onGet
(
mockApiEndpoint
).
reply
(
200
,
metricsGroupsAPIResponse
);
mock
.
onGet
(
mockApiEndpoint
).
reply
(
200
,
metricsGroupsAPIResponse
);
createMountedWrapper
(
createMountedWrapper
({
hasMetrics
:
true
},
{
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
});
{
hasMetrics
:
true
},
{
attachToDocument
:
true
,
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
},
);
wrapper
.
vm
.
$store
.
commit
(
wrapper
.
vm
.
$store
.
commit
(
`monitoringDashboard/
${
types
.
SET_ALL_DASHBOARDS
}
`
,
`monitoringDashboard/
${
types
.
SET_ALL_DASHBOARDS
}
`
,
...
@@ -485,7 +470,7 @@ describe('Dashboard', () => {
...
@@ -485,7 +470,7 @@ describe('Dashboard', () => {
showTimeWindowDropdown
:
false
,
showTimeWindowDropdown
:
false
,
externalDashboardUrl
:
'
/mockUrl
'
,
externalDashboardUrl
:
'
/mockUrl
'
,
},
},
{
attachToDocument
:
true
,
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
},
{
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
},
);
);
});
});
...
@@ -515,7 +500,7 @@ describe('Dashboard', () => {
...
@@ -515,7 +500,7 @@ describe('Dashboard', () => {
beforeEach
(
done
=>
{
beforeEach
(
done
=>
{
mock
.
onGet
(
mockApiEndpoint
).
reply
(
200
,
metricsGroupsAPIResponse
);
mock
.
onGet
(
mockApiEndpoint
).
reply
(
200
,
metricsGroupsAPIResponse
);
createShallowWrapper
({
hasMetrics
:
true
,
currentDashboard
}
,
{
attachToDocument
:
true
}
);
createShallowWrapper
({
hasMetrics
:
true
,
currentDashboard
});
setTimeout
(
done
);
setTimeout
(
done
);
});
});
...
...
spec/frontend/monitoring/components/dashboard_time_url_spec.js
View file @
6505f205
...
@@ -38,10 +38,7 @@ describe('dashboard invalid url parameters', () => {
...
@@ -38,10 +38,7 @@ describe('dashboard invalid url parameters', () => {
});
});
it
(
'
shows an error message if invalid url parameters are passed
'
,
done
=>
{
it
(
'
shows an error message if invalid url parameters are passed
'
,
done
=>
{
createMountedWrapper
(
createMountedWrapper
({
hasMetrics
:
true
},
{
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
});
{
hasMetrics
:
true
},
{
attachToDocument
:
true
,
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
},
);
wrapper
.
vm
wrapper
.
vm
.
$nextTick
()
.
$nextTick
()
...
...
spec/frontend/monitoring/components/dashboard_time_window_spec.js
View file @
6505f205
...
@@ -45,10 +45,7 @@ describe('dashboard time window', () => {
...
@@ -45,10 +45,7 @@ describe('dashboard time window', () => {
it
(
'
shows an error message if invalid url parameters are passed
'
,
done
=>
{
it
(
'
shows an error message if invalid url parameters are passed
'
,
done
=>
{
mock
.
onGet
(
mockApiEndpoint
).
reply
(
statusCodes
.
OK
,
metricsGroupsAPIResponse
);
mock
.
onGet
(
mockApiEndpoint
).
reply
(
statusCodes
.
OK
,
metricsGroupsAPIResponse
);
createComponentWrapperMounted
(
createComponentWrapperMounted
({
hasMetrics
:
true
},
{
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
});
{
hasMetrics
:
true
},
{
attachToDocument
:
true
,
stubs
:
[
'
graph-group
'
,
'
panel-type
'
]
},
);
setupComponentStore
(
wrapper
);
setupComponentStore
(
wrapper
);
...
...
spec/frontend/monitoring/panel_type_spec.js
View file @
6505f205
...
@@ -26,7 +26,6 @@ describe('Panel Type component', () => {
...
@@ -26,7 +26,6 @@ describe('Panel Type component', () => {
...
props
,
...
props
,
},
},
store
,
store
,
attachToDocument
:
true
,
});
});
beforeEach
(()
=>
{
beforeEach
(()
=>
{
...
@@ -151,7 +150,6 @@ describe('Panel Type component', () => {
...
@@ -151,7 +150,6 @@ describe('Panel Type component', () => {
graphData
:
graphDataPrometheusQueryRange
,
graphData
:
graphDataPrometheusQueryRange
,
},
},
store
,
store
,
attachToDocument
:
true
,
});
});
panelType
.
vm
.
$nextTick
(
done
);
panelType
.
vm
.
$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