diff --git a/src/editors/containers/ProblemEditor/components/EditProblemView/hooks.test.js b/src/editors/containers/ProblemEditor/components/EditProblemView/hooks.test.js index 83226be54..fe3a4d7b0 100644 --- a/src/editors/containers/ProblemEditor/components/EditProblemView/hooks.test.js +++ b/src/editors/containers/ProblemEditor/components/EditProblemView/hooks.test.js @@ -305,7 +305,7 @@ describe('EditProblemView hooks parseState', () => { }); }); - it('returned parseState content.settings should not include default values', () => { + it('returned parseState content.settings should not include default values (not including maxAttempts)', () => { const problem = { ...problemState, problemType: ProblemTypeKeys.NUMERIC, @@ -326,6 +326,7 @@ describe('EditProblemView hooks parseState', () => { openSaveWarningModal, }); expect(settings).toEqual({ + max_attempts: '', attempts_before_showanswer_button: 0, submission_wait_seconds: 0, weight: 1, diff --git a/src/editors/containers/ProblemEditor/components/SelectTypeModal/SelectTypeWrapper/SelectTypeFooter.jsx b/src/editors/containers/ProblemEditor/components/SelectTypeModal/SelectTypeWrapper/SelectTypeFooter.jsx index efb25fa80..677dc4988 100644 --- a/src/editors/containers/ProblemEditor/components/SelectTypeModal/SelectTypeWrapper/SelectTypeFooter.jsx +++ b/src/editors/containers/ProblemEditor/components/SelectTypeModal/SelectTypeWrapper/SelectTypeFooter.jsx @@ -11,12 +11,13 @@ import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/ import messages from './messages'; import hooks from '../hooks'; -import { actions } from '../../../../../data/redux'; +import { actions, selectors } from '../../../../../data/redux'; export const SelectTypeFooter = ({ onCancel, selected, // redux + defaultSettings, updateField, setBlockTitle, // injected, @@ -35,7 +36,12 @@ export const SelectTypeFooter = ({