Skip to content

Commit

Permalink
style: lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zawan-ila committed Jan 29, 2025
1 parent 388e116 commit 8499db1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/components/CreateCourseRunPage/CreateCourseRunForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ const BaseCreateCourseRunForm = ({
helpText={pacingHelp}
/>
)}
props = {{
name: 'pacing_type'
props={{
name: 'pacing_type',
}}
/>
<ButtonToolbar>
Expand Down
22 changes: 11 additions & 11 deletions src/components/CreateCourseRunPage/CreateCourseRunPage.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,27 +118,27 @@ describe('CreateCourseRunPage', () => {
course_runs: [{
status: 'unpublished',
key: 'course-v1:edX+cs101+2T2019',
pacing_type: pacing
pacing_type: pacing,
}],
title: 'Test Course',
},
isFetching: false,
isCreating: false,
error: null,
}}
courseRunOptions = {{
courseRunOptions={{
data: {
actions: {
POST: {
pacing_type: {
choices: [
{value: 'instructor_paced', display_name: 'Instructor-paced'},
{value: 'self_paced', display_name: 'Self-paced'}
]
}
}
}
}
{ value: 'instructor_paced', display_name: 'Instructor-paced' },
{ value: 'self_paced', display_name: 'Self-paced' },
],
},
},
},
},
}}
/>
</IntlProvider>
Expand All @@ -148,7 +148,7 @@ describe('CreateCourseRunPage', () => {

const component = mount(CreateCourseRunPageWrapper());

const pacingSelect = component.find({name: 'pacing_type'}).hostNodes().find('select')
expect(pacingSelect.props().value).toEqual(pacing)
const pacingSelect = component.find({ name: 'pacing_type' }).hostNodes().find('select');
expect(pacingSelect.props().value).toEqual(pacing);
});
});
4 changes: 2 additions & 2 deletions src/components/CreateCourseRunPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class CreateCourseRunPage extends React.Component {
const courseRunTypeOptions = parsedTypeOptions && parsedTypeOptions.courseRunTypeOptions;
const defaultRunType = courseRunTypeOptions && courseRunTypeOptions[type]
&& courseRunTypeOptions[type][1] && courseRunTypeOptions[type][1].value;
const defaultPacingType = course_runs && defaultRun && course_runs.find(run => run.key == defaultRun).pacing_type
const defaultPacingType = course_runs && defaultRun && course_runs.find(run => run.key === defaultRun).pacing_type;

return (
<>
Expand Down Expand Up @@ -174,7 +174,7 @@ class CreateCourseRunPage extends React.Component {
initialValues={{
rerun: defaultRun,
run_type: defaultRunType,
pacing_type: defaultPacingType
pacing_type: defaultPacingType,
}}
courseTypeUuid={type}
canSetRunKey={canSetRunKey}
Expand Down

0 comments on commit 8499db1

Please sign in to comment.