diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestrians.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestrians.kt index 67799039e5..dae80bb78f 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestrians.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestrians.kt @@ -8,7 +8,7 @@ import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement. import de.westnordost.streetcomplete.osm.ROADS_ASSUMED_TO_BE_PAVED import de.westnordost.streetcomplete.osm.Tags import de.westnordost.streetcomplete.osm.surface.PAVED_SURFACES -import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.HAS_SEPARATE_SIDEWALK +import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.ACTUALLY_HAS_SIDEWALK import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.NO import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.YES @@ -59,9 +59,9 @@ class AddProhibitedForPedestrians : OsmFilterQuestType foot=no etc YES -> tags["foot"] = "no" NO -> tags["foot"] = "yes" - HAS_SEPARATE_SIDEWALK -> { - tags["sidewalk:both"] = "separate" - // wrong tagging may exist, it should be removed to prevent quest from reappearing + // but we did not specify on which side. So, clear it, sidewalk is added separately + ACTUALLY_HAS_SIDEWALK -> { + tags.remove("sidewalk:both") tags.remove("sidewalk") tags.remove("sidewalk:left") tags.remove("sidewalk:right") diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansForm.kt index 674ab40e28..a29759ef73 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansForm.kt @@ -3,7 +3,7 @@ package de.westnordost.streetcomplete.quests.foot import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AListQuestForm import de.westnordost.streetcomplete.quests.TextItem -import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.HAS_SEPARATE_SIDEWALK +import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.ACTUALLY_HAS_SIDEWALK import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.NO import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.YES @@ -12,6 +12,6 @@ class AddProhibitedForPedestriansForm : AListQuestFormAre pedestrians forbidden to walk on this road without sidewalk here? It is forbidden. It is allowed. - Actually, there is a sidewalk, but it is displayed separately on the map. + Actually, there is a sidewalk. "What’s the house number of this building?" House number: diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansTest.kt index 4766d2bafe..60f357b2f4 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansTest.kt @@ -27,22 +27,15 @@ class AddProhibitedForPedestriansTest { ) } - @Test fun `apply separate sidewalk answer`() { - assertEquals( - setOf(StringMapEntryAdd("sidewalk:both", "separate")), - questType.answerApplied(HAS_SEPARATE_SIDEWALK) - ) - } - - @Test fun `remove wrong sidewalk tagging`() { + @Test fun `apply actually sidewalk answer clears all sidewalk tagging`() { assertEquals( setOf( - StringMapEntryModify("sidewalk:both", "yes", "separate"), + StringMapEntryDelete("sidewalk:both", "yes"), StringMapEntryDelete("sidewalk:left", "yes"), StringMapEntryDelete("sidewalk:right", "yes"), StringMapEntryDelete("sidewalk", "both"), ), - questType.answerAppliedTo(HAS_SEPARATE_SIDEWALK, mapOf( + questType.answerAppliedTo(ACTUALLY_HAS_SIDEWALK, mapOf( "sidewalk" to "both", "sidewalk:left" to "yes", "sidewalk:right" to "yes",