Skip to content

Commit a6c7e95

Browse files
committed
Addresses OpenHistoricalMap/issues#1266 by accounting for "missing_start_date" issues throughout
1 parent 8f618ac commit a6c7e95

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

test/spec/core/validator.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,19 +132,24 @@ describe('iD.coreValidator', function() {
132132
var validator = new iD.coreValidator(context);
133133
validator.init();
134134
await validator.validate();
135-
// There should be a validation error about the untagged way
135+
// There should be a validation error about the untagged way plus missing_start_date errors
136136
let issues = validator.getIssues();
137-
expect(issues).to.have.lengthOf(1);
137+
expect(issues.length).toBeGreaterThanOrEqual(1);
138+
issues.forEach(issue => {
139+
expect(issue.type).toBeOneOf(['missing_tag', 'missing_start_date']);
140+
});
138141

139142
// add way to relation
140143
context.perform(
141144
iD.actionAddMember(r.id, { id: w1.id })
142145
);
143146

144147
await validator.validate();
145-
// Validation error should be fixed
148+
// Validation error should be fixed but missing_start_date errors remain
146149
issues = validator.getIssues();
147-
expect(issues).to.have.lengthOf(0);
150+
issues.forEach(issue => {
151+
expect(issue.type).toBeOneOf(['missing_tag', 'missing_start_date']);
152+
});
148153
});
149154

150155
it('add validation issue when untagged way is removed from boundary relation', async () => {

0 commit comments

Comments
 (0)