Commit Graph

1436 Commits

Author SHA1 Message Date
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
Bryan Housel ddc9d16b62 Merge pull request #6302 from openstreetmap/text-raw-tag-editor
Text raw tag editor / Copy-paste tags
2019-05-03 14:53:08 -04:00
Bryan Housel 7b4a9a43b0 Change utilTagDiff to return an object with details 2019-05-02 22:59:41 -04:00
Bryan Housel ff1eea43a8 Remove Google Analytics, also actually export iD.utilDetect 2019-05-02 19:12:39 -04:00
Bryan Housel ed9a436318 Move common tag diffing code from validators into utilTagDiff 2019-05-02 11:16:15 -04:00
Quincy Morgan a180c794cb Merge branch 'master' into ignoring-issues 2019-05-01 20:13:49 -07:00
Bryan Housel 382e0a7dd6 Merge pull request #6270 from westnordost/patch-10
inherit preset.removeTags from preset.addTags if not defined [Ready for Review]
2019-05-01 19:15:24 -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 56544303ca Merge branch 'master' into ignoring-issues 2019-05-01 11:58:39 -07:00
Bryan Housel 37557a7c98 Defer processing clicks in behaviorSelect
(closes #6028) (I hope?)

Because this click may trigger a blur event,
and the blur event may trigger a tag change,
and we really want that tag change to go to the already selected entity
and not the one that we are about to select with the click  #6028, #5878

(Be very careful entering modeSelect anywhere that might also blur a field!)
2019-05-01 14:47:29 -04:00
Tobias Zwick 446dc1097d Merge branch 'master' into patch-10
# Conflicts:
#	data/presets/presets/highway/crossing/unmarked-raised.json
#	data/presets/presets/highway/crossing/unmarked.json
2019-04-30 22:20:05 +02:00
Tobias Zwick a1b89332bb add test 2019-04-30 22:15:34 +02:00
Quincy Morgan 26f1e29072 Merge branch 'master' into ignoring-issues
# Conflicts:
#	data/core.yaml
#	dist/locales/en.json
2019-04-30 13:05:07 -07:00
Bryan Housel 0a4e2c03a3 Extend timeouts on slow async mapillary tests
Trying to avoid false test failures.  Default timeout is 2sec, and we can't
be sure slow async tests will finish in that time esp. in a CI environment
2019-04-30 09:59:51 -04:00
Bryan Housel a72865e4d8 Treat anything with a from/via/to like a restriction
(closes #6221)

Applies to actions like splitting, connecting, extracting a via node, etc
2019-04-29 21:58:10 -04:00
Bryan Housel 2b46440429 Add Relation#hasFromViaTo method and tests 2019-04-29 21:39:40 -04:00
Bryan Housel bd2490a965 Reverse internal left/right/forward/backward keyparts
(closes #6235)

Previously only trailing keyparts would reverse:
 `cycleway:left` ⟺  `cycleway:right`
Now it can do internal keyparts too:
 `cycleway:left:surface` ⟺  `cycleway:right:surface`
2019-04-29 21:13:18 -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
Bryan Housel fceb1a86f7 Merge pull request #6245 from openstreetmap/d3-v5
d3 v5
2019-04-29 15:46:08 -04:00
Bryan Housel e981cd5dd5 Switch mapillary and openstreetcam tests to work async
- can't reliably use sinon.spy to tell whether a thing has been called,
  so we listen for events instead and check server.requests()
- make sure to request the next page before dispatching `loadedImages` so
  we can `server.respond()` to the request in the event handler if we want to
- also moves `localeDateString` in the openstreetcam service from parsing
  code to display code, because it's very slow (we can just do this for the
  images we look at, instead of all images we fetch)
2019-04-29 15:31:08 -04:00
Bryan Housel af31b84b1d Keep track of whether requests have been processed
This lets us call `respond` multiple times, which is useful for the
tests which fetch data in pages.
2019-04-29 13:03:01 -04:00
Bryan Housel 452eb8b43a Bump timeouts on streetlevel loadimage-type tests
This isn't perfect but might avoid spurious test failures.
2019-04-27 17:41:58 -04:00
Bryan Housel d0452e6be4 Convert fakeServer tests to use fakeFetch
- Many text expects are now wrapped in setTimeout, as the fetch
  promises settle async now.
- This makes the tests somewhat brittle, and we should maybe consider
  reworking some of them. For example it is very hard to perform
  a test like `expect(spy).to.have.not.been.called` in an async way.
  (We could instead inspect the fakeServer requests() to know this.)
- Also includes some trickery for osm.js, which uses d3-xml (fetch)
  now for unauthenticated calls and osmauth (xhr) for authenticated calls
2019-04-26 22:29:48 -04:00
Bryan Housel 552ea46c43 Wrap the fake-fetch methods with sinon.fakeServer-like interface
This mimics `respondWith` and `respond` to keep the tests mostly
similar between `FakeFetch` and `sinon.fakeServer`

Major difference is that all the fakeServer tests which were sync
are now async and this is probably unavoidable.
2019-04-26 22:25:57 -04:00
Bryan Housel 3e363fed8b Make sure to return a new Response each time, not the same one
You can only consume a response once - thereafter the response
body becomes "locked" and will throw an error if you try.
https://stackoverflow.com/questions/53511974/javascript-fetch-failed-to-execute-json-on-response-body-stream-is-locked
2019-04-25 19:22:11 -04:00
Bryan Housel 6f31062d32 Add support for sinon-stubbing fetch API to spec_helpers 2019-04-25 14:13:08 -04: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 05949608aa Support straightening of points
(closes #6217)

- Split `actionStraighten` into `actionStraightenWay` and `actionStraightenNodes`
- Now `operationStraighten` chooses the correct action depending on selected entities
- Also move `getSmallestSurroundingRectangle` from `actionReflect` to `geo.js`
2019-04-24 01:55:43 -04:00
Bryan Housel bd2a33d845 Merge branch 'validation_and_change_perf' 2019-04-23 01:30:26 -04:00
Quincy Morgan e04d860f62 Convert "Detach" operation into "Extract" operation that also works on areas (close #6203) 2019-04-22 14:46:01 -07:00
Bryan Housel 51c1088c1b Merge branch 'master' into validation_and_change_perf 2019-04-19 15:18:23 -04:00
Quincy Morgan e3e3fd1ad3 Fix Wikipedia field test 2019-04-15 15:32: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 f6708fd84c Hide feature if _all_ rules hidden (was: if _any_ rule hidden)
This matters as we start to match more rules for hybrid features like rail
platforms, which now match both path and rail.  We want to show them unless the
user has hidden all the rules that they match.

Also this changes the test code slightly to actually test rule matching.
Before it was really just testing hiding.
2019-04-15 10:20:58 -04:00
Bryan Housel 36d1f3701f Allow osm service tests to work with deferred parsing 2019-04-12 12:11:35 -04:00
Bryan Housel 0dd262d1dd Don't dispatch 'change' on history.merged, dispatch 'merge' only
Change performs an expensive immediate redraw, and merge can schedule
a redraw for later.
2019-04-12 09:56:18 -04:00
Bryan Housel 0a77a494aa Merge branch 'master' into validation_and_change_perf 2019-04-10 14:22:20 -04:00
Bryan Housel e30090996b Add loadTileAtLoc to fetch data tile for a specific location
(closes #4890)

This lets iD request needed tiles outside of the viewport, for example to
properly straighten lines or validate features that may have unloaded
connections.
2019-04-09 23:49:31 -04:00
Bryan Housel 95a1bbaf97 Add downloaded debug flag and visualization for tiles downloaded 2019-04-08 22:06:47 -04:00
Bryan Housel df1a2ea361 Prevent some actions on features that extend beyond the loaded map
(closes #2248)
2019-04-08 21:26:58 -04:00
Bryan Housel 2660a8554b Add isDataLoaded and tilecache rtree for testing
(re: #2248, #5938, maybe others)
2019-04-08 15:59:42 -04:00
Quincy Morgan 50a0982d79 Merge pull request #6161 from jguthrie100/fix_closed_way_disconnect
Leave way as closed when disconnecting
2019-04-08 11:08:33 -07:00
J Guthrie bd44cec2e8 Fix broken testcase! 2019-04-08 16:48:27 +01:00
Jamie Guthrie a29da38230 Remove operationDisconnect test 2019-04-08 16:02:31 +01:00
J Guthrie 57a0358061 Add test cases 2019-04-08 15:19:21 +01: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