diff --git a/frontend/src/containers/new-project/billing.js b/frontend/src/containers/new-project/billing.js index 6fa1f5e9..48f689e5 100644 --- a/frontend/src/containers/new-project/billing.js +++ b/frontend/src/containers/new-project/billing.js @@ -58,7 +58,9 @@ Billing.propTypes = { }; const mapStateToProps = (state, { - match = {} + match = { + params: {} + } }) => ({ // TODO add cards - as above org: orgByIdSelector(match.params.org)(state), diff --git a/frontend/src/containers/new-project/new-billing.js b/frontend/src/containers/new-project/new-billing.js index dc5f173b..97c11644 100644 --- a/frontend/src/containers/new-project/new-billing.js +++ b/frontend/src/containers/new-project/new-billing.js @@ -52,7 +52,9 @@ NewBilling.propTypes = { }; const mapStateToProps = (state, { - match = {} + match = { + params: {} + } }) => ({ // TODO add cards - as above org: orgByIdSelector(match.params.org)(state), diff --git a/frontend/src/containers/new-project/new-project.js b/frontend/src/containers/new-project/new-project.js index 7bd8128b..77a8b22e 100644 --- a/frontend/src/containers/new-project/new-project.js +++ b/frontend/src/containers/new-project/new-project.js @@ -42,7 +42,9 @@ NewProject.propTypes = { // TODO we'll need to know whether there any cards // otherwise go to new billing straight away const mapStateToProps = (state, { - match = {} + match = { + params: {} + } }) => ({ org: orgByIdSelector(match.params.org)(state), router: state.app.router diff --git a/frontend/src/containers/org/people.js b/frontend/src/containers/org/people.js index 8fab1e0c..c26799f8 100644 --- a/frontend/src/containers/org/people.js +++ b/frontend/src/containers/org/people.js @@ -35,7 +35,9 @@ const People = (props) => { }; const mapStateToProps = (state, { - match = {} + match = { + params: {} + } }) => ({ people: peopleByOrgIdSelector(match.params.org)(state), UI: orgUISelector(state), diff --git a/frontend/src/containers/project/index.js b/frontend/src/containers/project/index.js index 6734c0bd..14db5654 100644 --- a/frontend/src/containers/project/index.js +++ b/frontend/src/containers/project/index.js @@ -61,7 +61,9 @@ Project.propTypes = { }; const mapStateToProps = (state, { - match = {} + match = { + params: {} + } }) => ({ org: orgByIdSelector(match.params.org)(state), project: projectByIdSelector(match.params.projectId)(state), diff --git a/frontend/src/containers/project/instances.js b/frontend/src/containers/project/instances.js index 0767f8c0..c5f4f710 100644 --- a/frontend/src/containers/project/instances.js +++ b/frontend/src/containers/project/instances.js @@ -47,7 +47,9 @@ Instances.propTypes = { }; const mapStateToProps = (state, { - match = {} + match = { + params: {} + } }) => ({ instances: instancesByProjectIdSelector(match.params.projectId)(state) }); diff --git a/frontend/src/containers/project/section.js b/frontend/src/containers/project/section.js index 0931e6af..ac02f729 100644 --- a/frontend/src/containers/project/section.js +++ b/frontend/src/containers/project/section.js @@ -57,7 +57,9 @@ ProjectSection.propTypes = { }; const mapStateToProps = (state, { - match = {} + match = { + params: {} + } }) => ({ org: orgByIdSelector(match.params.org)(state), project: projectByIdSelector(match.params.projectId)(state), diff --git a/frontend/src/containers/projects/index.js b/frontend/src/containers/projects/index.js index 88fa7438..37150f9e 100644 --- a/frontend/src/containers/projects/index.js +++ b/frontend/src/containers/projects/index.js @@ -74,7 +74,9 @@ Projects.propTypes = { }; const mapStateToProps = (state, { - match = {} + match = { + params: {} + } }) => ({ org: orgByIdSelector(match.params.org)(state), projects: projectsByOrgIdSelector(match.params.org)(state), diff --git a/frontend/src/containers/service/index.js b/frontend/src/containers/service/index.js index dac779eb..908bed47 100644 --- a/frontend/src/containers/service/index.js +++ b/frontend/src/containers/service/index.js @@ -108,7 +108,9 @@ Service.propTypes = { }; const mapStateToProps = (state, { - match = {} + match = { + params: {} + } }) => ({ org: orgByIdSelector(match.params.org)(state), project: projectByIdSelector(match.params.projectId)(state), diff --git a/frontend/src/containers/service/instances.js b/frontend/src/containers/service/instances.js index 862e16c3..0f6d2052 100644 --- a/frontend/src/containers/service/instances.js +++ b/frontend/src/containers/service/instances.js @@ -46,7 +46,9 @@ Instances.propTypes = { }; const mapStateToProps = (state, { - match = {} + match = { + params: {} + } }) => ({ instances: instancesByServiceIdSelector(match.params.serviceId)(state) }); diff --git a/frontend/src/containers/service/metrics.js b/frontend/src/containers/service/metrics.js index d9e08459..39d694fc 100644 --- a/frontend/src/containers/service/metrics.js +++ b/frontend/src/containers/service/metrics.js @@ -20,7 +20,9 @@ const { } = actions; const mapStateToProps = (state, { - match = {} + match = { + params: {} + } }) => ({ datasets: metricsByServiceIdSelector(match.params.serviceId)(state), metricTypes: metricTypesSelector(state), diff --git a/frontend/src/containers/services/index.js b/frontend/src/containers/services/index.js index fbe2b15f..3a82717f 100644 --- a/frontend/src/containers/services/index.js +++ b/frontend/src/containers/services/index.js @@ -53,7 +53,9 @@ Services.propTypes = { }; const mapStateToProps = (state, { - match = {} + match = { + params: {} + } }) => ({ org: orgByIdSelector(match.params.org)(state), project: projectByIdSelector(match.params.projectId)(state), diff --git a/frontend/test/components/service.js b/frontend/test/components/service.js index ce66f865..8db774a0 100644 --- a/frontend/test/components/service.js +++ b/frontend/test/components/service.js @@ -9,12 +9,13 @@ const { } = enzyme; const { - withIntl + withIntl, + withRouter } = create; test('renders without exploding', (t) => { const Service = require('@containers/service').WrappedComponent; - const wrapper = render(withIntl()); + const wrapper = render(withRouter(withIntl())); t.deepEqual(wrapper.length, 1); }); diff --git a/frontend/test/helpers/create.js b/frontend/test/helpers/create.js index a33d349d..b1e4ab26 100644 --- a/frontend/test/helpers/create.js +++ b/frontend/test/helpers/create.js @@ -67,7 +67,9 @@ const withRouter = (children, props = {}) => ( ); -module.exports = (children, props) => withRedux(withIntl(children), props); +module.exports = (children, props) => + withRouter(withRedux(withIntl(children), props)); + module.exports.withIntl = withIntl; module.exports.withRedux = withRedux; module.exports.withRouter = withRouter;