Fixes on SearchResults.test.js

flag=none

test plan:
  - Specs pass

qa risk: low

Change-Id: Id1db6f114f2a4a722032d06902601eaf83df198f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274385
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
This commit is contained in:
Omar Gerardo Soto-Fortuño 2021-09-24 13:42:15 -04:00 committed by Omar Soto-Fortuño
parent 98863c2f27
commit 5eb856c60b
2 changed files with 4 additions and 5 deletions

View File

@ -108,8 +108,6 @@ const ignoredErrors = [
/The prop `imageUrl` is marked as required in `GenericErrorPage`/,
/The prop `isLiked` is marked as required in `Like`/,
/The prop `isLoading` is marked as required in `LoadingWrapper`/,
/The prop `item.assignment.name` is marked as required in `Row`/,
/The prop `item.gradedAnonymously` is marked as required in `Row`/,
/The prop `jwt` is marked as required in `CanvasContentTray`/,
/The prop `label` is marked as required in `(CanvasInstUIModal|FormField|FormFieldLayout|Modal)`/,
/The prop `listDeveloperKeyScopesSet` is marked as required in `(Scopes|ScopesList)`/,

View File

@ -39,7 +39,8 @@ const item = {
pointsPossibleAfter: '30',
pointsPossibleCurrent: '30',
student: 'Norval Abbott',
time: '11:16pm'
time: '11:16pm',
gradedAnonymously: false
}
function WrappedComponent(props) {
@ -74,13 +75,13 @@ describe('SearchResultsRow', () => {
})
it('displays placeholder text if assignment is anonymous and muted', () => {
expect(renderAndGetRow(2, {assignment: {anonymousGrading: true, muted: true}})).toBe(
expect(renderAndGetRow(2, {assignment: {name: '', anonymousGrading: true, muted: true}})).toBe(
'Not available; assignment is anonymous'
)
})
it('displays placeholder text if student name is missing', () => {
expect(renderAndGetRow(2, {student: null})).toBe('Not available')
expect(renderAndGetRow(2, {student: ''})).toBe('Not available')
})
it('displays the history grader', () => {