Skip to content

Commit bff79dc

Browse files
committed
add jasmine test to lock down issue 4558
1 parent 118dc82 commit bff79dc

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/jasmine/tests/bar_test.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2600,6 +2600,26 @@ describe('bar hover', function() {
26002600
});
26012601
});
26022602
});
2603+
2604+
describe('gantt chart using milliseconds from base', function() {
2605+
beforeAll(function(done) {
2606+
gd = createGraphDiv();
2607+
2608+
var mock = Lib.extendDeep({}, require('@mocks/bar-with-milliseconds.json'));
2609+
2610+
Plotly.newPlot(gd, mock.data, mock.layout)
2611+
.catch(failTest)
2612+
.then(done);
2613+
});
2614+
2615+
it('should display the correct bar length passed in milliseconds from base', function() {
2616+
var out = _hover(gd, 0.5, 0.75, 'y');
2617+
2618+
var xEnd = out.style[2];
2619+
expect(xEnd).not.toBe(1580670000000);
2620+
expect(xEnd).toBe(1580688000000);
2621+
});
2622+
});
26032623
});
26042624

26052625
describe('Text templates on bar traces:', function() {

0 commit comments

Comments
 (0)