Merge branch 'matkoniecz-bad-tags' of https://github.com/matkoniecz/iD into matkoniecz-matkoniecz-bad-tags

This commit is contained in:
Bryan Housel
2018-11-07 10:32:20 -05:00
2 changed files with 4 additions and 8 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ function filterValues(allowUpperCase) {
return function(d) {
if (d.value.match(/[;,]/) !== null) return false; // exclude some punctuation
if (!allowUpperCase && d.value.match(/[A-Z*]/) !== null) return false; // exclude uppercase letters
return parseFloat(d.fraction) > 0.0 || d.in_wiki;
return parseFloat(d.fraction) > 0.0;
};
}
+3 -7
View File
@@ -85,7 +85,7 @@ describe('iD.serviceTaginfo', function() {
);
});
it('includes unpopular keys with a wiki page', function() {
it('does not include unpopular keys with a wiki page', function() {
var callback = sinon.spy();
taginfo.keys({query: 'amen'}, callback);
@@ -96,10 +96,7 @@ describe('iD.serviceTaginfo', function() {
);
server.respond();
expect(callback).to.have.been.calledWith(null, [
{'title':'amenity', 'value':'amenity'},
{'title':'amenityother', 'value':'amenityother'}
]);
expect(callback).to.have.been.calledWith(null, [{'title':'amenity', 'value':'amenity'}]);
});
it('sorts keys with \':\' below keys without \':\'', function() {
@@ -220,7 +217,7 @@ describe('iD.serviceTaginfo', function() {
expect(callback).to.have.been.calledWith(null, []);
});
it('includes unpopular values with a wiki page', function() {
it('does not include unpopular values with a wiki page', function() {
var callback = sinon.spy();
taginfo.values({key: 'amenity', query: 'par'}, callback);
@@ -233,7 +230,6 @@ describe('iD.serviceTaginfo', function() {
expect(callback).to.have.been.calledWith(null, [
{'value':'parking','title':'A place for parking cars'},
{'value':'party','title':'A place for partying'}
]);
});