From 61c73b5fa9d16f6001b938e43f0523cbef7cecda Mon Sep 17 00:00:00 2001 From: Leangseu Kim Date: Tue, 28 Jun 2022 16:56:53 -0400 Subject: [PATCH] chore: update unit test --- .../OverrideTable/__snapshots__/test.jsx.snap | 3 +- .../EditModal/OverrideTable/test.jsx | 2 +- .../__snapshots__/test.jsx.snap | 111 ++++++------------ .../GradesView/GradebookTable/test.jsx | 1 + 4 files changed, 43 insertions(+), 74 deletions(-) diff --git a/src/components/GradesView/EditModal/OverrideTable/__snapshots__/test.jsx.snap b/src/components/GradesView/EditModal/OverrideTable/__snapshots__/test.jsx.snap index 998cdd9c..1f1169b8 100644 --- a/src/components/GradesView/EditModal/OverrideTable/__snapshots__/test.jsx.snap +++ b/src/components/GradesView/EditModal/OverrideTable/__snapshots__/test.jsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`OverrideTable Component snapshots basic snapshot shows a row for each entry and one editable row 1`] = ` - `; diff --git a/src/components/GradesView/EditModal/OverrideTable/test.jsx b/src/components/GradesView/EditModal/OverrideTable/test.jsx index c4594400..96149b47 100644 --- a/src/components/GradesView/EditModal/OverrideTable/test.jsx +++ b/src/components/GradesView/EditModal/OverrideTable/test.jsx @@ -8,7 +8,7 @@ import { mapStateToProps, } from '.'; -jest.mock('@edx/paragon', () => ({ Table: () => 'Table' })); +jest.mock('@edx/paragon', () => ({ DataTable: () => 'DataTable' })); jest.mock('./ReasonInput', () => 'ReasonInput'); jest.mock('./AdjustedGradeInput', () => 'AdjustedGradeInput'); diff --git a/src/components/GradesView/GradebookTable/__snapshots__/test.jsx.snap b/src/components/GradesView/GradebookTable/__snapshots__/test.jsx.snap index c6899cf6..cd4bb27b 100644 --- a/src/components/GradesView/GradebookTable/__snapshots__/test.jsx.snap +++ b/src/components/GradesView/GradebookTable/__snapshots__/test.jsx.snap @@ -4,78 +4,45 @@ exports[`GradebookTable component snapshot - fields1 and 2 between email and tot
-
- , - "accessor": "Username", - }, - Object { - "Header": , - "accessor": "Email", - }, - Object { - "Header": "field1", - "accessor": "field1", - }, - Object { - "Header": "field2", - "accessor": "field2", - }, - Object { - "Header": , - "accessor": "Total Grade (%)", - }, - ] - } - data={ - Array [ - "mappedRow: 1", - "mappedRow: 2", - "mappedRow: 3", - ] - } - dataViewToggleOptions={ + -
+ "Header": , + "accessor": "Username", + }, + Object { + "Header": , + "accessor": "Email", + }, + Object { + "Header": "field1", + "accessor": "field1", + }, + Object { + "Header": "field2", + "accessor": "field2", + }, + Object { + "Header": , + "accessor": "Total Grade (%)", + }, + ] + } + data={ + Array [ + "mappedRow: 1", + "mappedRow: 2", + "mappedRow: 3", + ] + } + hasFixedColumnWidths={true} + itemCount={3} + rowHeaderColumnKey="username" + />
`; diff --git a/src/components/GradesView/GradebookTable/test.jsx b/src/components/GradesView/GradebookTable/test.jsx index 2839b6bc..0d821585 100644 --- a/src/components/GradesView/GradebookTable/test.jsx +++ b/src/components/GradesView/GradebookTable/test.jsx @@ -11,6 +11,7 @@ import Fields from './Fields'; import messages from './messages'; import { GradebookTable, mapStateToProps } from '.'; +jest.mock('@edx/paragon', () => ({ DataTable: () => 'DataTable' })); jest.mock('./Fields', () => ({ __esModule: true, default: {