From b0ef84caae79f7478b749b1b4af15ee838ca412c Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sat, 17 Oct 2020 17:51:22 +0200 Subject: [PATCH] add tests for rank computation --- test/bdd/db/import/rank_computation.feature | 35 ++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/test/bdd/db/import/rank_computation.feature b/test/bdd/db/import/rank_computation.feature index 4f1cc6c0..cea4d973 100644 --- a/test/bdd/db/import/rank_computation.feature +++ b/test/bdd/db/import/rank_computation.feature @@ -2,7 +2,7 @@ Feature: Rank assignment Tests for assignment of search and address ranks. - Scenario: Ranks for place nodes are assinged according to thier type + Scenario: Ranks for place nodes are assigned according to their type Given the named places | osm | class | type | | N1 | foo | bar | @@ -113,3 +113,36 @@ Feature: Rank assignment | R20 | 12 | 22 | | R21 | 14 | 24 | | R22 | 16 | 25 | + + Scenario: admin levels contained in a place area must not overtake address ranks + Given the named places + | osm | class | type | admin | geometry | + | R10 | place | city | 15 | (0 0, 0 2, 2 0, 0 0) | + | R20 | boundary | administrative | 6 | (0 0, 0 1, 1 0, 0 0) | + When importing + Then placex contains + | object | rank_search | rank_address | + | R10 | 16 | 16 | + | R20 | 12 | 18 | + + Scenario: admin levels overlapping a place area are not demoted + Given the named places + | osm | class | type | admin | geometry | + | R10 | place | city | 15 | (0 0, 0 2, 2 0, 0 0) | + | R20 | boundary | administrative | 6 | (-1 0, 0 1, 1 0, -1 0) | + When importing + Then placex contains + | object | rank_search | rank_address | + | R10 | 16 | 16 | + | R20 | 12 | 12 | + + Scenario: admin levels with equal area as a place area are not demoted + Given the named places + | osm | class | type | admin | geometry | + | R10 | place | city | 15 | (0 0, 0 2, 2 0, 0 0) | + | R20 | boundary | administrative | 6 | (0 0, 0 2, 2 0, 0 0) | + When importing + Then placex contains + | object | rank_search | rank_address | + | R10 | 16 | 16 | + | R20 | 12 | 12 | -- 2.39.5