Skip to content

Commit cc9655a

Browse files
committed
remove old tests
1 parent cbf46a2 commit cc9655a

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

test/jasmine/tests/download_test.js

-49
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
var Plotly = require('@lib/index');
22
var Lib = require('@src/lib');
33

4-
// var helpers = require('@src/snapshot/helpers');
5-
// var getImageSize = require('@src/traces/image/helpers').getImageSize;
6-
74
var createGraphDiv = require('../assets/create_graph_div');
85
var destroyGraphDiv = require('../assets/destroy_graph_div');
96

@@ -137,52 +134,6 @@ describe('Plotly.downloadImage', function() {
137134
})
138135
.then(done, done.fail);
139136
}, LONG_TIMEOUT_INTERVAL);
140-
/*
141-
it('should produce right output in Old Safari', function(done) {
142-
spyOn(Lib, 'isSafari').and.callFake(function() { return true; });
143-
spyOn(helpers, 'octetStream');
144-
145-
Plotly.newPlot(gd, textchartMock.data, textchartMock.layout)
146-
.then(function() { return Plotly.downloadImage(gd, {format: 'svg'}); })
147-
.then(function() { return Plotly.downloadImage(gd, {format: 'png'}); })
148-
.then(function() { return Plotly.downloadImage(gd, {format: 'jpeg'}); })
149-
.then(function() { return Plotly.downloadImage(gd, {format: 'webp'}); })
150-
.then(function() {
151-
var args = helpers.octetStream.calls.allArgs();
152-
expect(args[0][0].slice(0, 15)).toBe(',%3Csvg%20class', 'format:svg');
153-
expect(args[1][0].slice(0, 8)).toBe(';base64,', 'format:png');
154-
expect(args[2][0].slice(0, 8)).toBe(';base64,', 'format:jpeg');
155-
expect(args[3][0].slice(0, 8)).toBe(';base64,', 'format:webp');
156-
})
157-
.then(done, done.fail);
158-
});
159-
160-
it('should default width & height for downloadImage to match with the live graph on Old Safari', function(done) {
161-
spyOn(Lib, 'isSafari').and.callFake(function() { return true; });
162-
spyOn(helpers, 'octetStream');
163-
164-
var fig = {
165-
data: [{y: [0, 1]}]
166-
};
167-
168-
gd.style.width = '500px';
169-
gd.style.height = '300px';
170-
171-
Plotly.newPlot(gd, fig)
172-
.then(function() { return Plotly.downloadImage(gd, {format: 'png'}); })
173-
.then(function() {
174-
var args = helpers.octetStream.calls.allArgs();
175-
var blob = args[0][0];
176-
expect(blob.slice(0, 8)).toBe(';base64,', 'format:png');
177-
var size = getImageSize('data:image/png' + blob);
178-
expect(size.width).toBe(gd._fullLayout.width, 'fullLayout width');
179-
expect(size.height).toBe(gd._fullLayout.height, 'fullLayout height');
180-
expect(size.width).toBe(500, 'div width');
181-
expect(size.height).toBe(300, 'div height');
182-
})
183-
.then(done, done.fail);
184-
});
185-
*/
186137
});
187138

188139
function downloadTest(gd, format) {

0 commit comments

Comments
 (0)