From 6c3fb22db94f8be84a841455de60696e01f2ed7b Mon Sep 17 00:00:00 2001 From: Bryann Valderrama Date: Tue, 20 Feb 2024 15:08:11 -0500 Subject: [PATCH] chore: address PR review --- .../components/EditProblemView/SettingsWidget/messages.js | 6 +++--- .../SettingsWidget/settingsComponents/ScoringCard.test.jsx | 3 ++- .../__snapshots__/ScoringCard.test.jsx.snap | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/messages.js b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/messages.js index 6b7b5f1c9..56032c7e8 100644 --- a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/messages.js +++ b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/messages.js @@ -83,12 +83,12 @@ const messages = defineMessages({ description: 'Scoring weight input label', }, scoringGradingMethodInputLabel: { - id: 'authoring.problemeditor.settings.scoring.gradingMethod.inputLabel', + id: 'authoring.problemeditor.settings.scoring.grading.method.inputLabel', defaultMessage: 'Grading Method', description: 'Grading method input label', }, gradingMethodSummary: { - id: 'authoring.problemeditor.settings.scoring.gradingMethod', + id: 'authoring.problemeditor.settings.scoring.grading.method', defaultMessage: '{gradingMethod}', description: 'Summary text for scoring grading method', }, @@ -128,7 +128,7 @@ const messages = defineMessages({ description: 'Summary text for scoring weight', }, gradingMethodHint: { - id: 'authoring.problemeditor.settings.scoring.gradingMethod.hint', + id: 'authoring.problemeditor.settings.scoring.grading.method.hint', defaultMessage: 'Define the grading method for this problem. By default, it is the score of the last submission made by the student.', description: 'Summary text for scoring grading method', }, diff --git a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/ScoringCard.test.jsx b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/ScoringCard.test.jsx index 949a4897a..339480964 100644 --- a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/ScoringCard.test.jsx +++ b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/ScoringCard.test.jsx @@ -3,6 +3,7 @@ import { shallow } from '@edx/react-unit-test-utils'; import { formatMessage } from '../../../../../../../testUtils'; import { scoringCardHooks } from '../hooks'; import { ScoringCard } from './ScoringCard'; +import { GradingMethodKeys } from '../../../../../../data/constants/problem'; jest.mock('../hooks', () => ({ scoringCardHooks: jest.fn(), @@ -15,7 +16,7 @@ describe('ScoringCard', () => { unlimited: false, number: 5, }, - gradingMethod: 'last_score', + gradingMethod: GradingMethodKeys.LAST_SCORE, updateSettings: jest.fn().mockName('args.updateSettings'), intl: { formatMessage }, }; diff --git a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/__snapshots__/ScoringCard.test.jsx.snap b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/__snapshots__/ScoringCard.test.jsx.snap index 84ea96102..c28353b85 100644 --- a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/__snapshots__/ScoringCard.test.jsx.snap +++ b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/__snapshots__/ScoringCard.test.jsx.snap @@ -53,7 +53,7 @@ exports[`ScoringCard snapshot snapshot: scoring setting card 1`] = ` @@ -168,7 +168,7 @@ exports[`ScoringCard snapshot snapshot: scoring setting card max attempts 1`] = @@ -283,7 +283,7 @@ exports[`ScoringCard snapshot snapshot: scoring setting card zero zero weight 1`