Skip to content

Commit b43cba4

Browse files
committed
pass TIMEOUT_INTERVAL to mapbox cases
- see jasmine/jasmine@68ba5b6
1 parent 51f873e commit b43cba4

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

test/jasmine/tests/mapbox_test.js

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ var customMatchers = require('../assets/custom_matchers');
1414
var MAPBOX_ACCESS_TOKEN = require('@build/credentials.json').MAPBOX_ACCESS_TOKEN;
1515
var TRANSITION_DELAY = 500;
1616
var MOUSE_DELAY = 100;
17+
var LONG_TIMEOUT_INTERVAL = 5 * jasmine.DEFAULT_TIMEOUT_INTERVAL;
1718

1819
var noop = function() {};
1920

@@ -204,7 +205,7 @@ describe('mapbox credentials', function() {
204205
lat: [10, 20, 30]
205206
}]);
206207
}).toThrow(new Error(constants.noAccessTokenErrorMsg));
207-
});
208+
}, LONG_TIMEOUT_INTERVAL);
208209

209210
it('should throw error if token is invalid', function(done) {
210211
var cnt = 0;
@@ -224,7 +225,7 @@ describe('mapbox credentials', function() {
224225
expect(cnt).toEqual(1);
225226
done();
226227
});
227-
});
228+
}, LONG_TIMEOUT_INTERVAL);
228229

229230
it('should use access token in mapbox layout options if present', function(done) {
230231
var cnt = 0;
@@ -246,7 +247,7 @@ describe('mapbox credentials', function() {
246247
expect(gd._fullLayout.mapbox.accesstoken).toEqual(MAPBOX_ACCESS_TOKEN);
247248
done();
248249
});
249-
});
250+
}, LONG_TIMEOUT_INTERVAL);
250251

251252
it('should bypass access token in mapbox layout options when config points to an Atlas server', function(done) {
252253
var cnt = 0;
@@ -274,7 +275,7 @@ describe('mapbox credentials', function() {
274275
expect(cnt).toEqual(1);
275276
done();
276277
});
277-
});
278+
}, LONG_TIMEOUT_INTERVAL);
278279
});
279280

280281
describe('mapbox plots', function() {
@@ -338,7 +339,7 @@ describe('mapbox plots', function() {
338339

339340
done();
340341
});
341-
});
342+
}, LONG_TIMEOUT_INTERVAL);
342343

343344
it('should be able to delete and add traces', function(done) {
344345
var modes = ['line', 'circle'];
@@ -379,7 +380,7 @@ describe('mapbox plots', function() {
379380

380381
done();
381382
});
382-
});
383+
}, LONG_TIMEOUT_INTERVAL);
383384

384385
it('should be able to restyle', function(done) {
385386
var restyleCnt = 0,
@@ -436,7 +437,7 @@ describe('mapbox plots', function() {
436437
]);
437438
})
438439
.then(done);
439-
});
440+
}, LONG_TIMEOUT_INTERVAL);
440441

441442
it('should be able to relayout', function(done) {
442443
var restyleCnt = 0,
@@ -506,7 +507,7 @@ describe('mapbox plots', function() {
506507

507508
done();
508509
});
509-
});
510+
}, LONG_TIMEOUT_INTERVAL);
510511

511512
it('should be able to add, update and remove layers', function(done) {
512513
var mockWithLayers = require('@mocks/mapbox_layers');
@@ -638,7 +639,7 @@ describe('mapbox plots', function() {
638639

639640
done();
640641
});
641-
});
642+
}, LONG_TIMEOUT_INTERVAL);
642643

643644
it('should be able to update the access token', function(done) {
644645
Plotly.relayout(gd, 'mapbox.accesstoken', 'wont-work').catch(function(err) {
@@ -652,7 +653,7 @@ describe('mapbox plots', function() {
652653
expect(gd._promises.length).toEqual(0);
653654
done();
654655
});
655-
});
656+
}, LONG_TIMEOUT_INTERVAL);
656657

657658
it('should be able to update traces', function(done) {
658659
function assertDataPts(lengths) {
@@ -690,7 +691,7 @@ describe('mapbox plots', function() {
690691

691692
done();
692693
});
693-
});
694+
}, LONG_TIMEOUT_INTERVAL);
694695

695696
it('should display to hover labels on mouse over', function(done) {
696697
function assertMouseMove(pos, len) {
@@ -704,7 +705,7 @@ describe('mapbox plots', function() {
704705
assertMouseMove(blankPos, 0).then(function() {
705706
return assertMouseMove(pointPos, 1);
706707
}).then(done);
707-
});
708+
}, LONG_TIMEOUT_INTERVAL);
708709

709710
it('should respond to hover interactions by', function(done) {
710711
var hoverCnt = 0,
@@ -752,7 +753,7 @@ describe('mapbox plots', function() {
752753

753754
done();
754755
});
755-
});
756+
}, LONG_TIMEOUT_INTERVAL);
756757

757758
it('should respond drag / scroll interactions', function(done) {
758759
var relayoutCnt = 0,
@@ -811,7 +812,7 @@ describe('mapbox plots', function() {
811812

812813
// TODO test scroll
813814

814-
});
815+
}, LONG_TIMEOUT_INTERVAL);
815816

816817
it('should respond to click interactions by', function(done) {
817818
var ptData;
@@ -844,7 +845,7 @@ describe('mapbox plots', function() {
844845
});
845846
})
846847
.then(done);
847-
});
848+
}, LONG_TIMEOUT_INTERVAL);
848849

849850
function getMapInfo(gd) {
850851
var subplot = gd._fullLayout.mapbox._subplot,

0 commit comments

Comments
 (0)