add default implied access values for ways with "motorroad=yes"

see https://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Access_restrictions
addresses https://github.com/openstreetmap/id-tagging-schema/issues/609
This commit is contained in:
Martin Raifer
2025-03-20 13:52:20 +01:00
parent 771ad4dbd9
commit 7d933f3875
3 changed files with 20 additions and 0 deletions

View File

@@ -121,6 +121,16 @@ describe('iD.uiFieldAccess', function() {
expect(selection.selectAll('.preset-input-access-bicycle').attr('placeholder')).to.equal('destination');
});
it('sets foot, bicycle and horse placeholder to "no" when there a "motorroad=yes" tag (#9333)', function() {
var access = iD.uiFieldAccess(field, context);
selection.call(access);
access.tags({highway: 'primary', motorroad: 'yes'});
expect(selection.selectAll('.preset-input-access-foot').attr('placeholder')).to.equal('no');
expect(selection.selectAll('.preset-input-access-bicycle').attr('placeholder')).to.equal('no');
expect(selection.selectAll('.preset-input-access-horse').attr('placeholder')).to.equal('no');
});
it('sets correct placeholder on a multi selection', function() {
var access = iD.uiFieldAccess(field, context);
selection.call(access);