Skip to content

Commit 709b058

Browse files
committed
Add test for log hover
1 parent 26f9099 commit 709b058

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/jasmine/tests/hover_label_test.js

+20
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,26 @@ describe('hover info', function() {
199199
});
200200
});
201201

202+
describe('hover info y on log axis', function() {
203+
var mockCopy = Lib.extendDeep({}, mock);
204+
205+
mockCopy.data[0].hoverinfo = 'y';
206+
207+
beforeEach(function(done) {
208+
for(var i = 0; i < mockCopy.data[0].y.length; i++) {
209+
mockCopy.data[0].y[i] *= 1e9;
210+
}
211+
212+
Plotly.plot(createGraphDiv(), mockCopy.data, mockCopy.layout).then(done);
213+
});
214+
215+
it('responds to hover y+text', function() {
216+
Fx.hover('graph', evt, 'xy');
217+
218+
expect(d3.selectAll('g.hovertext').selectAll('text.nums').node().innerHTML).toEqual('1e+9');
219+
});
220+
});
221+
202222
describe('hover info y+text', function() {
203223
var mockCopy = Lib.extendDeep({}, mock);
204224

0 commit comments

Comments
 (0)