-
Notifications
You must be signed in to change notification settings - Fork 410
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
#9241 profile en long #9242
#9241 profile en long #9242
Changes from all commits
e7d1db3
656e54d
749130f
6cc17b7
4862031
99802b0
df18a37
05924e8
7ec23f3
844a7d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,6 +144,7 @@ | |
"@turf/convex": "6.5.0", | ||
"@turf/difference": "6.5.0", | ||
"@turf/great-circle": "5.1.5", | ||
"@turf/helpers": "6.5.0", | ||
"@turf/inside": "4.1.0", | ||
"@turf/line-intersect": "4.1.0", | ||
"@turf/point-on-surface": "4.1.0", | ||
|
@@ -173,6 +174,7 @@ | |
"draft-js-plugins-editor": "2.1.1", | ||
"draft-js-side-toolbar-plugin": "3.0.1", | ||
"draftjs-to-html": "0.8.4", | ||
"dxf-parser": "1.1.2", | ||
"element-closest": "2.0.2", | ||
"embed-video": "2.0.4", | ||
"es6-object-assign": "1.1.0", | ||
|
@@ -184,6 +186,7 @@ | |
"git-revision-webpack-plugin": "5.0.0", | ||
"history": "4.6.1", | ||
"html-to-draftjs": "npm:@geosolutions/[email protected]", | ||
"html-to-image": "1.11.11", | ||
"html2canvas": "0.5.0-beta4", | ||
"immutable": "4.0.0-rc.12", | ||
"intersection-observer": "0.7.0", | ||
|
@@ -217,6 +220,7 @@ | |
"object-fit-images": "3.2.4", | ||
"ogc-schemas": "2.6.1", | ||
"ol": "5.3.0", | ||
"pdfmake": "0.2.7", | ||
"pdfviewer": "0.3.2", | ||
"plotly.js-cartesian-dist": "2.5.1", | ||
"prop-types": "15.7.2", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@mapstore/eslint-config-mapstore", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"private": false, | ||
"description": "ESLint Configuration for MapStore project", | ||
"author": "GeoSolutions S.a.s.", | ||
|
@@ -29,6 +29,6 @@ | |
"eslint": ">= 7.5.0", | ||
"eslint-plugin-import": ">= 2.20.2", | ||
"eslint-plugin-no-only-tests": ">= 2.3.1", | ||
"eslint-plugin-react": ">= 3.3.2" | ||
"eslint-plugin-react": ">= 7.31.11" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sime for this file:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. correct, going to remove |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
/* | ||
* Copyright 2022, 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. | ||
*/ | ||
import expect from "expect"; | ||
|
||
import {CONTROL_DOCK_NAME} from '../../plugins/longitudinalProfile/constants'; | ||
import {SET_CONTROL_PROPERTY} from "../controls"; | ||
import { | ||
ADD_PROFILE_DATA, | ||
addProfileData, | ||
CHANGE_DISTANCE, | ||
CHANGE_GEOMETRY, | ||
CHANGE_REFERENTIAL, | ||
changeDistance, | ||
changeGeometry, | ||
changeReferential, | ||
closeDock, | ||
initialized, | ||
INITIALIZED, | ||
loading, | ||
LOADING, | ||
openDock, | ||
setup, | ||
SETUP, | ||
TEAR_DOWN, | ||
tearDown, | ||
TOGGLE_MAXIMIZE, | ||
TOGGLE_MODE, | ||
toggleMaximize, | ||
toggleMode | ||
} from "../longitudinalProfile"; | ||
|
||
describe('Test correctness of the actions', () => { | ||
it('setup', () => { | ||
const config = {configProp1: 'example', configProp2: 'test'}; | ||
const action = setup(config); | ||
expect(action).toExist(); | ||
expect(action.type).toBe(SETUP); | ||
expect(action.config).toEqual(config); | ||
}); | ||
|
||
it('initialized', () => { | ||
const action = initialized(); | ||
expect(action).toExist(); | ||
expect(action.type).toBe(INITIALIZED); | ||
}); | ||
|
||
it('tearDown', () => { | ||
const action = tearDown(); | ||
expect(action).toExist(); | ||
expect(action.type).toBe(TEAR_DOWN); | ||
}); | ||
|
||
it('openDock', () => { | ||
const action = openDock(); | ||
expect(action).toExist(); | ||
expect(action.type).toBe(SET_CONTROL_PROPERTY); | ||
expect(action.control).toBe(CONTROL_DOCK_NAME); | ||
expect(action.property).toBe('enabled'); | ||
expect(action.value).toBe(true); | ||
}); | ||
|
||
it('closeDock', () => { | ||
const action = closeDock(); | ||
expect(action).toExist(); | ||
expect(action.type).toBe(SET_CONTROL_PROPERTY); | ||
expect(action.control).toBe(CONTROL_DOCK_NAME); | ||
expect(action.property).toBe('enabled'); | ||
expect(action.value).toBe(false); | ||
}); | ||
|
||
it('toggleMode - no mode passed', () => { | ||
const action = toggleMode(); | ||
expect(action).toExist(); | ||
expect(action.type).toBe(TOGGLE_MODE); | ||
expect(action.mode).toBe(undefined); | ||
}); | ||
|
||
it('toggleMode - mode passed', () => { | ||
const action = toggleMode('draw'); | ||
expect(action).toExist(); | ||
expect(action.type).toBe(TOGGLE_MODE); | ||
expect(action.mode).toBe('draw'); | ||
}); | ||
|
||
it('addProfileData', () => { | ||
const infos = { prop1: true, prop2: 10, prop3: 'test'}; | ||
const points = [[[1, 2, 5], [2, 3, 5]]]; | ||
const projection = 'EPSG:3857'; | ||
const action = addProfileData(infos, points, projection); | ||
expect(action).toExist(); | ||
expect(action.type).toBe(ADD_PROFILE_DATA); | ||
expect(action.infos).toEqual(infos); | ||
expect(action.points[0]).toEqual(points[0]); | ||
expect(action.points[1]).toEqual(points[1]); | ||
expect(action.projection).toEqual(projection); | ||
}); | ||
|
||
it('loading', () => { | ||
const action = loading(true); | ||
expect(action).toExist(); | ||
expect(action.type).toBe(LOADING); | ||
expect(action.state).toBe(true); | ||
}); | ||
|
||
it('changeReferential', () => { | ||
const action = changeReferential('ref2'); | ||
expect(action).toExist(); | ||
expect(action.type).toBe(CHANGE_REFERENTIAL); | ||
expect(action.referential).toBe('ref2'); | ||
}); | ||
|
||
it('changeDistance', () => { | ||
const action = changeDistance(200); | ||
expect(action).toExist(); | ||
expect(action.type).toBe(CHANGE_DISTANCE); | ||
expect(action.distance).toBe(200); | ||
}); | ||
|
||
it('changeGeometry', () => { | ||
const geometry = { point: [2, 5], center: [1, 1]}; | ||
const action = changeGeometry(geometry); | ||
expect(action).toExist(); | ||
expect(action.type).toBe(CHANGE_GEOMETRY); | ||
expect(action.geometry).toExist(); | ||
expect(action.geometry.point).toEqual([2, 5]); | ||
expect(action.geometry.center).toEqual([1, 1]); | ||
}); | ||
|
||
it('toggleMaximize', () => { | ||
const action = toggleMaximize(); | ||
expect(action).toExist(); | ||
expect(action.type).toBe(TOGGLE_MAXIMIZE); | ||
}); | ||
}); |
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.
This change seems related to a different PR #9188.
I think if we are not publishing the new package this should be removed.
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 i have to recreate my master branch to fix this
will force push without it