Skip to content

Commit 0116b21

Browse files
committed
add addition to scrollZoom test
1 parent 1308cbe commit 0116b21

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/jasmine/tests/mapbox_test.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,9 @@ describe('mapbox plots', function() {
11531153
.then(done, done.fail);
11541154
}, LONG_TIMEOUT_INTERVAL);
11551155

1156-
it('@noCI @gl should respect scrollZoom config option', function(done) {
1156+
fit('@noCI @gl should respect scrollZoom config option', function(done) {
1157+
var mockCopy2 = Lib.extendDeep({}, mock);
1158+
mockCopy2.config = {scrollZoom: false};
11571159
var relayoutCnt = 0;
11581160
var addOnGd = function() {
11591161
gd.on('plotly_relayout', function() { relayoutCnt++; });
@@ -1170,6 +1172,7 @@ describe('mapbox plots', function() {
11701172

11711173
var zoom = getMapInfo(gd).zoom;
11721174
expect(zoom).toBeCloseTo(1.234);
1175+
var zoom0 = zoom;
11731176

11741177
addOnGd();
11751178

@@ -1199,6 +1202,14 @@ describe('mapbox plots', function() {
11991202
var zoomNew = getMapInfo(gd).zoom;
12001203
expect(zoomNew).toBeGreaterThan(zoom);
12011204
})
1205+
.then(function() { return Plotly.newPlot(gd, mockCopy2); })
1206+
.then(addOnGd)
1207+
.then(_scroll)
1208+
.then(function() {
1209+
// see https://github.com/plotly/plotly.js/issues/3738
1210+
var zoomNew = getMapInfo(gd).zoom;
1211+
expect(zoomNew).toBe(zoom0);
1212+
})
12021213
.then(done, done.fail);
12031214
}, LONG_TIMEOUT_INTERVAL);
12041215

0 commit comments

Comments
 (0)