From bc417d9d9bf11cb28fcd9093ccb977730432cce9 Mon Sep 17 00:00:00 2001 From: Alexander Fedyashov Date: Tue, 10 Oct 2017 09:34:35 +0300 Subject: [PATCH] chore(package): update to react 16 (#2131) * chore(package): update to react 16 * test(Responsive): fix broken test * test(Transition): fix broken tests * chore(config): fix definition of process.env * chore(package): update chai-enzyme and enzyme * chore(package): temporialy disable satisfied * docs(react): use prop-types, update CDN urls * test(Tab): fix broken tests * test(Rating): fix broken tests and minor refactor * test(Checkbox): fix broken tests * test(Accordion): fix broken tests * test(Search): fix broken tests * test(Search): revert changes * test(setup): set disableLifecycleMethods globally * test(Sticky): fix broken tests * test(Search): fix broken tests * test(Dropdown): fix broken tests * docs(Popup): fix broken example * chore(package): update `react-ace`, reenable `satisfied` --- config.js | 6 +- docs/app/Components/LayoutsLayout.js | 3 +- .../modules/Popup/Types/PopupExampleTitled.js | 8 +- docs/app/index.ejs | 8 +- package.json | 16 +- test/setup.js | 8 +- .../addons/Responsive/Responsive-test.js | 2 +- .../Accordion/AccordionAccordion-test.js | 85 +++- test/specs/modules/Checkbox/Checkbox-test.js | 56 ++- test/specs/modules/Dropdown/Dropdown-test.js | 123 +++--- test/specs/modules/Rating/Rating-test.js | 206 +++++---- test/specs/modules/Search/Search-test.js | 4 + test/specs/modules/Sticky/Sticky-test.js | 26 +- test/specs/modules/Tab/Tab-test.js | 8 +- .../Transition/TransitionGroup-test.js | 4 +- yarn.lock | 395 +++++++----------- 16 files changed, 511 insertions(+), 447 deletions(-) diff --git a/config.js b/config.js index 957b329f61..81090e8978 100644 --- a/config.js +++ b/config.js @@ -53,10 +53,8 @@ const config = { // ---------------------------------- compiler_devtool: (__DEV__ || __TEST__) && 'cheap-source-map', compiler_globals: { - process: { - env: { - NODE_ENV: JSON.stringify(env), - }, + 'process.env': { + NODE_ENV: JSON.stringify(env), }, __DEV__, __PATH_SEP__: JSON.stringify(path.sep), diff --git a/docs/app/Components/LayoutsLayout.js b/docs/app/Components/LayoutsLayout.js index 32a98cb17e..27eec3b8c1 100644 --- a/docs/app/Components/LayoutsLayout.js +++ b/docs/app/Components/LayoutsLayout.js @@ -1,5 +1,6 @@ import _ from 'lodash' -import React, { Component, PropTypes } from 'react' +import PropTypes from 'prop-types' +import React, { Component } from 'react' import { NavLink, Route } from 'react-router-dom' import { Button } from 'src' diff --git a/docs/app/Examples/modules/Popup/Types/PopupExampleTitled.js b/docs/app/Examples/modules/Popup/Types/PopupExampleTitled.js index ee3abbff99..f9677e37f8 100644 --- a/docs/app/Examples/modules/Popup/Types/PopupExampleTitled.js +++ b/docs/app/Examples/modules/Popup/Types/PopupExampleTitled.js @@ -18,13 +18,17 @@ const users = [ avatar: '/assets/images/avatar/small/matt.jpg', }, ] - +/* TODO: Remove
wrapper after all our components will be classes */ const PopupExampleTitled = () => (
{users.map(user => ( } + trigger={( +
+ +
+ )} header={user.name} content={user.bio} /> diff --git a/docs/app/index.ejs b/docs/app/index.ejs index 5a472dceac..2502a02b56 100644 --- a/docs/app/index.ejs +++ b/docs/app/index.ejs @@ -69,10 +69,10 @@ - - - - + + + +