You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Windshaft-cartodb/test/acceptance/layers-filters-test.js

56 lines
1.4 KiB

'use strict';
require('../support/test-helper');
var TestClient = require('../support/test-client');
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
}
]
};
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);
});
});
});