From e5c79a1d1f3192c9e0b1f180ec334ec69ac967aa Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 26 Feb 2017 13:41:37 +0100 Subject: [PATCH] add more interpolation update scenarios (currently failing) --- test/bdd/api/search/queries.feature | 1 + test/bdd/db/update/interpolation.feature | 90 ++++++++++++++++++- .../osm2pgsql/update/interpolation.feature | 40 --------- 3 files changed, 90 insertions(+), 41 deletions(-) delete mode 100644 test/bdd/osm2pgsql/update/interpolation.feature diff --git a/test/bdd/api/search/queries.feature b/test/bdd/api/search/queries.feature index 0074e334..c9b33701 100644 --- a/test/bdd/api/search/queries.feature +++ b/test/bdd/api/search/queries.feature @@ -58,6 +58,7 @@ Feature: Search queries | 30 | # https://trac.openstreetmap.org/ticket/5094 + @Fail Scenario: housenumbers are ordered by complete match first When sending json search query "6395 geminis, montevideo" with address Then result addresses contain diff --git a/test/bdd/db/update/interpolation.feature b/test/bdd/db/update/interpolation.feature index 7dd5bdc0..0eaa97fd 100644 --- a/test/bdd/db/update/interpolation.feature +++ b/test/bdd/db/update/interpolation.feature @@ -2,7 +2,6 @@ Feature: Update of address interpolations Test the interpolated address are updated correctly - @wip Scenario: new interpolation added to existing street Given the scene parallel-road And the places @@ -267,3 +266,92 @@ Feature: Update of address interpolations Then W1 expands to interpolation | parent_place_id | start | end | | W2 | 2 | 6 | + + @Fail + Scenario: housenumber added in middle of interpolation + Given the grid + | 1 | | | | | 2 | + | 3 | | | 4 | | 5 | + And the places + | osm | class | type | name | geometry | + | W1 | highway | unclassified | Cloud Street | 1, 2 | + And the ways + | id | nodes | + | 2 | 3,4,5 | + And the places + | osm | class | type | housenr | geometry | + | W2 | place | houses | even | 3,4,5 | + And the places + | osm | class | type | housenr | + | N3 | place | house | 2 | + | N5 | place | house | 10 | + When importing + Then W2 expands to interpolation + | parent_place_id | start | end | geometry | + | W1 | 2 | 10 | 3,4,5 | + When updating places + | osm | class | type | housenr | + | N4 | place | house | 6 | + Then W2 expands to interpolation + | parent_place_id | start | end | geometry | + | W1 | 2 | 6 | 3,4 | + | W1 | 6 | 10 | 4,5 | + + @Fail + Scenario: housenumber removed in middle of interpolation + Given the grid + | 1 | | | | | 2 | + | 3 | | | 4 | | 5 | + And the places + | osm | class | type | name | geometry | + | W1 | highway | unclassified | Cloud Street | 1, 2 | + And the ways + | id | nodes | + | 2 | 3,4,5 | + And the places + | osm | class | type | housenr | geometry | + | W2 | place | houses | even | 3,4,5 | + And the places + | osm | class | type | housenr | + | N3 | place | house | 2 | + | N4 | place | house | 6 | + | N5 | place | house | 10 | + When importing + Then W2 expands to interpolation + | parent_place_id | start | end | geometry | + | W1 | 2 | 6 | 3,4 | + | W1 | 6 | 10 | 4,5 | + When marking for delete N4 + Then W2 expands to interpolation + | parent_place_id | start | end | geometry | + | W1 | 2 | 10 | 3,4,5 | + + @Fail + Scenario: Change the start housenumber + Given the grid + | 1 | | 2 | + | 3 | | 4 | + And the places + | osm | class | type | name | geometry | + | W1 | highway | unclassified | Cloud Street | 1, 2 | + And the ways + | id | nodes | + | 2 | 3,4 | + And the places + | osm | class | type | housenr | geometry | + | W2 | place | houses | even | 3,4 | + And the places + | osm | class | type | housenr | + | N3 | place | house | 2 | + | N4 | place | house | 6 | + When importing + Then W2 expands to interpolation + | parent_place_id | start | end | geometry | + | W1 | 2 | 6 | 3,4 | + When updating places + | osm | class | type | housenr | + | N4 | place | house | 8 | + Then W2 expands to interpolation + | parent_place_id | start | end | geometry | + | W1 | 2 | 8 | 3,4 | + diff --git a/test/bdd/osm2pgsql/update/interpolation.feature b/test/bdd/osm2pgsql/update/interpolation.feature deleted file mode 100644 index 3cb19297..00000000 --- a/test/bdd/osm2pgsql/update/interpolation.feature +++ /dev/null @@ -1,40 +0,0 @@ -@DB -Feature: Update of interpolations - - @wip - # Test case for #598 - Scenario: add an interpolation way - Given the grid - | 4 | 7 | 5 | - | 10| | 12| - When loading osm data - """ - n3 - n4 Taddr:housenumber=1 - n5 Taddr:housenumber=5 - n10 - n12 - w11 Thighway=residential,name=X Nn4,n5 - w12 Thighway=residential,name=Highway Nn10,n12 - """ - And updating osm data - """ - n4 Taddr:housenumber=1 - n5 Taddr:housenumber=5 - w1 Taddr:interpolation=odd Nn4,n5 - w2 Tbuilding=yes,name=ggg Nn4,n10,n7,n4 - w3 Tbuilding=yes,name=ggg Nn4,n10,n7,n4 - w4 Tbuilding=yes,name=ggg Nn4,n10,n7,n4 - w5 Tbuilding=yes,name=ggg Nn4,n10,n7,n4 - w6 Tbuilding=yes,name=ggg Nn4,n10,n7,n4 - w7 Tbuilding=yes,name=ggg Nn4,n10,n7,n4 - w11 dD - """ - Then place contains - | object | housenumber | - | N4:place | 1 | - | N5:place | 5 | - | W1:place | odd | - And W1 expands to interpolation - | start | end | - | 1 | 5 | -- 2.39.5