server test for using getfeatureinfo drag&drop designer order

update project
This commit is contained in:
Tudor Bărăscu 2022-02-28 17:39:50 +02:00
parent 43e25e81a2
commit c379e08d1e
4 changed files with 77 additions and 0 deletions

View File

@ -255,6 +255,24 @@ class TestQgsServerWMSGetFeatureInfo(TestQgsServerWMSTestBase):
'wms_getfeatureinfo-values2-text-xml',
'test_project_values.qgz')
def testGetFeatureInfoSortedByDesigner(self):
"""Test GetFeatureInfo resolves DRAG&DROP Designer order when use attribute form settings for GetFeatureInfo
is checked, see https://github.com/qgis/QGIS/pull/41031
"""
mypath = self.testdata_path + "test_project_values.qgz"
self.wms_request_compare('GetFeatureInfo',
'&layers=layer2&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-values5-text-xml',
'test_project_values.qgz')
def testGetFeatureInfoFilterGPKG(self):
# 'test_project.qgz' ='test_project.qgs' but with a gpkg source + different fid
# Regression for #8656 Test getfeatureinfo response xml with gpkg datasource

View File

@ -0,0 +1,31 @@
*****
Content-Type: text/xml; charset=utf-8
<GetFeatureInfoResponse>
<Layer name="layer4">
<Feature id="1">
<Attribute value="one èé" name="utf8nameè"/>
<Attribute value="Id no. 1 value" name="j_value_id"/>
<Attribute value="Id no. 1 value" name="id"/>
<Attribute value="one_value" name="name"/>
<BoundingBox maxy="5606025.2373" maxx="913209.0358" miny="5606025.2373" CRS="EPSG:3857" minx="913209.0358"/>
<Attribute type="derived" value="Point (913209.0358 5606025.2373)" name="geometry"/>
</Feature>
<Feature id="2">
<Attribute value="two àò" name="utf8nameè"/>
<Attribute value="Id no. 2 value" name="j_value_id"/>
<Attribute value="Id no. 2 value" name="id"/>
<Attribute value="two_val" name="name"/>
<BoundingBox maxy="5606017.8743" maxx="913214.6741" miny="5606017.8743" CRS="EPSG:3857" minx="913214.6741"/>
<Attribute type="derived" value="Point (913214.6741 5606017.8743)" name="geometry"/>
</Feature>
<Feature id="3">
<Attribute value="three èé↓" name="utf8nameè"/>
<Attribute value="Id número 3 value" name="j_value_id"/>
<Attribute value="Id número 3 value" name="id"/>
<Attribute value="three_val" name="name"/>
<BoundingBox maxy="5606011.4565" maxx="913204.9128" miny="5606011.4565" CRS="EPSG:3857" minx="913204.9128"/>
<Attribute type="derived" value="Point (913204.9128 5606011.4565)" name="geometry"/>
</Feature>
</Layer>
</GetFeatureInfoResponse>

View File

@ -0,0 +1,28 @@
*****
Content-Type: text/xml; charset=utf-8
<GetFeatureInfoResponse>
<Layer name="layer3">
<Feature id="1">
<Attribute value="one èé" name="utf8nameè"/>
<Attribute value="Id no. 1 value" name="id"/>
<Attribute value="one_value" name="name"/>
<BoundingBox maxy="5606025.2373" maxx="913209.0358" miny="5606025.2373" CRS="EPSG:3857" minx="913209.0358"/>
<Attribute type="derived" value="Point (913209.0358 5606025.2373)" name="geometry"/>
</Feature>
<Feature id="2">
<Attribute value="two àò" name="utf8nameè"/>
<Attribute value="Id no. 2 value" name="id"/>
<Attribute value="two_val" name="name"/>
<BoundingBox maxy="5606017.8743" maxx="913214.6741" miny="5606017.8743" CRS="EPSG:3857" minx="913214.6741"/>
<Attribute type="derived" value="Point (913214.6741 5606017.8743)" name="geometry"/>
</Feature>
<Feature id="3">
<Attribute value="three èé↓" name="utf8nameè"/>
<Attribute value="Id número 3 value" name="id"/>
<Attribute value="three_val" name="name"/>
<BoundingBox maxy="5606011.4565" maxx="913204.9128" miny="5606011.4565" CRS="EPSG:3857" minx="913204.9128"/>
<Attribute type="derived" value="Point (913204.9128 5606011.4565)" name="geometry"/>
</Feature>
</Layer>
</GetFeatureInfoResponse>