Benjamin Clark
9bfcd56c35
Fix bug that was causing google validation warnings to appear over changesets with the approved google africa building dataset.
2021-12-09 12:33:27 -05:00
Bryan Housel
33fab5580b
Before calling init() make sure the assetPath is set
...
init kicks off building the ui, which can fetch spritesheets for the <defs>
The assetPath needs to be set otherwise these files will not be found
2021-08-16 22:06:42 -04:00
Bryan Housel
a656106373
Include nsi_dissolved in test setup
2021-03-05 11:59:36 -05:00
Bryan Housel
1f6a2121c4
Move all of NSI into a service, rewrite matcher code
2021-03-03 12:04:37 -05:00
Bryan Housel
d3fb8c60f9
Upgrade validations outdated_tags, suspicious_names to NSI v5
2021-01-13 13:46:00 -05:00
Peter Newman
4205ca1d07
Fix the seemingly safe spellings found by codespell
...
Untested, only checked by inspection.
(cherry picked from commit 2c47a11008 )
2020-08-10 17:32:37 +01:00
Quincy Morgan
9a13c6810b
Don't flag google drive as an incompatible source ( close #7545 )
2020-04-28 11:10:26 -07:00
Quincy Morgan
3a933de876
Don't add tags to connection node when connecting crossing line/area
2020-04-13 18:57:26 -07:00
Quincy Morgan
85c88a8846
Add additional tests for crossing_ways validation
2020-04-13 18:37:13 -07:00
Quincy Morgan
513b344012
Fix code tests
2020-04-03 13:33:54 -07:00
Quincy Morgan
a1af118f0e
Ensure locales and presets are loaded before the UI loads ( close #7406 )
...
Consolidate localization behavior and init to a coreLocalizer function and singleton
Explicitly support `en-US` locale
Rename coreData to coreFileFetcher and export a singleton rather than using a property of coreContext
Add `apiConnections` property of coreContext to simplify adding a source switcher
Replace some init functions with re-callable, promise-supporting `ensureLoaded` functions
Make coreContext itself load the UI if a container has been specified at init time
Fix code tests
2020-03-31 12:23:31 -07:00
SilentSpike
64ae360dac
Add verbs to test spec for almost junctions
2020-02-11 16:10:46 +00:00
SilentSpike
142126f7fe
Store node for quick fix in data not entityIds
...
Realised these are used for highlighting and should remain as is.
2020-02-11 16:10:46 +00:00
SilentSpike
d83675f43e
Update almost junction tests to reflect change
2020-02-11 16:10:45 +00:00
SilentSpike
d96fde53db
Add test for almost junction with both close ends
2020-02-11 16:10:45 +00:00
SilentSpike
917c8f0b94
Add tests for close endpoint almost junctions
2020-02-11 16:10:44 +00:00
Bryan Housel
0fe766d9a4
WIP on external presets
...
- preset data is no longer bundled into iD.js
- some code pathways commented out re: external presets
- many changes so that tests can run without presets at start, or async
- still need to make sure fallbacks are always there (point, line, area, etc)
2020-02-05 09:38:26 -05:00
Bryan Housel
6b2d236ecd
Pass in the validator to the function
2020-02-03 17:40:56 -05:00
Bryan Housel
4aa4686e7f
Fix test failures in localized and suspicious_names
2020-02-03 12:38:17 -05:00
Bryan Housel
e19bcb77d5
Require init() call before coreContext starts doing things
...
(closes #7304 )
2020-01-29 19:27:12 -05:00
Bryan Housel
c481f90e7d
Stop bundling wmf-sitematrix, move it extern
...
This also includes a bunch of tweaks to make the tests work
in both PhantomJS and modern browsers like Chrome.
Basically - introduce some more async into the test code so that
the coreData.get promise is guaranteed to settle. Because in
PhantomJS the promise is polyfilled, and Chrome it's native, they
work slightly differently.
2020-01-29 12:30:11 -05:00
Bryan Housel
567eeac587
Make several data external instead of bundled:
...
Also dist/data/* contains minified files now
These are now external and will fetch as needed:
-export { dataAddressFormats } from './address-formats.json';
-export { dataDeprecated } from './deprecated.json';
-export { dataDiscarded } from './discarded.json';
-export { dataLanguages } from './languages.json';
-export { dataPhoneFormats } from './phone-formats.json';
-export { dataShortcuts } from './shortcuts.json';
-export { dataTerritoryLanguages } from './territory-languages.json';
2020-01-28 22:21:31 -05:00
Quincy Morgan
31941e9389
Fix JavaScript error that could cause validation warnings to appear unexpectedly ( close #7166 )
...
Add code test to account for deprecated tags with no replacement
2019-12-31 12:03:57 -05:00
Quincy Morgan
24c72b64d1
Load issue fixes dynamically instead of cacheing them ( close #7037 )
2019-11-13 14:35:01 -05:00
Bryan Housel
3886f2dad8
Merge branch '2.15-building-crossing-layers' into 2.x
2019-10-24 15:15:06 -04:00
Quincy Morgan
a3d6097d40
Rename "Fix Me" Requests validation rule to more general Help Requests
...
Add subtypes to almost_junction and disconnected_way validation rules
Add additional validation documentation (re: #6100 )
2019-10-09 15:00:28 +02:00
Quincy Morgan
badde3d583
Add warning for features with names that equal values in their not:name tag ( close #6411 )
2019-10-04 11:06:27 +02:00
Quincy Morgan
d3d2cbb4a2
Update code tests for building layer crossings
2019-10-03 20:10:20 +02:00
Quincy Morgan
525916da74
Recategorize tags_suggests_area validation rule into mismatched_geometry rule
...
Warn about points tagged as vertices and vertices tagged as points (close #6319 )
2019-09-26 10:56:30 +02:00
Quincy Morgan
1ed73b6531
Convert validation rules to validate against a specific graph, not always the current graph (re: #6459 )
2019-06-06 16:27:31 -04:00
Quincy Morgan
6260cdbb8f
Fix several lint warnings
2019-05-22 10:48:39 -04:00
Quincy Morgan
e697bdbeb1
Flag disconnected ferry routes
...
Flag disconnected highway multipolygon outer member ways
Let routing islands cross ferry routes
2019-05-17 00:15:53 -04:00
Bryan Housel
77801a3ecd
Merge pull request #6284 from Bonkles/id-5869
...
Improve validation for disconnected highways #5869
2019-05-05 22:17:12 -04:00
Benjamin Clark
ec01933d84
Disconnected highways will now be warning flagged only if unattached to existing highways.
2019-05-01 17:42:23 -04:00
Quincy Morgan
375779882d
Add ability to ignore warnings
...
Replace issue's array of entities with array of entity IDs
Improve issue ID hashing
2019-04-29 17:52:32 -07:00
Quincy Morgan
7d29a98a14
Add subtype to some validation issues
2019-04-25 10:35:27 -07:00
Quincy Morgan
aa91c2d768
Move old multipolygon warning into Outdated Tags rule ( close #6218 )
2019-04-24 15:46:50 -07:00
Quincy Morgan
13f7e536dc
Move highway=road validation warning to the missing_tag validation rule (re: #6218 )
2019-04-24 15:19:57 -07:00
Bryan Housel
294ce00211
substitute 'info' for 'data' (so I can use 'info' for an info drawer)
2019-04-15 16:56:21 -04:00
Bryan Housel
0a77a494aa
Merge branch 'master' into validation_and_change_perf
2019-04-10 14:22:20 -04:00
Bryan Housel
1bcc0f613c
WIP: fix caches, replace id() function with plain id property
2019-04-05 17:41:04 -04:00
Quincy Morgan
6dd9e9ce48
Add code tests for incompatible_source validation
2019-04-05 13:53:57 -07:00
Bryan Housel
82a9375e0f
Move coreValidator test to test/spec/core/validator.js
2019-04-05 09:34:53 -04:00
Bryan Housel
8b1c0551cc
WIP: understand state held by the validator, avoid translations
...
- Make sure all state variables prefixed with `_`
- Add explicit `init`/`reset` methods
(graph/entity refs should never persist through a save to OSM)
- Thinking of how best cache validation results
2019-04-05 09:28:36 -04:00
Quincy Morgan
b841b0c242
Fix lint errors
2019-03-21 12:04:29 -04:00
Quincy Morgan
a2822caf2f
Add tests for generic_name validation
2019-03-21 12:00:04 -04:00
Quincy Morgan
f03066e580
Add tests for private_data validation
2019-03-21 11:44:30 -04:00
Quincy Morgan
59b1d4d28d
Add tests for unknown_road validation
2019-03-21 11:37:23 -04:00
Quincy Morgan
f114945628
Flag disconnected highway areas and multipolygons ( close #6075 )
...
Don't flag highways connected only to highway multipolygons
2019-03-21 10:13:59 -04:00
Quincy Morgan
fb25a44017
Generalize deprecated_tags validation to outdated_tags validation
...
Add check for missing addTags go outdated_tags validation (close #6043 , close #6042 )
2019-03-12 17:08:20 -04:00