Skip to content

Commit b44e7fa

Browse files
committed
remove tests related to unhandled bugs in the previous d3-geo functions
1 parent b3b2ccd commit b44e7fa

File tree

1 file changed

+0
-102
lines changed

1 file changed

+0
-102
lines changed

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

-102
Original file line numberDiff line numberDiff line change
@@ -1354,47 +1354,6 @@ describe('Test geo interactions', function() {
13541354
.then(done);
13551355
});
13561356

1357-
it('should clear hover label when cursor slips off subplot', function(done) {
1358-
var gd = createGraphDiv();
1359-
var fig = Lib.extendDeep({}, require('@mocks/geo_orthographic.json'));
1360-
1361-
function _assert(msg, hoverLabelCnt) {
1362-
expect(d3.selectAll('g.hovertext').size())
1363-
.toBe(hoverLabelCnt, msg);
1364-
}
1365-
1366-
var px = 390;
1367-
var py = 290;
1368-
var cnt = 0;
1369-
1370-
Plotly.plot(gd, fig).then(function() {
1371-
gd.on('plotly_unhover', function() { cnt++; });
1372-
1373-
mouseEvent('mousemove', px, py);
1374-
_assert('base state', 1);
1375-
1376-
return new Promise(function(resolve) {
1377-
var interval = setInterval(function() {
1378-
px += 2;
1379-
mouseEvent('mousemove', px, py);
1380-
1381-
if(px < 402) {
1382-
_assert('- px ' + px, 1);
1383-
expect(cnt).toBe(0, 'no plotly_unhover event so far');
1384-
} else {
1385-
_assert('- px ' + px, 0);
1386-
expect(cnt).toBe(1, 'plotly_unhover event count');
1387-
1388-
clearInterval(interval);
1389-
resolve();
1390-
}
1391-
}, 100);
1392-
});
1393-
})
1394-
.catch(failTest)
1395-
.then(done);
1396-
});
1397-
13981357
it('should not confuse positions on either side of the globe', function(done) {
13991358
var gd = createGraphDiv();
14001359
var fig = Lib.extendDeep({}, require('@mocks/geo_orthographic.json'));
@@ -1424,67 +1383,6 @@ describe('Test geo interactions', function() {
14241383
.then(done);
14251384
});
14261385

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

0 commit comments

Comments
 (0)