feat: date and username filtering for photo overlay layers

This commit is contained in:
Nikola Plesa
2020-07-23 13:28:19 +02:00
parent bd9d4bce74
commit 22bc5121a4
10 changed files with 337 additions and 3 deletions
+15
View File
@@ -368,4 +368,19 @@ describe('iD.serviceMapillary', function() {
});
});
describe('#filterViewer', function() {
it('filters images by username', function() {
context.photos().setUsernameFilter('mapillary');
var filter = mapillary.filterViewer(context);
expect(filter.length).to.be.equal(2);
});
it('filters images by dates', function() {
context.photos().setDateFilter('fromDate', '2020-01-01');
context.photos().setDateFilter('toDate', '2021-01-01');
var filter = mapillary.filterViewer(context);
expect(filter.length).to.be.equal(3);
});
});
});