Update tests and fix wfs exposed fields list

This commit is contained in:
Alessandro Pasotti 2020-09-16 18:41:51 +02:00
parent 49037e050a
commit 4743c67420
6 changed files with 526 additions and 914 deletions

View File

@ -456,15 +456,11 @@ json QgsLandingPageUtils::projectInfo( const QString &projectUri )
const QgsFields &cFields { vl->fields() };
for ( const QgsField &field : cFields )
{
// TODO: replace with non deprecated method and fix the tests
// if ( !field.configurationFlags().testFlag( QgsField::ConfigurationFlag::ExposeViaWfs ) )
Q_NOWARN_DEPRECATED_PUSH
if ( vl->excludeAttributesWfs().contains( vl->name() ) )
if ( !field.configurationFlags().testFlag( QgsField::ConfigurationFlag::ExposeViaWfs ) )
{
++fieldIdx;
continue;
}
Q_NOWARN_DEPRECATED_POP
const QgsFieldConstraints::Constraints constraints { field.constraints().constraints() };
const bool notNull { constraints &QgsFieldConstraints::Constraint::ConstraintNotNull &&
field.constraints().constraintStrength( QgsFieldConstraints::Constraint::ConstraintNotNull ) == QgsFieldConstraints::ConstraintStrength::ConstraintStrengthHard };

File diff suppressed because it is too large Load Diff

View File

@ -75,7 +75,7 @@ Content-Type: application/json
11.1218662261963,
52.2622108459473
],
"id": "1928dc5b256258863b109480732d6ccc",
"id": "dc942915d017625cb26d4cc9ca5bf024",
"initial_extent": [
-23.310879982571294,
32.04119099639189,

View File

@ -73,7 +73,7 @@ Content-Type: application/json
38.23087034040887,
55.95129087846767
],
"id": "cbbf3fcb3fc7fbe823cc6c0c5dd744c1",
"id": "59bff15bb762688fe12d953a76449ad6",
"initial_extent": [
-4.550318430316912,
41.98773931833632,

View File

@ -73,7 +73,7 @@ Content-Type: application/json
38.23087034040887,
55.95129087846767
],
"id": "841cac3a81f3c122c10dc5e3be19dbf6",
"id": "01a5d50c10a49fcc1bb8b32e72d53e67",
"initial_extent": [
-4.550318430316912,
41.98773931833632,

View File

@ -89,7 +89,7 @@ Content-Type: application/json
10.910092015289333,
52.49310455554394
],
"id": "e5a6ae4fd29b15cc4f96997aabddfc2c",
"id": "4040d4c995d0b3d2effb4cc8d42eb8cd",
"initial_extent": [
10.727170893991817,
52.37605728414485,
@ -690,18 +690,6 @@ Content-Type: application/json
"type": "String",
"unique": false
},
"bemerkung": {
"default": "",
"editable": true,
"expression": "",
"has_expression": false,
"label": "bemerkung",
"length": 255,
"not_null": false,
"precision": 0,
"type": "String",
"unique": false
},
"beschriftung": {
"default": "",
"editable": true,
@ -714,30 +702,6 @@ Content-Type: application/json
"type": "String",
"unique": false
},
"datum": {
"default": "",
"editable": true,
"expression": "",
"has_expression": false,
"label": "datum",
"length": 254,
"not_null": false,
"precision": 0,
"type": "String",
"unique": false
},
"farbe": {
"default": "",
"editable": true,
"expression": "",
"has_expression": false,
"label": "farbe",
"length": 254,
"not_null": false,
"precision": 0,
"type": "String",
"unique": false
},
"fid": {
"default": "Autogenerate",
"editable": false,
@ -750,30 +714,6 @@ Content-Type: application/json
"type": "Integer64",
"unique": true
},
"flaeche": {
"default": "",
"editable": true,
"expression": "",
"has_expression": false,
"label": "flaeche",
"length": 0,
"not_null": false,
"precision": 0,
"type": "Real",
"unique": false
},
"flaechentyp": {
"default": "",
"editable": true,
"expression": "",
"has_expression": false,
"label": "flaechentyp",
"length": 254,
"not_null": false,
"precision": 0,
"type": "String",
"unique": false
},
"gid": {
"default": "",
"editable": true,
@ -786,54 +726,6 @@ Content-Type: application/json
"type": "Integer",
"unique": false
},
"last_change": {
"default": "",
"editable": true,
"expression": "",
"has_expression": false,
"label": "last_change",
"length": 254,
"not_null": false,
"precision": 0,
"type": "String",
"unique": false
},
"name": {
"default": "",
"editable": true,
"expression": "",
"has_expression": false,
"label": "name",
"length": 254,
"not_null": false,
"precision": 0,
"type": "String",
"unique": false
},
"schraff_size": {
"default": "",
"editable": true,
"expression": "",
"has_expression": false,
"label": "schraff_size",
"length": 254,
"not_null": false,
"precision": 0,
"type": "String",
"unique": false
},
"schraff_size_prt": {
"default": "",
"editable": true,
"expression": "",
"has_expression": false,
"label": "schraff_size_prt",
"length": 254,
"not_null": false,
"precision": 0,
"type": "String",
"unique": false
},
"schraff_width": {
"default": "",
"editable": true,
@ -846,30 +738,6 @@ Content-Type: application/json
"type": "String",
"unique": false
},
"schraff_width_prt": {
"default": "",
"editable": true,
"expression": "",
"has_expression": false,
"label": "schraff_width_prt",
"length": 254,
"not_null": false,
"precision": 0,
"type": "String",
"unique": false
},
"schraff_winkel": {
"default": "",
"editable": true,
"expression": "",
"has_expression": false,
"label": "schraff_winkel",
"length": 254,
"not_null": false,
"precision": 0,
"type": "String",
"unique": false
},
"umfang": {
"default": "",
"editable": true,
@ -881,66 +749,6 @@ Content-Type: application/json
"precision": 0,
"type": "Real",
"unique": false
},
"umrissfarbe": {
"default": "",
"editable": true,
"expression": "",
"has_expression": false,
"label": "umrissfarbe",
"length": 254,
"not_null": false,
"precision": 0,
"type": "String",
"unique": false
},
"umrissstaerke": {
"default": "",
"editable": true,
"expression": "",
"has_expression": false,
"label": "umrissstaerke",
"length": 254,
"not_null": false,
"precision": 0,
"type": "String",
"unique": false
},
"umrissstaerke_prt": {
"default": "",
"editable": true,
"expression": "",
"has_expression": false,
"label": "umrissstaerke_prt",
"length": 254,
"not_null": false,
"precision": 0,
"type": "String",
"unique": false
},
"umrisstyp": {
"default": "",
"editable": true,
"expression": "",
"has_expression": false,
"label": "umrisstyp",
"length": 254,
"not_null": false,
"precision": 0,
"type": "String",
"unique": false
},
"veranstaltung": {
"default": "",
"editable": true,
"expression": "",
"has_expression": false,
"label": "veranstaltung",
"length": 254,
"not_null": false,
"precision": 0,
"type": "String",
"unique": false
}
},
"id": "as_areas_bbe3c71b_356c_49f5_9fc2_ae771bcdd467",