Skip to content

Commit 6df61e0

Browse files
committed
loosen template default item interaction tests to pass on CI
1 parent aed44dc commit 6df61e0

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

test/jasmine/tests/template_test.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,8 @@ describe('template interactions', function() {
170170

171171
if(schooly) {
172172
var schoolItem = gd.layout.annotations[layoutCount - 1];
173-
expect(schoolItem).toEqual(jasmine.objectContaining({
174-
templateitemname: 'warning2',
175-
x: 1
176-
}));
173+
expect(schoolItem.templateitemname).toBe('warning2');
174+
expect(schoolItem.x).toBeWithin(1, 0.001);
177175
expect(schoolItem.y).toBeWithin(schooly, 0.001);
178176
}
179177

@@ -208,11 +206,11 @@ describe('template interactions', function() {
208206

209207
if(recty0) {
210208
var rectItem = gd.layout.shapes[layoutCount - 1];
211-
expect(rectItem).toEqual(jasmine.objectContaining({
212-
templateitemname: 'outline',
213-
x0: -0.15, x1: 1.2, y1: 1.1
214-
}));
209+
expect(rectItem.templateitemname).toBe('outline');
210+
expect(rectItem.x0).toBeWithin(-0.15, 0.001);
215211
expect(rectItem.y0).toBeWithin(recty0, 0.001);
212+
expect(rectItem.x1).toBeWithin(1.2, 0.001);
213+
expect(rectItem.y1).toBeWithin(1.1, 0.001);
216214
}
217215

218216
return rectElement;

0 commit comments

Comments
 (0)