mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-22 16:19:48 +02:00
Access field should allow "yes" placeholders to be overridden (#2213)
This commit is contained in:
@@ -74,4 +74,21 @@ describe('iD.ui.preset.access', function() {
|
||||
expect(selection.selectAll('#preset-input-access-motor_vehicle').attr('placeholder')).to.equal('yes');
|
||||
});
|
||||
});
|
||||
|
||||
it('overrides a "yes" placeholder with more specific access tag (#2213)', function() {
|
||||
var access = iD.ui.preset.access(field);
|
||||
selection.call(access);
|
||||
|
||||
access.tags({highway: 'service', access: 'emergency'});
|
||||
expect(selection.selectAll('#preset-input-access-motor_vehicle').attr('placeholder')).to.equal('emergency');
|
||||
});
|
||||
|
||||
it('does not override a "no" placeholder with more specific access tag (#2213)', function() {
|
||||
var access = iD.ui.preset.access(field);
|
||||
selection.call(access);
|
||||
|
||||
access.tags({highway: 'cycleway', access: 'destination'});
|
||||
expect(selection.selectAll('#preset-input-access-motor_vehicle').attr('placeholder')).to.equal('no');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user