From 04da57fe0cfc7b566a0315edd1c514a9499751de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Mon, 31 Jul 2017 18:14:32 +0200 Subject: [PATCH] Do not create layergroup if it is already provided --- test/support/test-client.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/support/test-client.js b/test/support/test-client.js index 8b6ab3e8..34d04200 100644 --- a/test/support/test-client.js +++ b/test/support/test-client.js @@ -471,6 +471,11 @@ TestClient.prototype.getTile = function(z, x, y, params, callback) { } var layergroupId; + + if (params.layergroupid) { + layergroupId = params.layergroupid + } + step( function createTemplate () { var next = this; @@ -512,6 +517,10 @@ TestClient.prototype.getTile = function(z, x, y, params, callback) { function createLayergroup(err, templateId) { var next = this; + if (layergroupId) { + return next(null, layergroupId); + } + var data = templateId ? params.placeholders : self.mapConfig var path = templateId ? urlNamed + '/' + templateId + '?' + qs.stringify({api_key: self.apiKey}) :