fix failing tests due to rr upgrade

This commit is contained in:
Sérgio Ramos 2017-02-07 09:55:18 +00:00
parent a7f992e69f
commit fc9202d96c
14 changed files with 42 additions and 15 deletions

View File

@ -58,7 +58,9 @@ Billing.propTypes = {
};
const mapStateToProps = (state, {
match = {}
match = {
params: {}
}
}) => ({
// TODO add cards - as above
org: orgByIdSelector(match.params.org)(state),

View File

@ -52,7 +52,9 @@ NewBilling.propTypes = {
};
const mapStateToProps = (state, {
match = {}
match = {
params: {}
}
}) => ({
// TODO add cards - as above
org: orgByIdSelector(match.params.org)(state),

View File

@ -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

View File

@ -35,7 +35,9 @@ const People = (props) => {
};
const mapStateToProps = (state, {
match = {}
match = {
params: {}
}
}) => ({
people: peopleByOrgIdSelector(match.params.org)(state),
UI: orgUISelector(state),

View File

@ -61,7 +61,9 @@ Project.propTypes = {
};
const mapStateToProps = (state, {
match = {}
match = {
params: {}
}
}) => ({
org: orgByIdSelector(match.params.org)(state),
project: projectByIdSelector(match.params.projectId)(state),

View File

@ -47,7 +47,9 @@ Instances.propTypes = {
};
const mapStateToProps = (state, {
match = {}
match = {
params: {}
}
}) => ({
instances: instancesByProjectIdSelector(match.params.projectId)(state)
});

View File

@ -57,7 +57,9 @@ ProjectSection.propTypes = {
};
const mapStateToProps = (state, {
match = {}
match = {
params: {}
}
}) => ({
org: orgByIdSelector(match.params.org)(state),
project: projectByIdSelector(match.params.projectId)(state),

View File

@ -74,7 +74,9 @@ Projects.propTypes = {
};
const mapStateToProps = (state, {
match = {}
match = {
params: {}
}
}) => ({
org: orgByIdSelector(match.params.org)(state),
projects: projectsByOrgIdSelector(match.params.org)(state),

View File

@ -108,7 +108,9 @@ Service.propTypes = {
};
const mapStateToProps = (state, {
match = {}
match = {
params: {}
}
}) => ({
org: orgByIdSelector(match.params.org)(state),
project: projectByIdSelector(match.params.projectId)(state),

View File

@ -46,7 +46,9 @@ Instances.propTypes = {
};
const mapStateToProps = (state, {
match = {}
match = {
params: {}
}
}) => ({
instances: instancesByServiceIdSelector(match.params.serviceId)(state)
});

View File

@ -20,7 +20,9 @@ const {
} = actions;
const mapStateToProps = (state, {
match = {}
match = {
params: {}
}
}) => ({
datasets: metricsByServiceIdSelector(match.params.serviceId)(state),
metricTypes: metricTypesSelector(state),

View File

@ -53,7 +53,9 @@ Services.propTypes = {
};
const mapStateToProps = (state, {
match = {}
match = {
params: {}
}
}) => ({
org: orgByIdSelector(match.params.org)(state),
project: projectByIdSelector(match.params.projectId)(state),

View File

@ -9,12 +9,13 @@ const {
} = enzyme;
const {
withIntl
withIntl,
withRouter
} = create;
test('renders <Service> without exploding', (t) => {
const Service = require('@containers/service').WrappedComponent;
const wrapper = render(withIntl(<Service />));
const wrapper = render(withRouter(withIntl(<Service />)));
t.deepEqual(wrapper.length, 1);
});

View File

@ -67,7 +67,9 @@ const withRouter = (children, props = {}) => (
</BrowserRouter>
);
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;