Replace zoom test with multilayer one
This commit is contained in:
parent
2b9f2ee66c
commit
124133ceca
@ -90,4 +90,30 @@ describe('tests from old api translated to multilayer', function() {
|
||||
);
|
||||
});
|
||||
|
||||
// Zoom is a special variable
|
||||
it("Specifying zoom level in CartoCSS does not need a 'zoom' variable in SQL output", function(done){
|
||||
// NOTE: may fail if grainstore < 0.3.0 is used by Windshaft
|
||||
var sql = "SELECT 'SRID=3857;POINT(0 0)'::geometry as the_geom_webmercator, 1::int as cartodb_id";
|
||||
var cartocss = '#gadm4 [ zoom>=3] { marker-fill:red; }';
|
||||
|
||||
var layergroup = singleLayergroupConfig(sql, cartocss);
|
||||
|
||||
assert.response(server,
|
||||
{
|
||||
url: layergroupUrl,
|
||||
method: 'POST',
|
||||
headers: {host: 'localhost', 'Content-Type': 'application/json' },
|
||||
data: JSON.stringify(layergroup)
|
||||
},
|
||||
{
|
||||
status: 200
|
||||
},
|
||||
function(res) {
|
||||
var parsed = JSON.parse(res.body);
|
||||
assert.ok(parsed.layergroupid);
|
||||
done();
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -6,8 +6,7 @@ var step = require('step');
|
||||
|
||||
var helper = require(__dirname + '/../support/test_helper');
|
||||
|
||||
var IMAGE_EQUALS_TOLERANCE_PER_MIL = 20,
|
||||
IMAGE_EQUALS_ZERO_TOLERANCE_PER_MIL = 0;
|
||||
var IMAGE_EQUALS_TOLERANCE_PER_MIL = 20;
|
||||
|
||||
var CartodbWindshaft = require(__dirname + '/../../lib/cartodb/cartodb_windshaft');
|
||||
var serverOptions = require(__dirname + '/../../lib/cartodb/server_options')();
|
||||
@ -292,23 +291,6 @@ suite.skip('server old_api', function() {
|
||||
});
|
||||
}
|
||||
|
||||
// Zoom is a special variable
|
||||
test("Specifying zoom level in CartoCSS does not need a 'zoom' variable in SQL output", function(done){
|
||||
// NOTE: may fail if grainstore < 0.3.0 is used by Windshaft
|
||||
var query = querystring.stringify({
|
||||
sql: "SELECT 'SRID=3857;POINT(0 0)'::geometry as the_geom_webmercator, 1::int as cartodb_id",
|
||||
style: '#gadm4 [ zoom>=3] { marker-fill:red; }'
|
||||
});
|
||||
assert.response(server, {
|
||||
headers: {host: 'localhost'},
|
||||
url: '/tiles/gadm4/0/0/0.png?' + query,
|
||||
method: 'GET'
|
||||
},{}, function(res) {
|
||||
assert.equal(res.statusCode, 200, res.statusCode + ': ' + res.body);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
// See https://github.com/CartoDB/Windshaft-cartodb/issues/115
|
||||
test.skip("get'ing tile with not-strictly-valid style", function(done) {
|
||||
var style = querystring.stringify({style: '#test_table{line-color:black}}', style_version: '2.0.0'});
|
||||
|
Loading…
Reference in New Issue
Block a user