Commit Graph

11260 Commits

Author SHA1 Message Date
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
b48a7d1e1b Workround for status errors thrown by d3-xml
Because the done callback is expecting something that has a `status` property,
(like an XHR would), we need to extract the status out of the error message.
d3-xml includes status in the error message, but we can't access the response itself.
2019-04-26 22:23:08 -04:00
Bryan Housel
b99be67169 When calling an errback from a Promise.catch, pass err.message 2019-04-25 21:58:36 -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
Bryan Housel
e6bc9d9e8f Swap out d3-request, swap in d3-fetch 2019-04-24 16:25:25 -04:00
Bryan Housel
48b1ddc925 Rename fetch to fetchComboData to not conflict with fetch API 2019-04-24 16:24:36 -04:00
Bryan Housel
b6cd13508a Add abortcontroller-polyfill to support abortable fetch calls 2019-04-24 16:24:13 -04:00
Bryan Housel
f72fd961cc Update to d3 ~5.9.2 2019-04-24 10:52:28 -04:00
Bryan Housel
862eca9ddd Update shortcut screen straighten text too 2019-04-24 01:58:19 -04: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
Quincy Morgan
bc3353d386 Merge pull request #6234 from openstreetmap/unsquare-buildings-warning
Add validation warning for unsquare buildings
2019-04-23 16:16:26 -07:00
Quincy Morgan
d1cd07e588 Add Name and Operator fields to the Car Wash preset (close #6233) 2019-04-23 15:56:36 -07:00
Quincy Morgan
34fcd01f98 Add validation warning for unsquare buildings 2019-04-23 15:50:52 -07:00
Bryan Housel
a37ce90af7 Move "Fix All" from bottom of list to top 2019-04-23 17:42:14 -04:00
Quincy Morgan
4948474118 Set the default validation filters to be My Edits / Everywhere (re: #6223) 2019-04-23 10:34:10 -07:00
Bryan Housel
82f1b2542d Less top padding 2019-04-23 13:03:36 -04:00
Bryan Housel
7e04175559 Add Enable All / Disable All validation rules links
(closes #5986)
2019-04-23 13:01:15 -04:00
Quincy Morgan
b546b09388 Tweak issues CSS 2019-04-23 09:40:53 -07:00
Bryan Housel
1d4770a3c6 Merge pull request #6211 from AndreasHae/feature/split-multiple-tags
Handle multiple tags when splitting up in tag editor
2019-04-23 11:05:03 -04:00
Bryan Housel
fb3d6746a1 Move covered from moreFields to fields for all service roads
(I find myself using this a lot now that we warn about crossing building-way)
2019-04-23 10:26:46 -04:00
Bryan Housel
75657e87a2 Update rollup-plugin-node-resolve mainFields option
Eliminates warnings about the deprecated options
2019-04-23 09:53:30 -04:00
greenkeeper[bot]
a399d0338c chore(package): update rollup to version 1.10.1 2019-04-23 09:07:15 -04:00
greenkeeper[bot]
2cc5c0c72d chore(package): update sinon to version 7.3.2 2019-04-23 09:05:30 -04:00
Bryan Housel
cbce45178e Update ecstatic to the latest version
(closes #6147)
2019-04-23 09:03:37 -04:00
greenkeeper[bot]
19f668527b fix(package): update marked to version 0.6.2 2019-04-23 08:56:04 -04:00
Bryan Housel
bd2a33d845 Merge branch 'validation_and_change_perf' 2019-04-23 01:30:26 -04:00
Bryan Housel
a3bc164c43 Redraw entity editor fields on addition, deletion too
This is important to make the turn restriction editor work
2019-04-23 01:07:38 -04:00
Bryan Housel
7dce4bb161 Avoid asking DOM if layers are classed disabled in map.editable
`map.editable` is hot code because it's called frequently by the `isHiddenX`
tests in `features.js`.  It's much more efficient to just ask the osm layer
whether it is enabled, than to use D3 to find that layer in the DOM and check
whether it's classed `disabled`
2019-04-22 22:12:42 -04:00
Bryan Housel
0636401ab6 Uncramp the map panes
(Can probably find a better way to make these responsive later)
2019-04-22 21:47:42 -04:00
Bryan Housel
61da61d7fd Add missing button arg to modeDrawLine, ensure using current entities 2019-04-22 20:00:53 -04:00
Bryan Housel
3fe9d75f35 Fix issues with issue cache for entities that no longer exist 2019-04-22 19:35:23 -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
Andreas Hässler
e49fdce215 Add missing semicolons 2019-04-22 23:43:55 +02:00
Quincy Morgan
e8c5c05b29 Add preset for shop=boat 2019-04-22 09:43:04 -07:00
Quincy Morgan
742afda778 Add highway tags to addTags of slipways as lines 2019-04-22 09:21:15 -07:00
Quincy Morgan
c4e8ce60cc Update tunnel fields to use Width, Length, and Height 2019-04-22 09:06:54 -07:00
Quincy Morgan
1a5c0e88a1 Add man_made=tunnel preset (re: #6212) 2019-04-22 09:00:46 -07:00
Quincy Morgan
7e74c56313 Split track presets into point/way variants to avoid adding highway tags to nodes 2019-04-22 08:51:27 -07:00
Andreas Hässler
2596b97dbc Do not use ES6 features 2019-04-22 16:38:33 +02:00
Andreas Hässler
faa178797d Handle multiple tags when splitting up 2019-04-22 16:22:59 +02:00
Bryan Housel
e4fc821eb0 Just use reduce 2019-04-22 09:49:17 -04:00
Bryan Housel
3557e3c711 Don't allow disconnecting a way if parts extend to undownloaded tiles
(re: #2248, #4245)
2019-04-20 00:02:46 -04:00
Bryan Housel
bbf4495f5c pacify eslint 2019-04-19 23:44:49 -04:00
Bryan Housel
7c85cc997e Merge branch 'master' into validation_and_change_perf 2019-04-19 22:44:04 -04:00
Bryan Housel
860454d982 Show "Unknown" for opening hours placeholder
(closes #6207)
2019-04-19 19:55:24 -04:00
Quincy Morgan
b566ef05b5 Add Option+W shortcut to toggle the OSM data layer (close #6104) 2019-04-19 14:51:53 -07:00
Quincy Morgan
c2b13357bb Improve the order of property descriptions in the preset documentation and clarify some of the descriptions 2019-04-19 14:12:10 -07:00