diff --git a/package.json b/package.json
index 07182be59..6219da89b 100644
--- a/package.json
+++ b/package.json
@@ -42,7 +42,7 @@
"cozy-jobs-cli": "1.13.6",
"cozy-scripts": "1.13.2",
"enzyme": "3.11.0",
- "enzyme-adapter-react-16": "1.15.2",
+ "enzyme-adapter-react-16": "1.15.3",
"enzyme-to-json": "3.5.0",
"eslint-config-cozy-app": "1.1.9",
"eslint-config-prettier": "6.11.0",
@@ -51,7 +51,8 @@
"jest-environment-jsdom-sixteen": "1.0.3",
"mockdate": "3.0.2",
"pretty-quick": "1.11.1",
- "react-dom": "16.13.0",
+ "react-dom": "16.13.1",
+ "react-redux-test": "npm:react-redux@5.1.1",
"replace": "1.2.0",
"stylint": "2.0.0"
},
@@ -60,7 +61,7 @@
"@testing-library/react": "10.4.3",
"classnames": "2.2.6",
"cozy-bar": "7.9.0",
- "cozy-client": "13.20.0",
+ "cozy-client": "13.20.2",
"cozy-doctypes": "1.72.2",
"cozy-flags": "1.10.0",
"cozy-logger": "1.6.0",
@@ -74,7 +75,7 @@
"react-final-form": "3.6.7",
"react-final-form-arrays": "1.1.0",
"react-hot-loader": "4.12.20",
- "react-redux": "5.1.1",
+ "react-redux": "7.2.1",
"redux": "4.0.4",
"redux-logger": "3.0.6",
"redux-thunk": "2.3.0",
diff --git a/src/components/Selection/selection.spec.jsx b/src/components/Selection/selection.spec.jsx
index 56c3e3311..c9601241d 100644
--- a/src/components/Selection/selection.spec.jsx
+++ b/src/components/Selection/selection.spec.jsx
@@ -3,14 +3,18 @@ import PropTypes from 'prop-types'
import { shallow } from 'enzyme'
import selectionContainer from './selectionContainer'
import AppLike from '../../tests/Applike'
-const DummyComponent = ({ title = '' }) =>
-const DummyComponentWithSelection = selectionContainer(DummyComponent)
import configureStore from '../../store/configureStore'
import getCozyClient from '../../tests/client'
+const DummyComponent = ({ title = '' }) =>
DummyComponent.propTypes = {
title: PropTypes.string
}
+const DummyComponentWithSelection = selectionContainer(DummyComponent)
+
+// Uses a different version of react-redux
+// to prevent Enzyme's incompatibility with actual react-redux version
+jest.mock('react-redux', () => require('react-redux-test'))
describe('A component with selection', () => {
let testedComponent
diff --git a/src/targets/browser/index.jsx b/src/targets/browser/index.jsx
index 7fe5e6a0b..22e4e8411 100644
--- a/src/targets/browser/index.jsx
+++ b/src/targets/browser/index.jsx
@@ -4,6 +4,7 @@ import 'styles'
import React from 'react'
import CozyClient, { CozyProvider } from 'cozy-client'
+import { Provider } from 'react-redux'
import { render } from 'react-dom'
import { I18n, initTranslation } from 'cozy-ui/transpiled/react/I18n'
import App from 'components/App'
@@ -14,13 +15,15 @@ import manifest from '../../../manifest.webapp'
import MuiCozyTheme from 'cozy-ui/transpiled/react/MuiCozyTheme'
const RootApp = props => (
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
)
const HotedApp = hot(module)(App)
diff --git a/yarn.lock b/yarn.lock
index 164b059a3..d725bf56b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3698,7 +3698,29 @@ cozy-client@13.15.0:
sift "^6.0.0"
url-search-params-polyfill "^7.0.0"
-cozy-client@13.20.0, cozy-client@^13.13.0, cozy-client@^13.6.0:
+cozy-client@13.20.2:
+ version "13.20.2"
+ resolved "https://registry.yarnpkg.com/cozy-client/-/cozy-client-13.20.2.tgz#1fd1e813815450fda1eee757f7999f6b8d2ae00c"
+ integrity sha512-FdrwNTykWnHuhfcwmgo7cQYRE4mWHJU0knrR18Wnvs3jRDbzw49FQURQJIPT6lNe+Y49+q8c2DEO6vCWnzQPCA==
+ dependencies:
+ btoa "^1.2.1"
+ cozy-device-helper "^1.7.3"
+ cozy-logger "^1.6.0"
+ cozy-stack-client "^13.20.2"
+ isomorphic-fetch "^2.2.1"
+ lodash "^4.17.13"
+ microee "^0.0.6"
+ minilog "https://github.com/cozy/minilog.git#master"
+ open "^7.0.2"
+ prop-types "^15.6.2"
+ react-redux "^7.2.0"
+ redux "^3.7.2"
+ redux-thunk "^2.3.0"
+ server-destroy "^1.0.1"
+ sift "^6.0.0"
+ url-search-params-polyfill "^7.0.0"
+
+cozy-client@^13.13.0, cozy-client@^13.6.0:
version "13.20.0"
resolved "https://registry.yarnpkg.com/cozy-client/-/cozy-client-13.20.0.tgz#307849253ed577e04e4271f2e45812765bb5e72e"
integrity sha512-uaIqis28V9PN7mHIL3Byqc5WuKW0957jPmyCvAHwXC9t6ydCclswOnNcIuhvXZ1HxTIpUjc7AU041eh1eqjrSw==
@@ -3910,6 +3932,15 @@ cozy-stack-client@^13.12.1, cozy-stack-client@^13.16.0:
mime "^2.4.0"
qs "^6.7.0"
+cozy-stack-client@^13.20.2:
+ version "13.20.2"
+ resolved "https://registry.yarnpkg.com/cozy-stack-client/-/cozy-stack-client-13.20.2.tgz#2ff55f93dca809b7ec82ec0afc88a3bc041383c1"
+ integrity sha512-9j52p+0/kw5CAO42hPCqjV1ESwU/My79bfjF96wZRrGMFAciL+gGQy4wVeTpPlYvWIGIIbchFrUl8rQVkMVWYA==
+ dependencies:
+ detect-node "^2.0.4"
+ mime "^2.4.0"
+ qs "^6.7.0"
+
cozy-ui@22.3.1:
version "22.3.1"
resolved "https://registry.yarnpkg.com/cozy-ui/-/cozy-ui-22.3.1.tgz#9bd22099255e88ab2a9694a8b18d21cde3f627f5"
@@ -4936,22 +4967,22 @@ entities@^2.0.0:
resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f"
integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==
-enzyme-adapter-react-16@1.15.2:
- version "1.15.2"
- resolved "https://registry.yarnpkg.com/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.15.2.tgz#b16db2f0ea424d58a808f9df86ab6212895a4501"
- integrity sha512-SkvDrb8xU3lSxID8Qic9rB8pvevDbLybxPK6D/vW7PrT0s2Cl/zJYuXvsd1EBTz0q4o3iqG3FJhpYz3nUNpM2Q==
+enzyme-adapter-react-16@1.15.3:
+ version "1.15.3"
+ resolved "https://registry.yarnpkg.com/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.15.3.tgz#90154055be3318d70a51df61ac89cfa22e3d5f60"
+ integrity sha512-98rqNI4n9HZslWIPuuwy4hK1bxRuMy+XX0CU1dS8iUqcgisTxeBaap6oPp2r4MWC8OphCbbqAT8EU/xHz3zIaQ==
dependencies:
- enzyme-adapter-utils "^1.13.0"
- enzyme-shallow-equal "^1.0.1"
+ enzyme-adapter-utils "^1.13.1"
+ enzyme-shallow-equal "^1.0.4"
has "^1.0.3"
object.assign "^4.1.0"
object.values "^1.1.1"
prop-types "^15.7.2"
- react-is "^16.12.0"
+ react-is "^16.13.1"
react-test-renderer "^16.0.0-0"
semver "^5.7.0"
-enzyme-adapter-utils@^1.13.0:
+enzyme-adapter-utils@^1.13.1:
version "1.13.1"
resolved "https://registry.yarnpkg.com/enzyme-adapter-utils/-/enzyme-adapter-utils-1.13.1.tgz#59c1b734b0927543e3d8dc477299ec957feb312d"
integrity sha512-5A9MXXgmh/Tkvee3bL/9RCAAgleHqFnsurTYCbymecO4ohvtNO5zqIhHxV370t7nJAwaCfkgtffarKpC0GPt0g==
@@ -4963,7 +4994,7 @@ enzyme-adapter-utils@^1.13.0:
prop-types "^15.7.2"
semver "^5.7.1"
-enzyme-shallow-equal@^1.0.1:
+enzyme-shallow-equal@^1.0.1, enzyme-shallow-equal@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/enzyme-shallow-equal/-/enzyme-shallow-equal-1.0.4.tgz#b9256cb25a5f430f9bfe073a84808c1d74fced2e"
integrity sha512-MttIwB8kKxypwHvRynuC3ahyNc+cFbR8mjVIltnmzQ0uKGqmsfO4bfBuLxb0beLNPhjblUEYvEbsg+VSygvF1Q==
@@ -11352,15 +11383,15 @@ react-autowhatever@^10.1.2:
react-themeable "^1.1.0"
section-iterator "^2.0.0"
-react-dom@16.13.0:
- version "16.13.0"
- resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.0.tgz#cdde54b48eb9e8a0ca1b3dc9943d9bb409b81866"
- integrity sha512-y09d2c4cG220DzdlFkPTnVvGTszVvNpC73v+AaLGLHbkpy3SSgvYq8x0rNwPJ/Rk/CicTNgk0hbHNw1gMEZAXg==
+react-dom@16.13.1:
+ version "16.13.1"
+ resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.1.tgz#c1bd37331a0486c078ee54c4740720993b2e0e7f"
+ integrity sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.2"
- scheduler "^0.19.0"
+ scheduler "^0.19.1"
react-dom@16.8.1:
version "16.8.1"
@@ -11464,7 +11495,7 @@ react-pdf@^4.0.5:
pdfjs-dist "2.1.266"
prop-types "^15.6.2"
-react-redux@5.1.1:
+"react-redux-test@npm:react-redux@5.1.1", react-redux@5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.1.1.tgz#88e368682c7fa80e34e055cd7ac56f5936b0f52f"
integrity sha512-LE7Ned+cv5qe7tMV5BPYkGQ5Lpg8gzgItK07c67yHvJ8t0iaD9kPFPAli/mYkiyJYrs2pJgExR2ZgsGqlrOApg==
@@ -11477,7 +11508,7 @@ react-redux@5.1.1:
react-is "^16.6.0"
react-lifecycles-compat "^3.0.0"
-react-redux@^7.2.0:
+react-redux@7.2.1, react-redux@^7.2.0:
version "7.2.1"
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.1.tgz#8dedf784901014db2feca1ab633864dee68ad985"
integrity sha512-T+VfD/bvgGTUA74iW9d2i5THrDQWbweXP0AVNI8tNd1Rk5ch1rnMiJkDD67ejw7YBKM4+REvcvqRuWJb7BLuEg==
@@ -12179,7 +12210,7 @@ saxes@^5.0.0:
dependencies:
xmlchars "^2.2.0"
-scheduler@0.18.0, scheduler@^0.13.1, scheduler@^0.19.0, scheduler@^0.19.1:
+scheduler@0.18.0, scheduler@^0.13.1, scheduler@^0.19.1:
version "0.18.0"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.18.0.tgz#5901ad6659bc1d8f3fdaf36eb7a67b0d6746b1c4"
integrity sha512-agTSHR1Nbfi6ulI0kYNK0203joW2Y5W4po4l+v03tOoiJKpTBbxpNhWDvqc/4IcOw+KLmSiQLTasZ4cab2/UWQ==