Skip to content

Commit

Permalink
Test update

Browse files Browse the repository at this point in the history
  • Loading branch information
felixpalmer committed Oct 1, 2024
1 parent 17350b4 commit cd1080c
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions test/modules/carto/api/parse-map.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1929,7 +1929,7 @@ test(`parseMap#visState HeatmapTileLayer`, async t => {
],
visConfig: {
filled: true,
radius: 2,
radius: 17.3,
opacity: 0.8,
stroked: false,
enable3d: false,
Expand All @@ -1939,7 +1939,7 @@ test(`parseMap#visState HeatmapTileLayer`, async t => {
colorRange: {
name: 'Global Warming',
type: 'sequential',
colors: ['#5A1846', '#900C3F', '#C70039', '#E3611C', '#F1920E', '#FFC300'],
colors: ['#ff0000', '#00ff00', '#0000ff', '#fc8d59', '#e34a33', '#b30000'],
category: 'Uber'
},
heightRange: [0, 500],
Expand Down Expand Up @@ -1968,7 +1968,8 @@ test(`parseMap#visState HeatmapTileLayer`, async t => {
radiusField: null,
radiusScale: 'linear',
strokeColorField: null,
strokeColorScale: 'quantile'
strokeColorScale: 'quantile',
weightField: {name: 'ride_count', type: 'integer'}
}
}
],
Expand Down Expand Up @@ -2015,11 +2016,20 @@ test(`parseMap#visState HeatmapTileLayer`, async t => {
t.equal(heatmapTileLayer.props.visible, true, 'heatmapTileLayer - visible');
t.equal(heatmapTileLayer.props.filled, true, 'heatmapTileLayer - filled');
t.equal(heatmapTileLayer.props.stroked, false, 'heatmapTileLayer - stroked');
t.equal(heatmapTileLayer.props.radiusPixels, 17.3, 'heatmapTileLayer - radiusPixels');
t.deepEqual(
heatmapTileLayer.props.getFillColor,
[246, 209, 138, 230],
'heatmapTileLayer - getFillColor'
heatmapTileLayer.props.colorRange,
[
[255, 0, 0, 255],
[0, 255, 0, 255],
[0, 0, 255, 255],
[252, 141, 89, 255],
[227, 74, 51, 255],
[179, 0, 0, 255]
],
'heatmapTileLayer - colorRange'
);
t.equal(typeof heatmapTileLayer.props.getWeight, 'function', 'heatmapTileLayer - getWeight');
t.equal((heatmapTileLayer.props as any).cartoLabel, 'Layer 2', 'heatmapTileLayer - cartoLabel');
t.end();
});
Expand Down

0 comments on commit cd1080c

Please sign in to comment.