Commit Graph

45 Commits

Author SHA1 Message Date
Bryan Housel 62d0bc0bf5 Debounce should debounce all requests even cached, fix tests
(see https://github.com/openstreetmap/iD/pull/3975#issue-222747308)
2017-04-19 13:13:12 -04:00
Bryan Housel 1a8cfcc8b1 Changeset refactor
(closes #2633)

* move osmChangeJXON from osm service to osmChangeset
* cleanup putChangeset for code clarity
* adjust params for callbacks (pass changeset around instead of changeset_id)
* add commit.reset() to reset changeset object after successful save
* improve checks for changeset tags (trim whitespace, etc)
2017-03-15 11:03:43 -04:00
Bryan Housel d1aac857a4 Ignore server changesets with missing comment tag or empty comment 2017-03-11 14:28:30 -05:00
mstn 05e5cf9030 add type information to references 2017-03-02 11:26:14 +01:00
mstn 3205650798 order to-be-created relations by dependencies in a changeset 2017-03-02 09:17:08 +01:00
Bryan Housel d7416b2d0c Fix nominatim / geocoder test
(closes #3767)
2017-02-02 16:00:45 -05:00
Bryan Housel 94483af4c7 Fix service name nominatim -> geocoder 2017-01-17 16:46:41 +05:30
Bryan Housel a7ac44f6e8 Refactor imageryBlacklists so it can be called without triggering a GET
Previous code was problematic because we need the function to
to properly blacklist custom imagery passed in through the url hash,
before iD is completely initialized.  Triggering GET causes tests to
break because osm service testing has side effects :-/
2016-12-04 21:35:55 -05:00
Bryan Housel b9888e45e4 Add imageryBlacklists function to get blacklists from OSM API
(for #3623)
2016-12-03 19:25:07 -05:00
Bryan Housel f800e5afbc Remove unnecessary window parameter to Context 2016-11-10 15:19:03 -05:00
Bryan Housel b8be480267 Tests for loadFromAPI, esp to cover retry and dispatch behaviors 2016-11-09 17:59:07 -05:00
Bryan Housel 9845f0594e Don't rely on test side effects to init() osm service 2016-11-09 11:41:19 -05:00
Bryan Housel 16ada1f29a Better error handling for common osm api error conditions
* if 509 Bandwidth Exceeded / 429 Too Many Requests, prompt for login
(closes #2262)
* if 400 Bad Request / 401 Unauthorized / 403 Forbidden - logout and retry
(closes #3546)
2016-11-08 21:43:27 -05:00
Bryan Housel a8f12173ac Multikeys filter should allow nested names, ignore alt prefixes 2016-10-31 15:06:17 -04:00
Bryan Housel 73d7fca095 Test should logout after authenticating with test credentials 2016-10-31 15:04:46 -04:00
Bryan Housel 9ee790c1cc Don't need to pass dimensions to sublayers.. use projection.clipExtent
(the dimensions call to layers is to set width/height on svg surface element)
2016-10-30 22:40:11 -04:00
Bryan Housel b2c8f72c95 no-native-reassign -> no-global-assign 2016-10-29 14:42:04 -04:00
Bryan Housel cf11c95354 Fix Mapillary sign placement on Chrome, Safari 10 2016-10-29 00:59:51 -04:00
Bryan Housel 0066204cfa Fix tests for iD.Connection -> iD.services.osm 2016-10-25 21:33:13 -04:00
Bryan Housel b5c95af3b7 Refactor from coreConnection to serviceOsm
(closes #3497)
2016-10-19 09:25:34 -04:00
Bryan Housel 1d03414b80 Allow forced utilDetect(), useful for testing 2016-10-18 21:56:24 -04:00
Bryan Housel 053074d076 Export live binding for services in iD.services, fix init/reset
(closes #3324)

Previously we allowed devs to swap out services that they didn't need.
This became difficult now that ES6 exports are immutable bindings.
But we can wrap the immutable bindings themselves in a live object,
to get back the flexibility that we used to have.

This change also drops the `taginfo` accessor on Context, since devs who want
to swap out taginfo service with something else can now do so through the live
binding.  `iD.services.taginfo = myTaginfo()`
2016-10-14 10:38:09 -04:00
Bryan Housel c4724d7ae7 Allow network, genus, taxon, species lookups to expect uppercase values
(closes #3377)

In most cases we prefer taginfo value results with lowercase letters.
A few OSM keys expect values to contain uppercase values
This is not an exhaustive list (e.g. `name` also has uppercase values)
but these are the fields where taginfo value lookup is most useful.
2016-10-09 15:48:23 -04:00
Bryan Housel 87950fd472 Fix lib export, flatten names in tests and docs 2016-10-04 21:56:09 -04:00
Bryan Housel 482b4d7cbe mock userAgents in a way that works in both Phantom and real browsers 2016-09-09 14:59:55 -04:00
Minh Nguyễn c149ac855d Added test for taginfo roles 2016-08-03 03:47:16 -07:00
Minh Nguyễn 7abf2870fe Test uppercase network suggestions (#3296) 2016-07-31 23:23:12 -04:00
Bryan Housel 7ca6d06254 Replace iD global with iD.Context() module (#3254) 2016-07-19 10:15:32 -04:00
Kushan Joshi fc680a2e9a external modules for services 2016-07-06 14:39:58 -04:00
Bryan Housel 5e6a1bdee5 Fix rbush tests.. Disable tests that fail because of sinon.spy issue 2016-07-02 21:59:36 -04:00
Bryan Housel 03558c7e40 Bump dependencies, fix tests
(commented out 2 failing tests in mapillary service related to sinon spy)
2016-06-25 00:50:20 -04:00
Kushan Joshi 3f3b287d62 Remove linting errors spec/services 2016-06-15 18:26:11 +05:30
Bryan Housel e364b7ec30 Show loading spinner in loadchanged, update selection in nodechanged 2016-05-31 17:16:17 -04:00
Bryan Housel e57914d77e WIP: preload viewer when layer enabled, still bad issues with slow load timing 2016-05-30 03:20:43 -04:00
Bryan Housel a99f54b83b WIP: simplify code, attempt to preload viewer 2016-05-29 15:00:46 -04:00
Bryan Housel 2b514b831b Fix taginfo test - parse error, reset cache between tests 2016-05-16 11:58:46 -04:00
Bryan Housel 03bb916287 Adjust taginfo values filtering, update tests 2016-04-28 16:59:12 -04:00
Bryan Housel 25862f35e7 Add multikeys taginfo function, filter out values with ';' 2016-04-26 19:37:15 -04:00
Bryan Housel 1e97135245 Update tests for mapillary service, blacklist Null Island data 2016-04-10 16:01:59 -04:00
Bryan Housel 5122d1b64f Update taginfo tests to include title properties.
(see a77e1b6)
2016-04-09 00:01:45 -04:00
Bryan Housel 0a238dbfcc Load traffico stylesheet dynamically 2016-02-17 12:03:51 -05:00
Bryan Housel 3ad9c29a35 Add test coverage for mapillary service 2016-02-16 15:59:28 -05:00
Bryan Housel f173441fe3 WIP: Mapillary service 2016-02-08 15:46:37 -05:00
Bryan Housel a083ae3001 Call service reset functions from iD.flush()
Also fix misspelling nominatum -> nominatim
2016-02-08 12:02:57 -05:00
Bryan Housel 3e65156754 Refactor services 2016-02-08 10:31:34 -05:00