-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented Feature Editor Plugin #2064
Merged
offtherailz
merged 14 commits into
geosolutions-it:master
from
offtherailz:featureeditor
Jul 31, 2017
Merged
Changes from 3 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8777146
Implemented Feature Editor Plugin
offtherailz 9372135
added test for leaflet drawsupport
MV88 a9f326e
minor fixes on grid editor.
offtherailz 5f2082f
removed unused import. Fixed grid example
offtherailz e9d24c7
Merge branch 'master' into featureeditor
offtherailz 4203bf7
Merge branch 'featureeditor' of github.com:offtherailz/MapStore2 into…
offtherailz 592b78c
Highlight minor fixes and improvements (#23)
MV88 d193db5
improvements to example. Fixes to the tests
offtherailz f6ac6f2
minor typos and other fixes
offtherailz bf0531d
improved action names and reduced epics complexity
offtherailz 4c565b6
disable plugins in edit mode
offtherailz 3de53b6
updated example with editable data
offtherailz c2a40be
Added new styles on feature grid (#24)
allyoucanmap 4e5711f
fixed example zoom level
offtherailz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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,104 @@ | ||
/* | ||
* Copyright 2017, GeoSolutions Sas. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
var expect = require('expect'); | ||
var { | ||
LAYER_SELECTED_FOR_SEARCH, | ||
FEATURE_TYPE_SELECTED, | ||
FEATURE_TYPE_ERROR, | ||
FEATURE_LOADING, | ||
FEATURE_LOADED, | ||
FEATURE_ERROR, | ||
QUERY_RESULT, | ||
QUERY_ERROR, | ||
QUERY_CREATE, | ||
QUERY, | ||
RESET_QUERY, | ||
FEATURE_CLOSE, | ||
layerSelectedForSearch, | ||
featureTypeSelected, | ||
featureTypeError, | ||
featureLoading, | ||
featureLoaded, | ||
featureError, | ||
querySearchResponse, | ||
queryError, | ||
createQuery, | ||
query, | ||
resetQuery, | ||
featureClose | ||
} = require('../wfsquery'); | ||
|
||
describe('wfsquery actions', () => { | ||
it('layerSelectedForSearch', () => { | ||
let {type, id} = layerSelectedForSearch(1); | ||
expect(type).toBe(LAYER_SELECTED_FOR_SEARCH); | ||
expect(id).toBe(1); | ||
}); | ||
it('featureTypeSelected', () => { | ||
let {type, url, typeName} = featureTypeSelected("/geoserver/", "topp:states"); | ||
expect(type).toBe(FEATURE_TYPE_SELECTED); | ||
expect(url).toBe("/geoserver/"); | ||
expect(typeName).toBe("topp:states"); | ||
}); | ||
it('featureTypeError', () => { | ||
let {type, error, typeName} = featureTypeError("topp:states", "ERROR"); | ||
expect(type).toBe(FEATURE_TYPE_ERROR); | ||
expect(error).toBe("ERROR"); | ||
expect(typeName).toBe("topp:states"); | ||
}); | ||
it('featureLoading', () => { | ||
let {type, isLoading} = featureLoading(true); | ||
expect(type).toBe(FEATURE_LOADING); | ||
expect(isLoading).toBe(true); | ||
}); | ||
it('featureLoaded', () => { | ||
let {type, typeName, feature} = featureLoaded("topp:states", "feature"); | ||
expect(type).toBe(FEATURE_LOADED); | ||
expect(typeName).toBe("topp:states"); | ||
expect(feature).toBe(feature); | ||
}); | ||
it('featureError', () => { | ||
let {type, typeName, error} = featureError("topp:states", "ERROR"); | ||
expect(type).toBe(FEATURE_ERROR); | ||
expect(typeName).toBe("topp:states"); | ||
expect(error).toBe("ERROR"); | ||
}); | ||
it('querySearchResponse', () => { | ||
let {type, result, searchUrl, filterObj} = querySearchResponse("result", "searchUrl", "filterObj"); | ||
expect(type).toBe(QUERY_RESULT); | ||
expect(result).toBe("result"); | ||
expect(searchUrl).toBe("searchUrl"); | ||
expect(filterObj).toBe("filterObj"); | ||
}); | ||
it('queryError', () => { | ||
let {type, error} = queryError("ERROR"); | ||
expect(type).toBe(QUERY_ERROR); | ||
expect(error).toBe("ERROR"); | ||
}); | ||
it('createQuery', () => { | ||
let {type, searchUrl, filterObj} = createQuery("searchUrl", "filterObj"); | ||
expect(type).toBe(QUERY_CREATE); | ||
expect(searchUrl).toBe("searchUrl"); | ||
expect(filterObj).toBe("filterObj"); | ||
}); | ||
it('query', () => { | ||
let {type, searchUrl, filterObj} = query("searchUrl", "filterObj"); | ||
expect(type).toBe(QUERY); | ||
expect(searchUrl).toBe("searchUrl"); | ||
expect(filterObj).toBe("filterObj"); | ||
}); | ||
it('resetQuery', () => { | ||
let {type} = resetQuery(); | ||
expect(type).toBe(RESET_QUERY); | ||
}); | ||
it('featureClose', () => { | ||
let {type} = featureClose(); | ||
expect(type).toBe(FEATURE_CLOSE); | ||
}); | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove ^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove react-data-grid-addons at all. It is not used anymore.