Skip to content

Commit bb296e9

Browse files
committed
linter fix
1 parent 643479f commit bb296e9

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

test/jasmine/tests/tooltip_annotation_test.js

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ var modeBarButtons = require('../../../src/components/modebar/buttons');
1414

1515
var createGraphDiv = require('../assets/create_graph_div');
1616
var destroyGraphDiv = require('../assets/destroy_graph_div');
17-
var mouseEvent = require('../assets/mouse_event');
18-
var click = require('../assets/click');
17+
// var mouseEvent = require('../assets/mouse_event');
18+
// var click = require('../assets/click');
1919
// var delay = require('../assets/delay');
2020
// var doubleClick = require('../assets/double_click');
2121

@@ -42,10 +42,10 @@ describe('Tooltip interactions', function() {
4242
console.log('Creating graph div and initializing plot...');
4343
gd = createGraphDiv();
4444
Plotly.newPlot(gd, tooltipHeatmapMock.data, tooltipHeatmapMock.layout, tooltipHeatmapMock.config)
45-
.then(() => {
45+
.then(function() {
4646
console.log('Plot initialized.');
4747
done();
48-
}).catch(error => {
48+
}).catch(function(error) {
4949
console.error('Error initializing plot:', error);
5050
});
5151
});
@@ -58,7 +58,7 @@ describe('Tooltip interactions', function() {
5858
it('should enable tooltip on button click', function(done) {
5959
console.log('Enabling tooltip...');
6060
modeBarButtons.tooltip.click(gd);
61-
setTimeout(() => {
61+
setTimeout(function() {
6262
console.log('Checking if tooltip has been enabled...');
6363
expect(gd._fullLayout._tooltipEnabled).toBe('on');
6464
expect(gd._tooltipClickHandler).toBeDefined();
@@ -71,8 +71,8 @@ describe('Tooltip interactions', function() {
7171
console.log('Simulating plot click for tooltip...');
7272
gd.emit('plotly_click', {
7373
points: [{
74-
x: 3,
75-
y: 4.5,
74+
x: 3,
75+
y: 4.5,
7676
z: 0.9677474816893965,
7777
curveNumber: 0,
7878
pointNumber: [9, 6],
@@ -81,7 +81,7 @@ describe('Tooltip interactions', function() {
8181
}]
8282
});
8383

84-
setTimeout(() => {
84+
setTimeout(function() {
8585
console.log('Checking if annotation has been created...');
8686
expect(gd._fullLayout.annotations.length).toBe(1);
8787
var expectedText = 'x: 3.00,<br>y: 4.50,<br>z: 0.968';
@@ -95,9 +95,9 @@ describe('Tooltip interactions', function() {
9595
console.log('Simulating user clearing annotation text...');
9696
// Find the specific DOM element or use Plotly's API to simulate the text being cleared
9797
gd._fullLayout.annotations[0].text = ''; // Directly setting it for simulation purposes
98-
Plotly.relayout(gd, { 'annotations[0].text': '' }) // Simulate relayout command that might be triggered by UI interaction
98+
Plotly.relayout(gd, { 'annotations[0].text': '' }); // Simulate relayout command that might be triggered by UI interaction
9999

100-
setTimeout(() => {
100+
setTimeout(function() {
101101
console.log('Checking if annotation has been removed...');
102102
expect(gd._fullLayout.annotations.length).toBe(0);
103103
console.log('Annotation successfully removed.');
@@ -108,7 +108,7 @@ describe('Tooltip interactions', function() {
108108
it('should deactivate tooltip on button click and stop creating tooltips', function(done) {
109109
console.log('Deactivating tooltip...');
110110
modeBarButtons.tooltip.click(gd);
111-
setTimeout(() => {
111+
setTimeout(function() {
112112
expect(gd._fullLayout._tooltipEnabled).toBe('off');
113113
console.log('Tooltip is deactivated:', gd._fullLayout._tooltipEnabled);
114114

@@ -125,7 +125,7 @@ describe('Tooltip interactions', function() {
125125
}]
126126
});
127127

128-
setTimeout(() => {
128+
setTimeout(function() {
129129
// Check that no new annotations were added
130130
expect(gd._fullLayout.annotations.length).toBe(0);
131131
console.log('No new annotations created.');
@@ -134,5 +134,3 @@ describe('Tooltip interactions', function() {
134134
}, 100);
135135
});
136136
});
137-
138-

0 commit comments

Comments
 (0)