Fix missing attributes on StudentOutcomeScore.test.js

flag=none

test plan:
  - Specs pass

qa risk: low

Change-Id: Ibccc31b1937c9463e3dcc009f9f3c8e0fc5136c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277292
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
This commit is contained in:
Omar Gerardo Soto-Fortuño 2021-11-03 10:42:57 -04:00 committed by Omar Soto-Fortuño
parent ffb416e3b4
commit 94c5e42ba8
2 changed files with 13 additions and 3 deletions

View File

@ -104,7 +104,6 @@ const ignoredErrors = [
/The prop `permissionName` is marked as required in `PermissionTray`/,
/The prop `rcsProps.canUploadFiles` is marked as required in `ForwardRef`/,
/The prop `renderLabel` is marked as required in `(FileDrop|NumberInput|Select)`/,
/The prop `rollup.outcomeId` is marked as required in `StudentOutcomeScore`/,
/The prop `rootId` is marked as required in `GroupSelectionDrillDown`/,
/The prop `screenReaderLabel` is marked as required in `IconButton`/,
/Unexpected keys "searchPermissions", "filterRoles", "tabChanged", "setAndOpenAddTray" found in preloadedState argument passed to createStore/,

View File

@ -33,10 +33,12 @@ describe('StudentOutcomeScore', () => {
ratings: []
},
rollup: {
outcomeId: '1',
rating: {
color: 'FFFFF',
points: 3,
description: 'great!'
description: 'great!',
mastery: false
}
},
...props
@ -62,7 +64,16 @@ describe('StudentOutcomeScore', () => {
})
it('renders ScreenReaderContent with "Unassessed" if there is no rollup rating', () => {
const {getByText} = render(<StudentOutcomeScore {...defaultProps({rollup: {}})} />)
const {getByText} = render(
<StudentOutcomeScore
{...defaultProps({
rollup: {
outcomeId: '1',
rating: {points: 3, color: 'FFFFF', description: '', mastery: false}
}
})}
/>
)
expect(getByText('Unassessed')).toBeInTheDocument()
})
})