Skip to content

Commit fb3556d

Browse files
committed
🔪 commented out tests
1 parent 6f5e313 commit fb3556d

File tree

1 file changed

+0
-162
lines changed

1 file changed

+0
-162
lines changed

test/jasmine/tests/image_test.js

-162
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ var failTest = require('../assets/fail_test');
1212
var customAssertions = require('../assets/custom_assertions');
1313
var assertHoverLabelContent = customAssertions.assertHoverLabelContent;
1414
var Fx = require('@src/components/fx');
15-
// var mouseEvent = require('../assets/mouse_event');
1615

1716
describe('image supplyDefaults', function() {
1817
'use strict';
@@ -79,34 +78,6 @@ describe('image supplyDefaults', function() {
7978
});
8079
});
8180
});
82-
//
83-
// describe('image calc', function() {
84-
// 'use strict';
85-
//
86-
// function _calc(opts, layout) {
87-
// var base = { type: 'image' };
88-
// var trace = Lib.extendFlat({}, base, opts);
89-
// var gd = { data: [trace] };
90-
// if(layout) gd.layout = layout;
91-
//
92-
// supplyAllDefaults(gd);
93-
// var fullTrace = gd._fullData[0];
94-
// var fullLayout = gd._fullLayout;
95-
//
96-
// fullTrace._extremes = {};
97-
//
98-
// // we used to call ax.setScale during supplyDefaults, and this had a
99-
// // fallback to provide _categories and _categoriesMap. Now neither of
100-
// // those is true... anyway the right way to do this though is
101-
// // ax.clearCalc.
102-
// fullLayout.xaxis.clearCalc();
103-
// fullLayout.yaxis.clearCalc();
104-
//
105-
// var out = Image.calc(gd, fullTrace)[0];
106-
//
107-
// return out;
108-
// }
109-
// });
11081

11182
describe('image plot', function() {
11283
'use strict';
@@ -364,136 +335,3 @@ describe('image hover:', function() {
364335
});
365336
});
366337
});
367-
368-
// describe('image hover/click event data:', function() {
369-
// var gd;
370-
// var mock = require('@mocks/image_adventurer.json');
371-
//
372-
// beforeEach(function() {
373-
// gd = createGraphDiv();
374-
// });
375-
//
376-
// afterEach(destroyGraphDiv);
377-
//
378-
// function _makeWrapper(eventType, mouseFn) {
379-
// var posByElementType = {
380-
// node: [404, 302],
381-
// link: [450, 300]
382-
// };
383-
//
384-
// return function(elType) {
385-
// return new Promise(function(resolve, reject) {
386-
// gd.once(eventType, function(d) {
387-
// Lib.clearThrottle();
388-
// resolve(d);
389-
// });
390-
//
391-
// mouseFn(posByElementType[elType]);
392-
// setTimeout(function() {
393-
// reject(eventType + ' did not get called!');
394-
// }, 100);
395-
// });
396-
// };
397-
// }
398-
//
399-
// var _hover = _makeWrapper('plotly_hover', function(pos) {
400-
// mouseEvent('mouseover', pos[0], pos[1]);
401-
// });
402-
//
403-
// var _click = _makeWrapper('plotly_click', function(pos) {
404-
// mouseEvent('click', pos[0], pos[1]);
405-
// });
406-
//
407-
// var _unhover = _makeWrapper('plotly_unhover', function(pos) {
408-
// mouseEvent('mouseover', pos[0], pos[1]);
409-
// mouseEvent('mouseout', pos[0], pos[1]);
410-
// });
411-
//
412-
// function _assert(d, expectedPtData) {
413-
// expect(d.event).toBeDefined('original event reference');
414-
//
415-
// var ptData = d.points[0];
416-
// Object.keys(expectedPtData).forEach(function(k) {
417-
// expect(ptData[k]).toBe(expectedPtData[k], 'point data for ' + k);
418-
// });
419-
// }
420-
//
421-
// it('should output correct click event data', function(done) {
422-
// var fig = Lib.extendDeep({}, mock);
423-
//
424-
// Plotly.plot(gd, fig)
425-
// .then(function() { return _click('node'); })
426-
// .then(function(d) {
427-
// _assert(d, {
428-
// curveNumber: 0,
429-
// pointNumber: 4,
430-
// label: 'Solid'
431-
// });
432-
// })
433-
// .catch(failTest)
434-
// .then(done);
435-
// });
436-
//
437-
// it('should output correct hover/unhover event data', function(done) {
438-
// var fig = Lib.extendDeep({}, mock);
439-
//
440-
// Plotly.plot(gd, fig)
441-
// .then(function() { return Plotly.restyle(gd, 'hoverinfo', 'none'); })
442-
// .then(function() { return _hover('node'); })
443-
// .then(function(d) {
444-
// _assert(d, {
445-
// curveNumber: 0,
446-
// pointNumber: 4,
447-
// label: 'Solid',
448-
// value: 447.48
449-
// });
450-
// var pt = d.points[0];
451-
// expect(pt.sourceLinks.length).toBe(3);
452-
// expect(pt.targetLinks.length).toBe(4);
453-
// })
454-
// .then(function() { return _unhover('node'); })
455-
// .then(function(d) {
456-
// _assert(d, {
457-
// curveNumber: 0,
458-
// pointNumber: 4,
459-
// label: 'Solid'
460-
// });
461-
// })
462-
// .catch(failTest)
463-
// .then(done);
464-
// });
465-
//
466-
// function assertNoHoverEvents(type) {
467-
// return function() {
468-
// return Promise.resolve()
469-
// .then(function() { return _hover(type); })
470-
// .then(failTest).catch(function(err) {
471-
// expect(err).toBe('plotly_hover did not get called!');
472-
// })
473-
// .then(function() { return _unhover(type); })
474-
// .then(failTest).catch(function(err) {
475-
// expect(err).toBe('plotly_unhover did not get called!');
476-
// });
477-
// };
478-
// }
479-
//
480-
// it('should not output hover/unhover event data when hovermode is false', function(done) {
481-
// var fig = Lib.extendDeep({}, mock);
482-
//
483-
// Plotly.plot(gd, fig)
484-
// .then(function() { return Plotly.relayout(gd, 'hovermode', false); })
485-
// .then(assertNoHoverEvents('node'))
486-
// .catch(failTest)
487-
// .then(done);
488-
// });
489-
//
490-
// it('should not output hover/unhover event data when trace hoverinfo is skip', function(done) {
491-
// var fig = Lib.extendDeep({}, mock);
492-
//
493-
// Plotly.plot(gd, fig)
494-
// .then(function() { return Plotly.restyle(gd, 'hoverinfo', 'skip'); })
495-
// .then(assertNoHoverEvents('node'))
496-
// .catch(failTest)
497-
// .then(done);
498-
// });
499-
// });

0 commit comments

Comments
 (0)