Skip to content

Commit 258998a

Browse files
committed
update expectations due to Carto style
1 parent 3cf4f9d commit 258998a

File tree

1 file changed

+31
-26
lines changed

1 file changed

+31
-26
lines changed

test/jasmine/tests/mapbox_test.js

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -533,12 +533,12 @@ describe('mapbox plots', function() {
533533
.then(done, done.fail);
534534
}, LONG_TIMEOUT_INTERVAL);
535535

536+
// TODO: mockWithLayers.layout.mapbox.layers array only has 1 entry
536537
xit('@gl should be able to add, update and remove layers', function(done) {
537538
var mockWithLayers = require('../../image/mocks/mapbox_layers');
538539

539540
var layer0 = Lib.extendDeep({}, mockWithLayers.layout.mapbox.layers[0]);
540541

541-
// mockWithLayers.layout.mapbox.layers array only has 1 entry
542542
var layer1 = Lib.extendDeep({}, mockWithLayers.layout.mapbox.layers[1]);
543543

544544
var mapUpdate = {
@@ -1123,7 +1123,7 @@ describe('mapbox plots', function() {
11231123
})
11241124
.then(function() {
11251125
expect(relayoutCnt).toBe(3, 'relayout cnt');
1126-
expect(relayoutingCnt).toBeCloseTo(10, -1, 'relayouting cnt');
1126+
expect(relayoutingCnt).toBeCloseTo(21, -1, 'relayouting cnt');
11271127
expect(doubleClickCnt).toBe(1, 'double click cnt');
11281128
expect(getMapInfo(gd).zoom).toBeGreaterThan(1.234);
11291129
})
@@ -1579,80 +1579,85 @@ describe('test mapbox trace/layout *below* interactions', function() {
15791579
mapbox: {
15801580
style: 'basic',
15811581
layers: [{
1582-
sourcetype: 'vector',
1583-
source: 'insert-terrain-source',
1584-
sourcelayer: 'contour',
1585-
type: 'line'
1582+
"source": {
1583+
"name": "LIMADMIN",
1584+
"type": "FeatureCollection",
1585+
"features": []
1586+
},
1587+
"type": "fill",
1588+
"below": "water",
1589+
"color": "#ece2f0",
1590+
"opacity": 0.8
15861591
}]
15871592
}
15881593
})
15891594
.then(function() {
15901595
_assert('default *below*', {
1591-
trace: [20, 21, 22, 23],
1592-
layout: 24
1596+
trace: [94, 95, 96, 97],
1597+
layout: 9
15931598
});
15941599
})
15951600
.then(function() { return Plotly.relayout(gd, 'mapbox.layers[0].below', 'traces'); })
15961601
.then(function() {
15971602
_assert('with layout layer *below:traces*', {
1598-
trace: [21, 22, 23, 24],
1599-
layout: 20
1603+
trace: [94, 95, 96, 97],
1604+
layout: 93
16001605
});
16011606
})
16021607
.then(function() { return Plotly.relayout(gd, 'mapbox.layers[0].below', null); })
16031608
.then(function() {
16041609
_assert('back to default *below* (1)', {
1605-
trace: [20, 21, 22, 23],
1606-
layout: 24
1610+
trace: [93, 94, 95, 96],
1611+
layout: 97
16071612
});
16081613
})
16091614
.then(function() { return Plotly.restyle(gd, 'below', ''); })
16101615
.then(function() {
16111616
_assert('with trace *below:""*', {
1612-
trace: [21, 22, 23, 24],
1613-
layout: 20
1617+
trace: [94, 95, 96, 97],
1618+
layout: 93
16141619
});
16151620
})
16161621
.then(function() { return Plotly.restyle(gd, 'below', null); })
16171622
.then(function() {
16181623
_assert('back to default *below* (2)', {
1619-
trace: [20, 21, 22, 23],
1620-
layout: 24
1624+
trace: [93, 94, 95, 96],
1625+
layout: 97
16211626
});
16221627
})
16231628
.then(function() { return Plotly.restyle(gd, 'below', 'water'); })
16241629
.then(function() {
16251630
_assert('with trace *below:water*', {
1626-
trace: [4, 5, 6, 7],
1627-
layout: 24
1631+
trace: [9, 10, 11, 12],
1632+
layout: 97
16281633
});
16291634
})
16301635
.then(function() { return Plotly.relayout(gd, 'mapbox.layers[0].below', 'water'); })
16311636
.then(function() {
16321637
_assert('with trace AND layout layer *below:water*', {
1633-
trace: [4, 5, 6, 7],
1634-
layout: 8
1638+
trace: [9, 10, 11, 12],
1639+
layout: 13
16351640
});
16361641
})
16371642
.then(function() { return Plotly.relayout(gd, 'mapbox.layers[0].below', ''); })
16381643
.then(function() {
16391644
_assert('with trace *below:water* and layout layer *below:""*', {
1640-
trace: [4, 5, 6, 7],
1641-
layout: 24
1645+
trace: [9, 10, 11, 12],
1646+
layout: 97
16421647
});
16431648
})
16441649
.then(function() { return Plotly.restyle(gd, 'below', ''); })
16451650
.then(function() {
16461651
_assert('with trace AND layout layer *below:water*', {
1647-
trace: [20, 21, 22, 23],
1648-
layout: 24
1652+
trace: [93, 94, 95, 96],
1653+
layout: 97
16491654
});
16501655
})
16511656
.then(function() { return Plotly.update(gd, {below: null}, {'mapbox.layers[0].below': null}); })
16521657
.then(function() {
16531658
_assert('back to default *below* (3)', {
1654-
trace: [20, 21, 22, 23],
1655-
layout: 24
1659+
trace: [93, 94, 95, 96],
1660+
layout: 97
16561661
});
16571662
})
16581663
.then(done, done.fail);

0 commit comments

Comments
 (0)