@@ -35,12 +38,12 @@ export default class extends PureComponent {
}
render() {
- const { tests, refresh } = this.props;
+ const { tests } = this.props;
return (
- { this.renderTests(tests, refresh) }
+ { this.renderTests(tests) }
);
}
diff --git a/common/app/routes/challenges/redux/reducer.js b/common/app/routes/challenges/redux/reducer.js
index f2933d944e..5f48df4db9 100644
--- a/common/app/routes/challenges/redux/reducer.js
+++ b/common/app/routes/challenges/redux/reducer.js
@@ -30,7 +30,6 @@ const mainReducer = handleActions(
}),
[types.updateCurrentChallenge]: (state, { payload: challenge }) => ({
...state,
- refresh: true,
id: challenge.id,
// used mainly to find code storage
legacyKey: challenge.name,
@@ -40,10 +39,12 @@ const mainReducer = handleActions(
}),
[types.updateTests]: (state, { payload: tests }) => ({
...state,
- refresh: false,
tests
}),
- [types.executeChallenge]: state => ({ ...state, refresh: true }),
+ [types.executeChallenge]: state => ({
+ ...state,
+ tests: state.tests.map(test => ({ ...test, err: false, pass: false }))
+ }),
// map
[types.updateFilter]: (state, { payload = ''}) => ({