Windshaft-cartodb/test/acceptance/layers-filters-test.js

56 lines
1.4 KiB
JavaScript
Raw Normal View History

'use strict';
require('../support/test-helper');
var TestClient = require('../support/test-client');
2019-10-22 01:07:24 +08:00
describe('layers filters', function () {
const type = 'mapnik';
const sql = 'select * from populated_places_simple_reduced';
const cartocss = `#points {
marker-fill-opacity: 1.0;
marker-line-color: #FFF;
marker-line-width: 0.5;
marker-line-opacity: 1.0;
marker-placement: point;
marker-type: ellipse;
marker-width: 8;
marker-fill: red;
marker-allow-overlap: true;
}`;
const cartocssVersion = '3.0.12';
const options = {
sql,
cartocss,
cartocss_version: cartocssVersion
};
const mapConfig = {
version: '1.6.0',
layers: [
{
type,
id: 'layerA',
options
},
{
type,
id: 'layerB',
options
}
]
};
2019-10-22 01:07:24 +08:00
afterEach(function (done) {
if (this.testClient) {
this.testClient.drain(done);
}
});
['layerA', 'layerB'].forEach(layer => {
it(`should work for individual layer ids: ${layer}`, function (done) {
this.testClient = new TestClient(mapConfig);
this.testClient.getTile(0, 0, 0, { layers: layer }, done);
});
});
});