Skip to content

Commit c36de72

Browse files
committed
test: add tolerance in annotation autorange case
1 parent 5e62c08 commit c36de72

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/jasmine/tests/annotations_test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,14 @@ describe('annotations autosize', function() {
138138
var fullLayout = gd._fullLayout;
139139
var PREC = 1;
140140

141+
// xaxis2 need a bit more tolerance to pass on CI
142+
// this most likely due to the different text bounding box values
143+
// on headfull vs headless browsers.
144+
var PREC2 = 0.1;
145+
141146
expect(fullLayout.xaxis.range).toBeCloseToArray(x, PREC, '- xaxis');
142147
expect(fullLayout.yaxis.range).toBeCloseToArray(y, PREC, '- yaxis');
143-
expect(fullLayout.xaxis2.range).toBeCloseToArray(x2, PREC, 'xaxis2');
148+
expect(fullLayout.xaxis2.range).toBeCloseToArray(x2, PREC2, 'xaxis2');
144149
expect(fullLayout.yaxis2.range).toBeCloseToArray(y2, PREC, 'yaxis2');
145150
expect(fullLayout.xaxis3.range).toBeCloseToArray(x3, PREC, 'xaxis3');
146151
expect(fullLayout.yaxis3.range).toBeCloseToArray(y3, PREC, 'yaxis3');

0 commit comments

Comments
 (0)