Skip to content

Commit 05fad59

Browse files
committed
enable test for getfeatureinfo value relation widget values
1 parent 4059c9b commit 05fad59

File tree

3 files changed

+40
-14
lines changed

3 files changed

+40
-14
lines changed

tests/src/python/test_qgsserver_wms_getfeatureinfo.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,11 @@ def testGetFeatureInfo(self):
178178
'&CRS=EPSG:3857' +
179179
'&FEATURE_COUNT=10' +
180180
'&QUERY_LAYERS=layer0&I=487&J=308',
181-
'wms_getfeatureinfo-values1-text-xml',
181+
'wms_getfeatureinfo-values0-text-xml',
182182
'test_project_values.qgs')
183183

184-
# TODO fix regression in QGIS 3 as the widget values don't get solved and enable test
185-
@unittest.expectedFailure
186184
def testGetFeatureInfoValueRelation(self):
187-
"""Test GetFeatureInfo resolves "value relation" widget values"""
185+
"""Test GetFeatureInfo resolves "value relation" widget values. regression 18518"""
188186
mypath = self.testdata_path + "test_project_values.qgs"
189187
self.wms_request_compare('GetFeatureInfo',
190188
'&layers=layer1&styles=&' +
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
*****
2+
Content-Type: text/xml; charset=utf-8
3+
4+
<GetFeatureInfoResponse>
5+
<Layer name="layer0">
6+
<Feature id="0">
7+
<Attribute value="1" name="id"/>
8+
<Attribute value="one" name="name"/>
9+
<Attribute value="First Value" name="utf8nameè"/>
10+
</Feature>
11+
<Feature id="1">
12+
<Attribute value="2" name="id"/>
13+
<Attribute value="two" name="name"/>
14+
<Attribute value="Second Value" name="utf8nameè"/>
15+
</Feature>
16+
<Feature id="2">
17+
<Attribute value="3" name="id"/>
18+
<Attribute value="three" name="name"/>
19+
<Attribute value="Third èé↓" name="utf8nameè"/>
20+
</Feature>
21+
</Layer>
22+
</GetFeatureInfoResponse>

tests/testdata/qgis_server/wms_getfeatureinfo-values1-text-xml.txt

+16-10
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,27 @@
22
Content-Type: text/xml; charset=utf-8
33

44
<GetFeatureInfoResponse>
5-
<Layer name="layer0">
5+
<Layer name="layer1">
66
<Feature id="0">
7-
<Attribute value="1" name="id"/>
8-
<Attribute value="one" name="name"/>
9-
<Attribute value="First Value" name="utf8nameè"/>
7+
<Attribute value="Id no. 1 value" name="id"/>
8+
<Attribute value="one_value" name="name"/>
9+
<Attribute value="one èé" name="utf8nameè"/>
10+
<BoundingBox maxy="5606025.2373" maxx="913209.0358" miny="5606025.2373" CRS="EPSG:3857" minx="913209.0358"/>
11+
<Attribute type="derived" value="Point (913209.0358 5606025.2373)" name="geometry"/>
1012
</Feature>
1113
<Feature id="1">
12-
<Attribute value="2" name="id"/>
13-
<Attribute value="two" name="name"/>
14-
<Attribute value="Second Value" name="utf8nameè"/>
14+
<Attribute value="Id no. 2 value" name="id"/>
15+
<Attribute value="two_val" name="name"/>
16+
<Attribute value="two àò" name="utf8nameè"/>
17+
<BoundingBox maxy="5606017.8743" maxx="913214.6741" miny="5606017.8743" CRS="EPSG:3857" minx="913214.6741"/>
18+
<Attribute type="derived" value="Point (913214.6741 5606017.8743)" name="geometry"/>
1519
</Feature>
1620
<Feature id="2">
17-
<Attribute value="3" name="id"/>
18-
<Attribute value="three" name="name"/>
19-
<Attribute value="Third èé↓" name="utf8nameè"/>
21+
<Attribute value="Id número 3 value" name="id"/>
22+
<Attribute value="three_val" name="name"/>
23+
<Attribute value="three èé↓" name="utf8nameè"/>
24+
<BoundingBox maxy="5606011.4565" maxx="913204.9128" miny="5606011.4565" CRS="EPSG:3857" minx="913204.9128"/>
25+
<Attribute type="derived" value="Point (913204.9128 5606011.4565)" name="geometry"/>
2026
</Feature>
2127
</Layer>
2228
</GetFeatureInfoResponse>

0 commit comments

Comments
 (0)