build(deps): bump got and @edx/frontend-build (#294)

* build(deps): bump async from 2.6.3 to 2.6.4

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: add eslint

* chore: update commend

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Leangseu Kim <lkim@edx.org>
This commit is contained in:
dependabot[bot]
2023-01-04 15:58:47 -05:00
committed by GitHub
parent f5706635e0
commit ecceda2343
8 changed files with 3913 additions and 7839 deletions

View File

@@ -6,6 +6,11 @@ const config = createConfig('eslint', {
'import/no-named-as-default-member': 'off',
'import/no-self-import': 'off',
'spaced-comment': ['error', 'always', { 'block': { 'exceptions': ['*'] } }],
// TOD: Remove this rule once we have a better way to handle this.
'import/no-import-module-exports': 'off',
'no-import-assign': 'off',
'default-param-last': 'off',
},
});

11647
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -69,7 +69,7 @@
"whatwg-fetch": "^2.0.4"
},
"devDependencies": {
"@edx/frontend-build": "9.1.1",
"@edx/frontend-build": "^12.4.15",
"axios": "0.21.2",
"axios-mock-adapter": "^1.17.0",
"enzyme-adapter-react-16": "^1.14.0",

View File

@@ -76,12 +76,14 @@ describe('AssignmentFilter', () => {
id: selected.id,
});
});
it('calls props.updateQueryParams with selected assignment id',
it(
'calls props.updateQueryParams with selected assignment id',
() => {
expect(props.updateQueryParams).toHaveBeenCalledWith({
assignment: selected.id,
});
});
},
);
it('calls props.fetchGradesIfAssignmentGradeFiltersSet', () => {
const method = props.fetchGradesIfAssignmentGradeFiltersSet;
expect(method).toHaveBeenCalledWith();
@@ -99,12 +101,14 @@ describe('AssignmentFilter', () => {
id: undefined,
});
});
it('calls props.updateQueryParams with selected assignment id',
it(
'calls props.updateQueryParams with selected assignment id',
() => {
expect(props.updateQueryParams).toHaveBeenCalledWith({
assignment: undefined,
});
});
},
);
it('calls props.fetchGradesIfAssignmentGradeFiltersSet', () => {
const method = props.fetchGradesIfAssignmentGradeFiltersSet;
expect(method).toHaveBeenCalledWith();

View File

@@ -69,30 +69,38 @@ export class GradebookFilters extends React.Component {
/>
</div>
{this.collapsibleGroup(messages.assignments, (
<div>
<AssignmentTypeFilter updateQueryParams={updateQueryParams} />
<AssignmentFilter updateQueryParams={updateQueryParams} />
<AssignmentGradeFilter updateQueryParams={updateQueryParams} />
</div>
))}
{this.collapsibleGroup(
messages.assignments, (
<div>
<AssignmentTypeFilter updateQueryParams={updateQueryParams} />
<AssignmentFilter updateQueryParams={updateQueryParams} />
<AssignmentGradeFilter updateQueryParams={updateQueryParams} />
</div>
),
)}
{this.collapsibleGroup(messages.overallGrade, (
<CourseGradeFilter updateQueryParams={updateQueryParams} />
))}
{this.collapsibleGroup(
messages.overallGrade, (
<CourseGradeFilter updateQueryParams={updateQueryParams} />
),
)}
{this.collapsibleGroup(messages.studentGroups, (
<StudentGroupsFilter updateQueryParams={updateQueryParams} />
))}
{this.collapsibleGroup(
messages.studentGroups, (
<StudentGroupsFilter updateQueryParams={updateQueryParams} />
),
)}
{this.collapsibleGroup(messages.includeCourseTeamMembers, (
<Form.Checkbox
checked={this.state.includeCourseRoleMembers}
onChange={this.handleIncludeTeamMembersChange}
>
<FormattedMessage {...messages.includeCourseTeamMembers} />
</Form.Checkbox>
))}
{this.collapsibleGroup(
messages.includeCourseTeamMembers, (
<Form.Checkbox
checked={this.state.includeCourseRoleMembers}
onChange={this.handleIncludeTeamMembersChange}
>
<FormattedMessage {...messages.includeCourseTeamMembers} />
</Form.Checkbox>
),
)}
</>
);
}

View File

@@ -18,6 +18,11 @@ export class GradebookHeader extends React.Component {
this.handleToggleViewClick = this.handleToggleViewClick.bind(this);
}
handleToggleViewClick() {
const newView = this.props.activeView === views.grades ? views.bulkManagementHistory : views.grades;
this.props.setView(newView);
}
get toggleViewMessage() {
return this.props.activeView === views.grades
? messages.toActivityLog
@@ -28,11 +33,6 @@ export class GradebookHeader extends React.Component {
`${getConfig().LMS_BASE_URL}/courses/${courseId}/instructor`
);
handleToggleViewClick() {
const newView = this.props.activeView === views.grades ? views.bulkManagementHistory : views.grades;
this.props.setView(newView);
}
render() {
return (
<div className="gradebook-header">

View File

@@ -10,7 +10,7 @@ import {
mapDispatchToProps,
mapStateToProps,
}
from '.';
from '.';
jest.mock('./OverrideTable', () => 'OverrideTable');
jest.mock('./ModalHeaders', () => 'ModalHeaders');

View File

@@ -29,6 +29,18 @@ export class ImportGradesButton extends React.Component {
this.handleFileInputChange = this.handleFileInputChange.bind(this);
}
handleClickImportGrades() {
if (this.fileInput) { this.fileInput.click(); }
}
handleFileInputChange() {
return this.hasFile && (
this.props.submitImportGradesButtonData(this.formData).then(
() => { this.fileInput.value = null; },
)
);
}
get fileInput() {
return this.fileInputRef.current;
}
@@ -43,18 +55,6 @@ export class ImportGradesButton extends React.Component {
return this.fileInput && this.fileInput.files[0];
}
handleClickImportGrades() {
if (this.fileInput) { this.fileInput.click(); }
}
handleFileInputChange() {
return this.hasFile && (
this.props.submitImportGradesButtonData(this.formData).then(
() => { this.fileInput.value = null; },
)
);
}
render() {
const { gradeExportUrl } = this.props;
return (