Skip to content
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

Fixes #934: react migrated to 15.4.2 #1499

Merged
merged 1 commit into from
Feb 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
"ncp": "2.0.0",
"parallelshell": "1.2.0",
"raw-loader": "0.5.1",
"react-addons-css-transition-group": "0.14.8",
"react-addons-test-utils": "0.14.8",
"react-hot-loader": "1.3.0",
"react-addons-css-transition-group": "15.4.2",
"react-addons-test-utils": "15.4.2",
"react-hot-loader": "1.3.1",
"react-motion": "0.4.4",
"react-router": "2.4.0",
"react-router-redux": "2.1.0",
Expand Down Expand Up @@ -100,23 +100,23 @@
"lodash.castarray": "4.4.0",
"moment": "2.13.0",
"node-uuid": "1.4.3",
"object-assign": "3.0.0",
"object-assign": "4.1.1",
"ogc-schemas": "2.6.1",
"openlayers": "3.15.1",
"pdfviewer": "0.3.2",
"proj4": "2.3.14",
"qrcode.react": "0.6.1",
"react": "0.14.8",
"react-addons-shallow-compare": "0.14.8",
"react": "15.4.2",
"react-addons-shallow-compare": "15.4.2",
"react-bootstrap": "0.28.1",
"react-codemirror": "0.2.6",
"react-color": "2.4.0",
"react-confirm-button": "0.0.2",
"react-copy-to-clipboard": "4.1.0",
"react-dnd": "2.1.3",
"react-dnd-html5-backend": "2.1.2",
"react-dnd": "2.2.3",
"react-dnd-html5-backend": "2.2.3",
"react-dock": "0.2.3",
"react-dom": "0.14.8",
"react-dom": "15.4.2",
"react-draggable": "1.3.4",
"react-dropzone": "3.4.0",
"react-intl": "2.2.3",
Expand All @@ -129,10 +129,10 @@
"react-selectize": "2.0.3",
"react-share": "1.8.0",
"react-sidebar": "2.1.2",
"react-sortable-items": "0.0.12",
"react-sortable-items": "https://github.com/geosolutions-it/react-sortable-items/tarball/react15",
"react-spinkit": "1.1.6",
"react-swipeable-views": "0.6.3",
"react-widgets": "3.1.7",
"react-widgets": "3.4.6",
"redux": "3.6.0",
"redux-logger": "2.6.1",
"redux-observable": "0.13.0",
Expand Down
2 changes: 1 addition & 1 deletion web/client/components/I18N/Localized.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Localized = React.createClass({
render() {
let { children } = this.props;

if (this.props.messages) {
if (this.props.messages && this.props.locale) {
if (typeof children === 'function') {
children = children();
}
Expand Down
2 changes: 1 addition & 1 deletion web/client/components/I18N/__tests__/18N.HTML-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
var expect = require('expect');

var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');
var I18N = require('../I18N');
var Localized = require('../Localized');
Expand Down
2 changes: 1 addition & 1 deletion web/client/components/I18N/__tests__/FlagButton-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
var expect = require('expect');

var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');
var FlagButton = require('../FlagButton');

Expand Down
5 changes: 3 additions & 2 deletions web/client/components/I18N/__tests__/LangBar-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
*/
var expect = require('expect');

var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');
var LangBar = require('../LangBar');
var LocaleUtils = require('../../../utils/LocaleUtils');
const TestUtils = require('react-addons-test-utils');

describe('LangBar', () => {
beforeEach((done) => {
Expand Down Expand Up @@ -45,7 +46,7 @@ describe('LangBar', () => {
const select = cmpDom.getElementsByTagName("button").item(0);

select.value = "it-IT";
React.addons.TestUtils.Simulate.click(select, {target: {value: 'it-IT'}});
TestUtils.Simulate.click(select, {target: {value: 'it-IT'}});
// select.children[1].click();

expect(newLang).toBe('it-IT');
Expand Down
5 changes: 3 additions & 2 deletions web/client/components/I18N/__tests__/LangSelector-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
*/
var expect = require('expect');

var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');
var LangSelector = require('../LangSelector');
const TestUtils = require('react-addons-test-utils');

describe('LangSelector', () => {
beforeEach((done) => {
Expand Down Expand Up @@ -53,7 +54,7 @@ describe('LangSelector', () => {
const select = cmpDom.getElementsByTagName("select").item(0);

select.value = "it-IT";
React.addons.TestUtils.Simulate.change(select, {target: {value: 'it-IT'}});
TestUtils.Simulate.change(select, {target: {value: 'it-IT'}});
// select.children[1].click();

expect(newLang).toBe('it-IT');
Expand Down
2 changes: 1 addition & 1 deletion web/client/components/I18N/__tests__/Localized-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
var expect = require('expect');

var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');
var Localized = require('../Localized');
var Message = require('../Message');
Expand Down
5 changes: 2 additions & 3 deletions web/client/components/TOC/__tests__/DefaultGroup-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* LICENSE file in the root directory of this source tree.
*/

var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');
var Group = require('../DefaultGroup');

Expand Down Expand Up @@ -51,12 +51,11 @@ describe('test Group module component', () => {

const domNode = ReactDOM.findDOMNode(comp);
expect(domNode).toExist();

const children = domNode.children;
expect(children.length).toBe(2);

const container = children.item(0);
expect(container.children.length).toBe(2);
expect(container.children.length).toBe(1);
});

it('test Group creation with filter', () => {
Expand Down
6 changes: 3 additions & 3 deletions web/client/components/TOC/__tests__/DefaultLayer-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
* LICENSE file in the root directory of this source tree.
*/

var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');
var Layer = require('../DefaultLayer');
// var ConfirmButton = require('../../buttons/ConfirmButton');
var expect = require('expect');

const TestUtils = React.addons.TestUtils;
const TestUtils = require('react-addons-test-utils');

describe('test DefaultLayer module component', () => {
beforeEach((done) => {
Expand Down Expand Up @@ -104,7 +104,7 @@ describe('test DefaultLayer module component', () => {
expect(checkbox).toExist();

checkbox.checked = !l.visibility;
React.addons.TestUtils.Simulate.change(checkbox, {
TestUtils.Simulate.change(checkbox, {
target: {
checked: !l.visibility
}
Expand Down
2 changes: 1 addition & 1 deletion web/client/components/TOC/__tests__/Node-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* LICENSE file in the root directory of this source tree.
*/

var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');
var Node = require('../Node');

Expand Down
2 changes: 1 addition & 1 deletion web/client/components/TOC/__tests__/TOC-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

var expect = require('expect');
var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');

var TOC = require('../TOC');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
*/
var expect = require('expect');

var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');
var BackgroundSwitcher = require('../BackgroundSwitcher');
var {Thumbnail} = require('react-bootstrap');

const TestUtils = require('react-addons-test-utils');

describe("test the BakckgroundSwitcher", () => {
beforeEach((done) => {
document.body.innerHTML = '<div id="container"></div>';
Expand Down Expand Up @@ -53,7 +55,6 @@ describe("test the BakckgroundSwitcher", () => {
});

it('test select handler', () => {
var TestUtils = React.addons.TestUtils;
const testHandlers = {
propertiesChangeHandler: (pressed) => {return pressed; }
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* LICENSE file in the root directory of this source tree.
*/

var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');
var GroupChildren = require('../GroupChildren');
var Node = require('../../Node');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* LICENSE file in the root directory of this source tree.
*/

var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');
var WMSLegend = require('../WMSLegend');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
*/
var expect = require('expect');

var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');
var Legend = require('../Legend');

const TestUtils = require('react-addons-test-utils');

describe("test the Layer legend", () => {
beforeEach((done) => {
document.body.innerHTML = '<div id="container"></div>';
Expand Down Expand Up @@ -44,7 +46,6 @@ describe("test the Layer legend", () => {
});

it('test legend content', () => {
var TestUtils = React.addons.TestUtils;
let layer = {
"type": "wms",
"url": "http://test2/reflector/open/service",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* LICENSE file in the root directory of this source tree.
*/

var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');
var ReactTestUtils = require('react-addons-test-utils');
var Display = require('../Display');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* LICENSE file in the root directory of this source tree.
*/

var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');
var ReactTestUtils = require('react-addons-test-utils');
var General = require('../General');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* LICENSE file in the root directory of this source tree.
*/

var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');
var ReactTestUtils = require('react-addons-test-utils');
var WMSStyle = require('../WMSStyle');
Expand Down
2 changes: 1 addition & 1 deletion web/client/components/app/StandardRouter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const StandardRouter = React.createClass({
getDefaultProps() {
return {
plugins: {},
locale: {messages: {}, current: ''},
locale: {messages: {}, current: 'en-US'},
pages: []
};
},
Expand Down
2 changes: 1 addition & 1 deletion web/client/components/app/__tests__/StandardApp-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* LICENSE file in the root directory of this source tree.
*/
const expect = require('expect');
const React = require('react/addons');
const React = require('react');
const ReactDOM = require('react-dom');

const StandardApp = require('../StandardApp');
Expand Down
3 changes: 1 addition & 2 deletions web/client/components/app/__tests__/StandardRouter-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* LICENSE file in the root directory of this source tree.
*/
const expect = require('expect');
const React = require('react/addons');
const React = require('react');
const ReactDOM = require('react-dom');
const {Provider} = require('react-redux');

Expand Down Expand Up @@ -65,7 +65,6 @@ describe('StandardApp', () => {
}];
const app = ReactDOM.render(<Provider store={store}><StandardRouter pages={pages}/></Provider>, document.getElementById("container"));
expect(app).toExist();

const dom = ReactDOM.findDOMNode(app);

expect(dom.getElementsByClassName('mycomponent').length).toBe(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* LICENSE file in the root directory of this source tree.
*/
var expect = require('expect');
var React = require('react/addons');
var React = require('react');
var ReactDOM = require('react-dom');

var ImageButton = require('../ImageButton');
Expand Down
Loading