Flag disconnected ferry routes

Flag disconnected highway multipolygon outer member ways
Let routing islands cross ferry routes
This commit is contained in:
Quincy Morgan
2019-05-17 00:15:53 -04:00
parent 07bc2821cd
commit e697bdbeb1
6 changed files with 50 additions and 95 deletions
-27
View File
@@ -87,33 +87,6 @@ describe('iD.validations.disconnected_way', function () {
expect(issue.entityIds[0]).to.eql('w-1');
});
it('flags disconnected highway with disconnected entrance vertex', function() {
var n1 = iD.osmNode({id: 'n-1', loc: [4,4], tags: {'entrance': 'yes'}});
var n2 = iD.osmNode({id: 'n-2', loc: [4,5]});
var w = iD.osmWay({id: 'w-1', nodes: ['n-1', 'n-2'], tags: {'highway': 'unclassified'}});
context.perform(
iD.actionAddEntity(n1),
iD.actionAddEntity(n2),
iD.actionAddEntity(w)
);
var issues = validate();
expect(issues).to.have.lengthOf(1);
var issue = issues[0];
expect(issue.type).to.eql('disconnected_way');
expect(issue.severity).to.eql('warning');
expect(issue.entityIds).to.have.lengthOf(1);
expect(issue.entityIds[0]).to.eql('w-1');
});
it('ignores highways that are connected to existing highways', function() {
createWayAtEndOfExistingOne({'highway': 'secondary'}, {'highway': 'secondary'});
var issues = validate();
expect(issues).to.have.lengthOf(0);
});
it('ignores highway with connected entrance vertex', function() {
var n1 = iD.osmNode({id: 'n-1', loc: [4,4], tags: {'entrance': 'yes'}});