Skip to content

Commit 6a43af4

Browse files
committedSep 2, 2022
Make test more flexible for CircleCI
1 parent 0effd0f commit 6a43af4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎test/jasmine/tests/plots_test.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1346,11 +1346,17 @@ describe('Test Plots with automargin and minreducedwidth/height', function() {
13461346
expect(xy.getAttribute(attr)).toEqual(exp);
13471347
}
13481348

1349+
function assert_close(attr, exp) {
1350+
var xy = d3Select('rect.nsewdrag')[0][0];
1351+
expect(xy.getAttribute(attr)).toBeCloseTo(exp, -1);
1352+
}
1353+
13491354
var fig = require('@mocks/z-automargin-minreducedheight.json');
13501355

13511356
Plotly.newPlot(gd, fig)
13521357
.then(function() {
1353-
assert('height', '55');
1358+
assert_close('height', '55');
1359+
13541360
})
13551361
.then(function() {
13561362
return Plotly.relayout(gd, 'margin.minreducedheight', 100);

0 commit comments

Comments
 (0)
Please sign in to comment.