summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlauraMon <lmontemayor@gitlab.com>2019-08-28 18:06:07 -0400
committerlauraMon <lmontemayor@gitlab.com>2019-09-09 19:55:19 -0400
commit0c873625668a09fce2a70d8f2475091d260533ac (patch)
tree6ebb04dd903aa3cbe88fb3b5efeda9eb22dc03d3
parentde38bb96fb7fc5e4b519c25c6cd0b5ab52677b3c (diff)
downloadgitlab-ce-remove-downloadCsv-ff.tar.gz
Removes stale testsremove-downloadCsv-ff
-rw-r--r--spec/javascripts/monitoring/charts/time_series_spec.js32
1 files changed, 0 insertions, 32 deletions
diff --git a/spec/javascripts/monitoring/charts/time_series_spec.js b/spec/javascripts/monitoring/charts/time_series_spec.js
index d145a64e8d0..f6a5ed03c0d 100644
--- a/spec/javascripts/monitoring/charts/time_series_spec.js
+++ b/spec/javascripts/monitoring/charts/time_series_spec.js
@@ -23,7 +23,6 @@ describe('Time series component', () => {
store = createStore();
store.commit(`monitoringDashboard/${types.RECEIVE_METRICS_DATA_SUCCESS}`, MonitoringMock.data);
store.commit(`monitoringDashboard/${types.RECEIVE_DEPLOYMENTS_DATA_SUCCESS}`, deploymentData);
- store.dispatch('monitoringDashboard/setFeatureFlags', { exportMetricsToCsvEnabled: true });
[mockGraphData] = store.state.monitoringDashboard.groups[0].metrics;
makeTimeSeriesChart = (graphData, type) =>
@@ -61,19 +60,6 @@ describe('Time series component', () => {
expect(timeSeriesChart.find('.js-graph-widgets').text()).toBe(mockWidgets);
});
- describe('when exportMetricsToCsvEnabled is disabled', () => {
- beforeEach(() => {
- store.dispatch('monitoringDashboard/setFeatureFlags', { exportMetricsToCsvEnabled: false });
- });
-
- it('does not render the Download CSV button', done => {
- timeSeriesChart.vm.$nextTick(() => {
- expect(timeSeriesChart.contains('glbutton-stub')).toBe(false);
- done();
- });
- });
- });
-
describe('methods', () => {
describe('formatTooltipText', () => {
const mockDate = deploymentData[0].created_at;
@@ -234,24 +220,6 @@ describe('Time series component', () => {
expect(timeSeriesChart.vm.yAxisLabel).toBe('CPU');
});
});
-
- describe('csvText', () => {
- it('converts data from json to csv', () => {
- const header = `timestamp,${mockGraphData.y_label}`;
- const data = mockGraphData.queries[0].result[0].values;
- const firstRow = `${data[0][0]},${data[0][1]}`;
-
- expect(timeSeriesChart.vm.csvText).toMatch(`^${header}\r\n${firstRow}`);
- });
- });
-
- describe('downloadLink', () => {
- it('produces a link to download metrics as csv', () => {
- const link = timeSeriesChart.vm.downloadLink;
-
- expect(link).toContain('blob:');
- });
- });
});
afterEach(() => {