Skip to content

Commit

Permalink
Add GetFeature test with array layer
Browse files Browse the repository at this point in the history
Also added the missing response xmls (forgot to add them
in previous commits)
  • Loading branch information
tudorbarascu committed Apr 11, 2018
1 parent aae8ce3 commit 27b4170
Show file tree
Hide file tree
Showing 5 changed files with 720 additions and 336 deletions.
16 changes: 16 additions & 0 deletions tests/src/python/test_qgsserver_wms_getfeatureinfo.py
Expand Up @@ -197,6 +197,22 @@ def testGetFeatureInfo(self):
# 'wms_getfeatureinfo-values1-text-xml',
# 'test_project_values.qgs')

# Test GetFeatureInfo on "value relation" widget with array field (multiple selections)
# TODO make GetFeatureInfo show the dictionary values and enable test
# mypath = self.testdata_path + "test_project_values.qgs"
# self.wms_request_compare('GetFeatureInfo',
# '&layers=layer3&styles=&' +
# 'VERSION=1.3.0&' +
# 'info_format=text%2Fxml&' +
# 'width=926&height=787&srs=EPSG%3A4326' +
# '&bbox=912217,5605059,914099,5606652' +
# '&CRS=EPSG:3857' +
# '&FEATURE_COUNT=10' +
# '&WITH_GEOMETRY=True' +
# '&QUERY_LAYERS=layer3&I=487&J=308',
# 'wms_getfeatureinfo-values3-text-xml',
# 'test_project_values.qgs')

# Test GetFeatureInfo resolves "relation reference" widget "display expression" values
# TODO make GetFeatureInfo show what's in the display expression and enable test
# mypath = self.testdata_path + "test_project_values.qgs"
Expand Down
8 changes: 8 additions & 0 deletions tests/testdata/provider/testdata_pg.sql
Expand Up @@ -76,6 +76,14 @@ INSERT INTO qgis_test."some_poly_data" (pk, geom) VALUES
(4, NULL)
;


CREATE TABLE qgis_test.array_tbl (id serial PRIMARY KEY, location int[], geom geometry(Point,3857));

INSERT INTO qgis_test.array_tbl (location, geom) VALUES ('{1, 2, 3}', 'srid=3857;Point(913209.0358 5606025.2373)'::geometry);
INSERT INTO qgis_test.array_tbl (location, geom) VALUES ('{}', 'srid=3857;Point(913214.6741 5606017.8743)'::geometry);
INSERT INTO qgis_test.array_tbl (geom) VALUES ('srid=3857;Point(913204.9128 5606011.4565)'::geometry);


-- Provider check with compound key

CREATE TABLE qgis_test."someDataCompound" (
Expand Down

0 comments on commit 27b4170

Please sign in to comment.