From 8cddfa0d2264b4244d14fc1f0a71c43d235e613c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Tue, 11 Aug 2020 16:14:39 +0200 Subject: [PATCH] Refactor tests --- test/spec/ol/format/wfs.test.js | 132 ++++++++++++++++---------------- 1 file changed, 64 insertions(+), 68 deletions(-) diff --git a/test/spec/ol/format/wfs.test.js b/test/spec/ol/format/wfs.test.js index fc589fc833..59a33946d8 100644 --- a/test/spec/ol/format/wfs.test.js +++ b/test/spec/ol/format/wfs.test.js @@ -1387,20 +1387,28 @@ describe('ol.format.WFS', function () { }); describe('WFS 2.0.0', function () { - const geometryXml = ` - - - - - 590431 4915204 590430 - 4915205 590429 4915204 590430 - 4915203 590431 4915204 - - - - `.trim(); + before(function (done) { + proj4.defs( + 'http://www.opengis.net/def/crs/EPSG/0/26713', + '+proj=utm +zone=13 +ellps=clrk66 +datum=NAD27 +units=m +no_defs' + ); + proj4.defs( + 'urn:ogc:def:crs:EPSG::26713', + '+proj=utm +zone=13 +ellps=clrk66 +datum=NAD27 +units=m +no_defs' + ); + register(proj4); + done(); + }); - const getFeatureSimpleXml = ` + after(function () { + delete proj4.defs['http://www.opengis.net/def/crs/EPSG/0/26713']; + delete proj4.defs['urn:ogc:def:crs:EPSG::26713']; + clearAllProjections(); + addCommon(); + }); + + it('can writeGetFeature query with simple resourceId filter', function () { + const getFeatureXml = ` + 590431 4915204 590430 + 4915205 590429 4915204 590430 + 4915203 590431 4915204 + + + + `.trim(); + const getFeatureXml = `