Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 935e4ac

Browse files
committed
add jasmine test
... for hover when out-of-range pts are present in *albers usa* map
1 parent 05e8194 commit 935e4ac

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

test/jasmine/tests/geo_test.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,9 +1150,22 @@ describe('Test geo interactions', function() {
11501150
done();
11511151
});
11521152
});
1153-
11541153
});
11551154
});
1155+
1156+
it('should not throw during hover when out-of-range pts are present in *albers usa* map', function(done) {
1157+
var gd = createGraphDiv();
1158+
var fig = Lib.extendDeep({}, require('@mocks/geo_scattergeo-out-of-usa.json'));
1159+
fig.layout.width = 700;
1160+
fig.layout.height = 500;
1161+
1162+
Plotly.plot(gd, fig).then(function() {
1163+
mouseEvent('mousemove', 350, 250);
1164+
expect(d3.selectAll('g.hovertext').size()).toEqual(1);
1165+
})
1166+
.catch(fail)
1167+
.then(done);
1168+
});
11561169
});
11571170

11581171

0 commit comments

Comments
 (0)