Skip to content

Commit 59900dc

Browse files
committed
remove tests related to unhandled bugs in the previous d3-geo functions
1 parent ba66787 commit 59900dc

File tree

1 file changed

+0
-100
lines changed

1 file changed

+0
-100
lines changed

Diff for: test/jasmine/tests/geo_test.js

-100
Original file line numberDiff line numberDiff line change
@@ -1349,46 +1349,6 @@ describe('Test geo interactions', function() {
13491349
.then(done, done.fail);
13501350
});
13511351

1352-
it('should clear hover label when cursor slips off subplot', function(done) {
1353-
var gd = createGraphDiv();
1354-
var fig = Lib.extendDeep({}, require('@mocks/geo_orthographic.json'));
1355-
1356-
function _assert(msg, hoverLabelCnt) {
1357-
expect(d3.selectAll('g.hovertext').size())
1358-
.toBe(hoverLabelCnt, msg);
1359-
}
1360-
1361-
var px = 390;
1362-
var py = 290;
1363-
var cnt = 0;
1364-
1365-
Plotly.newPlot(gd, fig).then(function() {
1366-
gd.on('plotly_unhover', function() { cnt++; });
1367-
1368-
mouseEvent('mousemove', px, py);
1369-
_assert('base state', 1);
1370-
1371-
return new Promise(function(resolve) {
1372-
var interval = setInterval(function() {
1373-
px += 2;
1374-
mouseEvent('mousemove', px, py);
1375-
1376-
if(px < 402) {
1377-
_assert('- px ' + px, 1);
1378-
expect(cnt).toBe(0, 'no plotly_unhover event so far');
1379-
} else {
1380-
_assert('- px ' + px, 0);
1381-
expect(cnt).toBe(1, 'plotly_unhover event count');
1382-
1383-
clearInterval(interval);
1384-
resolve();
1385-
}
1386-
}, 100);
1387-
});
1388-
})
1389-
.then(done, done.fail);
1390-
});
1391-
13921352
it('should not confuse positions on either side of the globe', function(done) {
13931353
var gd = createGraphDiv();
13941354
var fig = Lib.extendDeep({}, require('@mocks/geo_orthographic.json'));
@@ -1417,66 +1377,6 @@ describe('Test geo interactions', function() {
14171377
.then(done, done.fail);
14181378
});
14191379

1420-
it('should plot to scope defaults when user setting lead to NaN map bounds', function(done) {
1421-
var gd = createGraphDiv();
1422-
1423-
spyOn(Lib, 'warn');
1424-
1425-
Plotly.newPlot(gd, [{
1426-
type: 'scattergeo',
1427-
lon: [0],
1428-
lat: [0]
1429-
}], {
1430-
geo: {
1431-
projection: {
1432-
type: 'kavrayskiy7',
1433-
rotation: {
1434-
lat: 38.794799,
1435-
lon: -81.622334,
1436-
}
1437-
},
1438-
center: {
1439-
lat: -81
1440-
},
1441-
lataxis: {
1442-
range: [38.794799, 45.122292]
1443-
},
1444-
lonaxis: {
1445-
range: [-82.904731, -81.622334]
1446-
}
1447-
},
1448-
width: 700,
1449-
heigth: 500
1450-
})
1451-
.then(function() {
1452-
var geoLayout = gd._fullLayout.geo;
1453-
var geo = geoLayout._subplot;
1454-
1455-
expect(geoLayout.projection.rotation).toEqual({
1456-
lon: 0, lat: 0, roll: 0,
1457-
});
1458-
expect(geoLayout.center).toEqual({
1459-
lon: 0, lat: 0
1460-
});
1461-
expect(geoLayout.lonaxis.range).toEqual([-180, 180]);
1462-
expect(geoLayout.lataxis.range).toEqual([-90, 90]);
1463-
1464-
expect(geo.viewInitial).toEqual({
1465-
'fitbounds': false,
1466-
'projection.rotation.lon': 0,
1467-
'center.lon': 0,
1468-
'center.lat': 0,
1469-
'projection.scale': 1
1470-
});
1471-
1472-
expect(Lib.warn).toHaveBeenCalledTimes(1);
1473-
expect(Lib.warn).toHaveBeenCalledWith(
1474-
'Invalid geo settings, relayout\'ing to default view.'
1475-
);
1476-
})
1477-
.then(done, done.fail);
1478-
});
1479-
14801380
it('should get hover right for choropleths involving landmasses that cross antimeridian', function(done) {
14811381
var gd = createGraphDiv();
14821382

0 commit comments

Comments
 (0)