Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/monitoring/components/dashboard_spec.js')
-rw-r--r--spec/frontend/monitoring/components/dashboard_spec.js43
1 files changed, 14 insertions, 29 deletions
diff --git a/spec/frontend/monitoring/components/dashboard_spec.js b/spec/frontend/monitoring/components/dashboard_spec.js
index 030b68bcd5a..85408d57dde 100644
--- a/spec/frontend/monitoring/components/dashboard_spec.js
+++ b/spec/frontend/monitoring/components/dashboard_spec.js
@@ -63,7 +63,7 @@ describe('Dashboard', () => {
beforeEach(() => {
mock.onGet(mockApiEndpoint).reply(statusCodes.OK, metricsGroupsAPIResponse);
- createShallowWrapper({}, { attachToDocument: true });
+ createShallowWrapper();
});
afterEach(() => {
@@ -79,7 +79,7 @@ describe('Dashboard', () => {
beforeEach(done => {
mock.onGet(mockApiEndpoint).reply(statusCodes.OK, metricsGroupsAPIResponse);
- createShallowWrapper({}, { attachToDocument: true });
+ createShallowWrapper();
wrapper.vm.$nextTick(done);
});
@@ -99,7 +99,7 @@ describe('Dashboard', () => {
});
it('shows up a loading state', done => {
- createShallowWrapper({ hasMetrics: true }, { attachToDocument: true });
+ createShallowWrapper({ hasMetrics: true });
wrapper.vm
.$nextTick()
@@ -114,7 +114,7 @@ describe('Dashboard', () => {
it('hides the group panels when showPanels is false', done => {
createMountedWrapper(
{ hasMetrics: true, showPanels: false },
- { attachToDocument: true, stubs: ['graph-group', 'panel-type'] },
+ { stubs: ['graph-group', 'panel-type'] },
);
setupComponentStore(wrapper);
@@ -136,10 +136,7 @@ describe('Dashboard', () => {
it('fetches the metrics data with proper time window', done => {
jest.spyOn(store, 'dispatch');
- createMountedWrapper(
- { hasMetrics: true },
- { attachToDocument: true, stubs: ['graph-group', 'panel-type'] },
- );
+ createMountedWrapper({ hasMetrics: true }, { stubs: ['graph-group', 'panel-type'] });
wrapper.vm.$store.commit(
`monitoringDashboard/${types.RECEIVE_ENVIRONMENTS_DATA_SUCCESS}`,
@@ -161,10 +158,7 @@ describe('Dashboard', () => {
beforeEach(() => {
mock.onGet(mockApiEndpoint).reply(statusCodes.OK, metricsGroupsAPIResponse);
- createMountedWrapper(
- { hasMetrics: true },
- { attachToDocument: true, stubs: ['graph-group', 'panel-type'] },
- );
+ createMountedWrapper({ hasMetrics: true }, { stubs: ['graph-group', 'panel-type'] });
setupComponentStore(wrapper);
});
@@ -216,10 +210,7 @@ describe('Dashboard', () => {
});
it('hides the environments dropdown list when there is no environments', done => {
- createMountedWrapper(
- { hasMetrics: true },
- { attachToDocument: true, stubs: ['graph-group', 'panel-type'] },
- );
+ createMountedWrapper({ hasMetrics: true }, { stubs: ['graph-group', 'panel-type'] });
wrapper.vm.$store.commit(
`monitoringDashboard/${types.RECEIVE_METRICS_DATA_SUCCESS}`,
@@ -244,10 +235,7 @@ describe('Dashboard', () => {
});
it('renders the datetimepicker dropdown', done => {
- createMountedWrapper(
- { hasMetrics: true },
- { attachToDocument: true, stubs: ['graph-group', 'panel-type'] },
- );
+ createMountedWrapper({ hasMetrics: true }, { stubs: ['graph-group', 'panel-type'] });
setupComponentStore(wrapper);
@@ -264,7 +252,7 @@ describe('Dashboard', () => {
beforeEach(done => {
mock.onGet(mockApiEndpoint).reply(200, metricsGroupsAPIResponse);
- createShallowWrapper({ hasMetrics: true }, { attachToDocument: true });
+ createShallowWrapper({ hasMetrics: true });
setupComponentStore(wrapper);
wrapper.vm.$nextTick(done);
@@ -298,7 +286,7 @@ describe('Dashboard', () => {
});
beforeEach(done => {
- createShallowWrapper({ hasMetrics: true }, { attachToDocument: true });
+ createShallowWrapper({ hasMetrics: true });
setupComponentStore(wrapper);
@@ -415,7 +403,7 @@ describe('Dashboard', () => {
beforeEach(done => {
mock.onGet(mockApiEndpoint).reply(statusCodes.OK, metricsGroupsAPIResponse);
- createShallowWrapper({ hasMetrics: true }, { attachToDocument: true });
+ createShallowWrapper({ hasMetrics: true });
wrapper.vm.$store.commit(
`monitoringDashboard/${types.SET_ALL_DASHBOARDS}`,
@@ -452,10 +440,7 @@ describe('Dashboard', () => {
beforeEach(() => {
mock.onGet(mockApiEndpoint).reply(200, metricsGroupsAPIResponse);
- createMountedWrapper(
- { hasMetrics: true },
- { attachToDocument: true, stubs: ['graph-group', 'panel-type'] },
- );
+ createMountedWrapper({ hasMetrics: true }, { stubs: ['graph-group', 'panel-type'] });
wrapper.vm.$store.commit(
`monitoringDashboard/${types.SET_ALL_DASHBOARDS}`,
@@ -487,7 +472,7 @@ describe('Dashboard', () => {
showTimeWindowDropdown: false,
externalDashboardUrl: '/mockUrl',
},
- { attachToDocument: true, stubs: ['graph-group', 'panel-type'] },
+ { stubs: ['graph-group', 'panel-type'] },
);
});
@@ -517,7 +502,7 @@ describe('Dashboard', () => {
beforeEach(done => {
mock.onGet(mockApiEndpoint).reply(200, metricsGroupsAPIResponse);
- createShallowWrapper({ hasMetrics: true, currentDashboard }, { attachToDocument: true });
+ createShallowWrapper({ hasMetrics: true, currentDashboard });
setTimeout(done);
});