-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from developmentseed/edit-workflow-tests
Edit workflow tests
- Loading branch information
Showing
8 changed files
with
193,450 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,216 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`test async edit actions should UPLOAD_EDITS 1`] = ` | ||
Array [ | ||
Object { | ||
"edit": Object { | ||
"comment": "Test", | ||
"errors": Array [], | ||
"id": "node/observe-vfxnxtmo20j", | ||
"newFeature": Object { | ||
"geometry": Object { | ||
"coordinates": Array [ | ||
-77.02937206507221, | ||
38.89497324828185, | ||
], | ||
"type": "Point", | ||
}, | ||
"id": "node/observe-vfxnxtmo20j", | ||
"properties": Object { | ||
"building": "yes", | ||
"icon": "maki_marker", | ||
"id": "node/observe-vfxnxtmo20j", | ||
"name": "Test", | ||
"version": 1, | ||
}, | ||
"type": "Feature", | ||
}, | ||
"oldFeature": null, | ||
"status": "pending", | ||
"timestamp": 1562325975841, | ||
"type": "create", | ||
}, | ||
"type": "EDIT_UPLOAD_STARTED", | ||
}, | ||
Object { | ||
"changesetId": "1", | ||
"edit": Object { | ||
"comment": "Test", | ||
"errors": Array [], | ||
"id": "node/observe-vfxnxtmo20j", | ||
"newFeature": Object { | ||
"geometry": Object { | ||
"coordinates": Array [ | ||
-77.02937206507221, | ||
38.89497324828185, | ||
], | ||
"type": "Point", | ||
}, | ||
"id": "node/observe-vfxnxtmo20j", | ||
"properties": Object { | ||
"building": "yes", | ||
"icon": "maki_marker", | ||
"id": "node/observe-vfxnxtmo20j", | ||
"name": "Test", | ||
"version": 1, | ||
}, | ||
"type": "Feature", | ||
}, | ||
"oldFeature": null, | ||
"status": "pending", | ||
"timestamp": 1562325975841, | ||
"type": "create", | ||
}, | ||
"timestamp": 1000, | ||
"type": "EDIT_UPLOADED", | ||
}, | ||
Object { | ||
"offline": false, | ||
"tile": "0320100322313223", | ||
"type": "REQUESTED_TILE", | ||
}, | ||
Object { | ||
"tile": "0320100322313223", | ||
"type": "LOADING_DATA_FOR_TILE", | ||
}, | ||
Object { | ||
"offline": false, | ||
"tile": "0320100322313223", | ||
"type": "LOADED_DATA_FOR_TILE", | ||
}, | ||
Object { | ||
"type": "UPDATE_VISIBLE_BOUNDS", | ||
"visibleBounds": Array [ | ||
Array [ | ||
-77.02886915086447, | ||
38.8957164152211, | ||
], | ||
Array [ | ||
-77.02987497924005, | ||
38.8942300735456, | ||
], | ||
], | ||
"zoom": 18, | ||
}, | ||
Object { | ||
"offline": false, | ||
"tile": "0320100322313221", | ||
"type": "REQUESTED_TILE", | ||
}, | ||
Object { | ||
"offline": false, | ||
"tile": "0320100322313223", | ||
"type": "REQUESTED_TILE", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`test async edit actions should raise VersionMismatchError 1`] = ` | ||
Array [ | ||
Object { | ||
"edit": Object { | ||
"comment": "Test", | ||
"errors": Array [], | ||
"id": "node/1", | ||
"newFeature": Object { | ||
"geometry": Object { | ||
"coordinates": Array [ | ||
-77.02937206507221, | ||
38.89497324828185, | ||
], | ||
"type": "Point", | ||
}, | ||
"id": "node/1", | ||
"properties": Object { | ||
"building": "yes", | ||
"icon": "maki_marker", | ||
"id": "node/1", | ||
"name": "Test", | ||
"version": 1, | ||
}, | ||
"type": "Feature", | ||
}, | ||
"oldFeature": Object { | ||
"geometry": Object { | ||
"coordinates": Array [ | ||
-77.02937206507221, | ||
38.89497324828185, | ||
], | ||
"type": "Point", | ||
}, | ||
"id": "node/1", | ||
"properties": Object { | ||
"building": "house", | ||
"icon": "maki_marker", | ||
"id": "node/1", | ||
"name": "Test", | ||
"version": 1, | ||
}, | ||
"type": "Feature", | ||
}, | ||
"status": "pending", | ||
"timestamp": 1562325975841, | ||
"type": "modify", | ||
}, | ||
"type": "EDIT_UPLOAD_STARTED", | ||
}, | ||
Object { | ||
"level": "error", | ||
"message": "Upload failed", | ||
"type": "SET_NOTIFICATION", | ||
}, | ||
Object { | ||
"edit": Object { | ||
"comment": "Test", | ||
"errors": Array [], | ||
"id": "node/1", | ||
"newFeature": Object { | ||
"geometry": Object { | ||
"coordinates": Array [ | ||
-77.02937206507221, | ||
38.89497324828185, | ||
], | ||
"type": "Point", | ||
}, | ||
"id": "node/1", | ||
"properties": Object { | ||
"building": "yes", | ||
"icon": "maki_marker", | ||
"id": "node/1", | ||
"name": "Test", | ||
"version": 1, | ||
}, | ||
"type": "Feature", | ||
}, | ||
"oldFeature": Object { | ||
"geometry": Object { | ||
"coordinates": Array [ | ||
-77.02937206507221, | ||
38.89497324828185, | ||
], | ||
"type": "Point", | ||
}, | ||
"id": "node/1", | ||
"properties": Object { | ||
"building": "house", | ||
"icon": "maki_marker", | ||
"id": "node/1", | ||
"name": "Test", | ||
"version": 1, | ||
}, | ||
"type": "Feature", | ||
}, | ||
"status": "pending", | ||
"timestamp": 1562325975841, | ||
"type": "modify", | ||
}, | ||
"error": Object { | ||
"code": "VersionMismatchError", | ||
"extra": "Version mismatch: Provided 1, server had: 2 of Node 1", | ||
"message": "This feature has been updated since you edited it", | ||
"retryable": false, | ||
}, | ||
"type": "EDIT_UPLOAD_FAILED", | ||
}, | ||
] | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<diffResult version="0.6" generator="CGImap 0.7.5 (31866 errol.openstreetmap.org)" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/"> | ||
<node old_id="-1" new_id="4318103827" new_version="1"/> | ||
</diffResult> |
Oops, something went wrong.