feat: updated frontend-build & frontend-platform major versions (#374)
* feat: bumped frontend-platform to v6 * chore: bumped jest to v29 * fix: updated snapshots for failing tests * refactor: updated frontend-build, updated snapshots * feat: updated build and platform major versions, along with edx packages * refactor: updated index.test to resolve failing test * refactor: major version upgrade for react-unit-test-utils * refactor: updated package-lock
This commit is contained in:
9762
package-lock.json
generated
9762
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@@ -29,11 +29,11 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
|
||||
"@edx/frontend-component-header": "^5.0.2",
|
||||
"@edx/frontend-platform": "^7.1.0",
|
||||
"@edx/frontend-component-header": "5.3.0",
|
||||
"@edx/frontend-platform": "8.0.0",
|
||||
"@edx/openedx-atlas": "^0.6.0",
|
||||
"@edx/react-unit-test-utils": "^2.0.0",
|
||||
"@openedx/frontend-plugin-framework": "^1.1.2",
|
||||
"@edx/react-unit-test-utils": "^3.0.0",
|
||||
"@openedx/frontend-plugin-framework": "^1.2.1",
|
||||
"@openedx/frontend-slot-footer": "^1.0.2",
|
||||
"@openedx/paragon": "^22.1.1",
|
||||
"@edx/reactifex": "^2.1.1",
|
||||
@@ -68,7 +68,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@edx/browserslist-config": "^1.1.1",
|
||||
"@openedx/frontend-build": "^13.0.28",
|
||||
"@openedx/frontend-build": "14.0.3",
|
||||
"@testing-library/react": "12.1.5",
|
||||
"axios": "0.21.2",
|
||||
"axios-mock-adapter": "^1.17.0",
|
||||
@@ -76,7 +76,7 @@
|
||||
"fetch-mock": "^6.5.2",
|
||||
"husky": "2.7.0",
|
||||
"identity-obj-proxy": "^3.0.0",
|
||||
"jest": "^26.6.3",
|
||||
"jest": "^29.7.0",
|
||||
"react-dev-utils": "^12.0.1",
|
||||
"react-test-renderer": "17.0.2",
|
||||
"reactifex": "1.1.1",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`HistoryTable component snapshot history table data (from bulkManagementHistory.map(this.formatHistoryRow) snapshot: maps resultsSummay to ResultsSummary, wraps filename and user, forwards the rest 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
[
|
||||
{
|
||||
"filename": <span
|
||||
className="wrap-text-in-cell"
|
||||
>
|
||||
@@ -20,7 +20,7 @@ Array [
|
||||
Eifel
|
||||
</span>,
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"filename": <span
|
||||
className="wrap-text-in-cell"
|
||||
>
|
||||
@@ -45,26 +45,26 @@ exports[`HistoryTable component snapshot snapshot - loads formatted table 1`] =
|
||||
<DataTable
|
||||
className="table-striped"
|
||||
columns={
|
||||
Array [
|
||||
Object {
|
||||
[
|
||||
{
|
||||
"Header": "Gradebook",
|
||||
"accessor": "filename",
|
||||
"columnSortable": false,
|
||||
"width": "col-5",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"Header": "Download Summary",
|
||||
"accessor": "resultsSummary",
|
||||
"columnSortable": false,
|
||||
"width": "col",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"Header": "Who",
|
||||
"accessor": "user",
|
||||
"columnSortable": false,
|
||||
"width": "col-1",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"Header": "When",
|
||||
"accessor": "timeUploaded",
|
||||
"columnSortable": false,
|
||||
@@ -73,8 +73,8 @@ exports[`HistoryTable component snapshot snapshot - loads formatted table 1`] =
|
||||
]
|
||||
}
|
||||
data={
|
||||
Array [
|
||||
Object {
|
||||
[
|
||||
{
|
||||
"filename": <span
|
||||
className="wrap-text-in-cell"
|
||||
>
|
||||
@@ -92,7 +92,7 @@ exports[`HistoryTable component snapshot snapshot - loads formatted table 1`] =
|
||||
Eifel
|
||||
</span>,
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"filename": <span
|
||||
className="wrap-text-in-cell"
|
||||
>
|
||||
|
||||
@@ -4,8 +4,8 @@ exports[`ResultsSummary component snapshot - safe hyperlink with bulkGradesUrl w
|
||||
<Hyperlink
|
||||
destination="www.edx.org"
|
||||
href={
|
||||
Object {
|
||||
"url": Object {
|
||||
{
|
||||
"url": {
|
||||
"rowId": 42,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ exports[`AssignmentFilter component render snapshot 1`] = `
|
||||
label="Assignment"
|
||||
onChange={[MockFunction]}
|
||||
options={
|
||||
Array [
|
||||
[
|
||||
<option
|
||||
value=""
|
||||
>
|
||||
|
||||
@@ -10,7 +10,7 @@ exports[`AssignmentFilterType component render snapshot 1`] = `
|
||||
label="Assignment Types"
|
||||
onChange={[MockFunction]}
|
||||
options={
|
||||
Array [
|
||||
[
|
||||
<option
|
||||
value=""
|
||||
>
|
||||
|
||||
@@ -7,7 +7,7 @@ exports[`StudentGroupsFilter component render snapshot 1`] = `
|
||||
label="Tracks"
|
||||
onChange={[MockFunction]}
|
||||
options={
|
||||
Array [
|
||||
[
|
||||
<option
|
||||
value="Track-All"
|
||||
>
|
||||
@@ -43,7 +43,7 @@ exports[`StudentGroupsFilter component render snapshot 1`] = `
|
||||
label="Cohorts"
|
||||
onChange={[MockFunction]}
|
||||
options={
|
||||
Array [
|
||||
[
|
||||
<option
|
||||
value="Cohort-All"
|
||||
>
|
||||
|
||||
@@ -6,7 +6,7 @@ exports[`BulkManagementControls render snapshot - show - network and import butt
|
||||
>
|
||||
<NetworkButton
|
||||
label={
|
||||
Object {
|
||||
{
|
||||
"defaultMessage": "Download Grades",
|
||||
"description": "A labeled button that allows an admin user to download course grades all at once (in bulk).",
|
||||
"id": "gradebook.GradesView.BulkManagementControls.bulkManagementLabel",
|
||||
|
||||
@@ -4,16 +4,16 @@ exports[`OverrideTable component render snapshot 1`] = `
|
||||
<DataTable
|
||||
columns="test-columns"
|
||||
data={
|
||||
Array [
|
||||
Object {
|
||||
[
|
||||
{
|
||||
"test": "data",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"andOther": "test-data",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"adjustedGrade": <AdjustedGradeInput />,
|
||||
"date": Object {
|
||||
"date": {
|
||||
"formatted": 2000-01-01T00:00:00.000Z,
|
||||
},
|
||||
"reason": <ReasonInput />,
|
||||
|
||||
@@ -19,8 +19,8 @@ exports[`FilterBadge render do not hide value snapshot 1`] = `
|
||||
aria-label="close"
|
||||
className="btn-info"
|
||||
onClick={
|
||||
Object {
|
||||
"handleClose": Array [
|
||||
{
|
||||
"handleClose": [
|
||||
"some",
|
||||
"filters",
|
||||
],
|
||||
@@ -55,8 +55,8 @@ exports[`FilterBadge render hide Value snapshot 1`] = `
|
||||
aria-label="close"
|
||||
className="btn-info"
|
||||
onClick={
|
||||
Object {
|
||||
"handleClose": Array [
|
||||
{
|
||||
"handleClose": [
|
||||
"some",
|
||||
"filters",
|
||||
],
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
exports[`FilteredUsersLabel component render snapshot 1`] = `
|
||||
<format-message-function
|
||||
message={
|
||||
Object {
|
||||
{
|
||||
"defaultMessage": "Showing {filteredUsers} of {totalUsers} total learners",
|
||||
"description": "Users visibility label",
|
||||
"id": "gradebook.GradesTab.usersVisibilityLabel",
|
||||
}
|
||||
}
|
||||
values={
|
||||
Object {
|
||||
{
|
||||
"filteredUsers": <BoldText
|
||||
text={100}
|
||||
/>,
|
||||
|
||||
@@ -28,32 +28,32 @@ exports[`Gradebook Table Fields Username with external_user_key snapshot 1`] = `
|
||||
`;
|
||||
|
||||
exports[`Gradebook Table Fields Username with external_user_key wraps external user key and username 1`] = `
|
||||
Object {
|
||||
"children": Array [
|
||||
Object {
|
||||
"children": Array [
|
||||
Object {
|
||||
"children": Array [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
"MyNameFromHere",
|
||||
],
|
||||
"props": Object {},
|
||||
"props": {},
|
||||
"type": "div",
|
||||
},
|
||||
Object {
|
||||
"children": Array [
|
||||
{
|
||||
"children": [
|
||||
"My name from another land",
|
||||
],
|
||||
"props": Object {
|
||||
"props": {
|
||||
"className": "student-key",
|
||||
},
|
||||
"type": "div",
|
||||
},
|
||||
],
|
||||
"props": Object {},
|
||||
"props": {},
|
||||
"type": "div",
|
||||
},
|
||||
],
|
||||
"props": Object {
|
||||
"props": {
|
||||
"className": "wrap-text-in-cell",
|
||||
},
|
||||
"type": "span",
|
||||
|
||||
@@ -32,7 +32,7 @@ exports[`LabelReplacements TotalGradeLabelReplacement snapshot 1`] = `
|
||||
}
|
||||
placement="left"
|
||||
trigger={
|
||||
Array [
|
||||
[
|
||||
"hover",
|
||||
"focus",
|
||||
]
|
||||
@@ -84,7 +84,7 @@ exports[`snapshot left to right overlay placement 1`] = `
|
||||
}
|
||||
placement="right"
|
||||
trigger={
|
||||
Array [
|
||||
[
|
||||
"hover",
|
||||
"focus",
|
||||
]
|
||||
@@ -118,7 +118,7 @@ exports[`snapshot right to left overlay placement 1`] = `
|
||||
}
|
||||
placement="left"
|
||||
trigger={
|
||||
Array [
|
||||
[
|
||||
"hover",
|
||||
"focus",
|
||||
]
|
||||
|
||||
@@ -7,13 +7,13 @@ exports[`GradebookTable snapshot 1`] = `
|
||||
<DataTable
|
||||
RowStatusComponent={[MockFunction hooks.nullMethod]}
|
||||
columns={
|
||||
Array [
|
||||
[
|
||||
"some",
|
||||
"columns",
|
||||
]
|
||||
}
|
||||
data={
|
||||
Array [
|
||||
[
|
||||
"some",
|
||||
"data",
|
||||
]
|
||||
|
||||
@@ -41,7 +41,7 @@ exports[`ImportGradesButton component render snapshot 1`] = `
|
||||
className="import-grades-btn"
|
||||
import={true}
|
||||
label={
|
||||
Object {
|
||||
{
|
||||
"defaultMessage": "Import Grades",
|
||||
"description": "A labeled button to import grades in the BulkManagement Tab File Upload Form",
|
||||
"id": "gradebook.GradesView.importGradesBtnText",
|
||||
|
||||
@@ -17,7 +17,7 @@ exports[`InterventionsReport component output snapshot 1`] = `
|
||||
</div>
|
||||
<NetworkButton
|
||||
label={
|
||||
Object {
|
||||
{
|
||||
"defaultMessage": "Download Interventions",
|
||||
"description": "The labeled button to download the Intervention report from the Grades View",
|
||||
"id": "gradebook.GradesView.InterventionsReport.downloadBtn",
|
||||
|
||||
@@ -4,7 +4,7 @@ exports[`PageButtons component render snapshot 1`] = `
|
||||
<div
|
||||
className="d-flex justify-content-center"
|
||||
style={
|
||||
Object {
|
||||
{
|
||||
"paddingBottom": "20px",
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ exports[`PageButtons component render snapshot 1`] = `
|
||||
disabled="prev-disabled"
|
||||
onClick={[MockFunction hooks.prev.onClick]}
|
||||
style={
|
||||
Object {
|
||||
{
|
||||
"margin": "20px",
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ exports[`PageButtons component render snapshot 1`] = `
|
||||
disabled="next-disabled"
|
||||
onClick={[MockFunction hooks.next.onClick]}
|
||||
style={
|
||||
Object {
|
||||
{
|
||||
"margin": "20px",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,12 +4,12 @@ exports[`NetworkButton component snapshots snapshot 1`] = `
|
||||
<StatefulButton
|
||||
className="ml-2 test-class"
|
||||
disabledStates={
|
||||
Array [
|
||||
[
|
||||
"pending",
|
||||
]
|
||||
}
|
||||
icons={
|
||||
Object {
|
||||
{
|
||||
"default": <Icon
|
||||
className="fa mr-2 fa-download"
|
||||
/>,
|
||||
@@ -19,7 +19,7 @@ exports[`NetworkButton component snapshots snapshot 1`] = `
|
||||
}
|
||||
}
|
||||
labels={
|
||||
Object {
|
||||
{
|
||||
"default": <FormattedMessage
|
||||
defaultMessage="test button label"
|
||||
description="test button label description"
|
||||
|
||||
@@ -87,15 +87,16 @@ describe('root selectors', () => {
|
||||
});
|
||||
});
|
||||
describe('if neither/only 1 are default values', () => {
|
||||
beforeEach(() => {
|
||||
filterConstants.filterConfig[filterName] = testConfig;
|
||||
config = selectors.root.filterBadgeConfig(testState, filterName);
|
||||
});
|
||||
describe.each([
|
||||
['neither', () => false],
|
||||
['only filter1', (v) => v === filters[0]],
|
||||
['only filter2', (v) => v === filters[1]],
|
||||
], '%1 is default', (label, isDefaultFn) => {
|
||||
beforeEach(() => {
|
||||
filterConstants.filterConfig[filterName] = testConfig;
|
||||
config = selectors.root.filterBadgeConfig(testState, filterName);
|
||||
});
|
||||
|
||||
it('returns isDefault: false, string value, and remaining filterConfig', () => {
|
||||
selectors.filters.isDefault.mockImplementation(isDefaultFn);
|
||||
const { filterOrder, ...rest } = testConfig;
|
||||
|
||||
Reference in New Issue
Block a user