Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3cf9730

Browse filesBrowse files
committed
Update geo tests
1 parent 247f925 commit 3cf9730
Copy full SHA for 3cf9730

File tree

Expand file treeCollapse file tree

1 file changed

+15
-13
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+15
-13
lines changed

‎test/jasmine/tests/geo_test.js

Copy file name to clipboardExpand all lines: test/jasmine/tests/geo_test.js
+15-13Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var DBLCLICKDELAY = require('../../../src/plot_api/plot_config').dfltConfig.doub
2323
var HOVERMINTIME = require('../../../src/components/fx').constants.HOVERMINTIME;
2424

2525
// use local topojson files
26-
Plotly.setPlotConfig({ topojsonURL: '../../../dist/topojson' });
26+
Plotly.setPlotConfig({ topojsonURL: '/base/dist/topojson/' });
2727

2828
function move(fromX, fromY, toX, toY, delay) {
2929
return new Promise(function(resolve) {
@@ -1482,7 +1482,7 @@ describe('Test geo interactions', function() {
14821482
})
14831483
.then(function() {
14841484
check([179, -16.6], 1, 'spot on Fiji island that cross antimeridian west of antimeridian');
1485-
check([-179.9, -16.2], 1, 'spot on Fiji island that cross antimeridian east of antimeridian');
1485+
check([-179.9, -16.8], 1, 'spot on Fiji island that cross antimeridian east of antimeridian');
14861486

14871487
return Plotly.relayout(gd, {
14881488
'geo.center.lat': null,
@@ -1796,8 +1796,8 @@ describe('Test event property of interactions on a geo plot:', function() {
17961796
expect(pt.curveNumber).toEqual(0, 'points[0].curveNumber');
17971797
expect(typeof pt.data).toEqual(typeof {}, 'points[0].data');
17981798
expect(typeof pt.fullData).toEqual(typeof {}, 'points[0].fullData');
1799-
expect(pt.lat).toEqual(57.75, 'points[0].lat');
1800-
expect(pt.lon).toEqual(-101.57, 'points[0].lon');
1799+
expect(pt.lat).toEqual(57.72, 'points[0].lat');
1800+
expect(pt.lon).toEqual(-101.68, 'points[0].lon');
18011801
expect(pt.location).toEqual('CAN', 'points[0].location');
18021802
expect(pt.pointNumber).toEqual(0, 'points[0].pointNumber');
18031803
expect(pt.text).toEqual(20, 'points[0].text');
@@ -1900,8 +1900,8 @@ describe('Test event property of interactions on a geo plot:', function() {
19001900
expect(pt.curveNumber).toEqual(0, 'points[0].curveNumber');
19011901
expect(typeof pt.data).toEqual(typeof {}, 'points[0].data');
19021902
expect(typeof pt.fullData).toEqual(typeof {}, 'points[0].fullData');
1903-
expect(pt.lat).toEqual(57.75, 'points[0].lat');
1904-
expect(pt.lon).toEqual(-101.57, 'points[0].lon');
1903+
expect(pt.lat).toEqual(57.72, 'points[0].lat');
1904+
expect(pt.lon).toEqual(-101.68, 'points[0].lon');
19051905
expect(pt.location).toEqual('CAN', 'points[0].location');
19061906
expect(pt.pointNumber).toEqual(0, 'points[0].pointNumber');
19071907
expect(pt.text).toEqual(20, 'points[0].text');
@@ -1941,8 +1941,8 @@ describe('Test event property of interactions on a geo plot:', function() {
19411941
expect(pt.curveNumber).toEqual(0, 'points[0].curveNumber');
19421942
expect(typeof pt.data).toEqual(typeof {}, 'points[0].data');
19431943
expect(typeof pt.fullData).toEqual(typeof {}, 'points[0].fullData');
1944-
expect(pt.lat).toEqual(57.75, 'points[0].lat');
1945-
expect(pt.lon).toEqual(-101.57, 'points[0].lon');
1944+
expect(pt.lat).toEqual(57.72, 'points[0].lat');
1945+
expect(pt.lon).toEqual(-101.68, 'points[0].lon');
19461946
expect(pt.location).toEqual('CAN', 'points[0].location');
19471947
expect(pt.pointNumber).toEqual(0, 'points[0].pointNumber');
19481948
expect(pt.text).toEqual(20, 'points[0].text');
@@ -2624,7 +2624,8 @@ describe('Test geo zoom/pan/drag interactions:', function() {
26242624
_assert('after scroll', [
26252625
[-94.5, 35.0], 1.3
26262626
], [
2627-
[387.1, 245.9], 974.4
2627+
// TODO: Verify that this change is acceptable
2628+
[380.5, 245.9], 974.4
26282629
], [
26292630
'geo.center.lon', 'geo.center.lon', 'geo.projection.scale'
26302631
]);
@@ -2634,8 +2635,9 @@ describe('Test geo zoom/pan/drag interactions:', function() {
26342635
_assert('after some relayout call that causes a replot', [
26352636
[-94.5, 35.0], 1.3
26362637
], [
2638+
// TODO: Verify that this change is acceptable
26372639
// new center values are reflected in translate()
2638-
[387.1, 245.9], 974.4
2640+
[380.5, 245.9], 974.4
26392641
], [
26402642
'geo.showlakes'
26412643
]);
@@ -2757,11 +2759,11 @@ describe('Test geo interactions update marker angles:', function() {
27572759
})
27582760
.then(function() {
27592761
newPath = getPath();
2760-
expect(newPath).toEqual('M0,0L18.238949470790537,8.206139299448276L19.579067739888885,-4.081679364776507Z');
2762+
expect(newPath).toEqual('M0,0L18.22327727600463,8.240883770679762L19.586810955756498,-4.044358612123453Z');
27612763

27622764
expect(newPath).not.toEqual(initialPath);
2763-
expect(newPath).toEqual('M0,0L18.238949470790537,8.206139299448276L19.579067739888885,-4.081679364776507Z');
2764-
expect(initialPath).toEqual('M0,0L-1.5033314641545745,19.94341982983066L10.506227353572104,17.01820163222463Z');
2765+
expect(newPath).toEqual('M0,0L18.22327727600463,8.240883770679762L19.586810955756498,-4.044358612123453Z');
2766+
expect(initialPath).toEqual('M0,0L-1.5100144203478312,19.942914943667123L10.500523963798084,17.021721313830223Z');
27652767
})
27662768
.then(done, done.fail);
27672769
});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.