spec: fix one jest ignored error
Closes CTA-6 Test Plan: passes Jenkins Change-Id: Ie58364e94213b1d70c11daf27e1362e7b3c48a28 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275295 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Product-Review: Robin Kuss <rkuss@instructure.com> Reviewed-by: Jackson Howe <jackson.howe@instructure.com> QA-Review: Jackson Howe <jackson.howe@instructure.com>
This commit is contained in:
parent
2b1dc0b9ea
commit
4e8e59b9c1
|
@ -77,8 +77,6 @@ const ignoredErrors = [
|
|||
/The 'screenReaderOnly' prop must be used in conjunction with 'liveRegion'/,
|
||||
/The above error occurred in the <.*> component/,
|
||||
/The prop `activeMailbox` is marked as required in `MailboxSelectionDropdown`/,
|
||||
/The prop `app.courses\[0\].id` is marked as required in `K5AppLink`/,
|
||||
/The prop `apps\[0\].courses\[0\].id` is marked as required in `AppsList`/,
|
||||
/The prop `avatarName` is marked as required in `UserLink`/,
|
||||
/The prop `canAddObservee` is marked as required in `(K5Dashboard|ObserverOptions|ResponsiveK5Dashboard)`/,
|
||||
/The prop `canReadAnnouncements` is marked as required in `(K5Announcement|K5Course)`/,
|
||||
|
|
|
@ -39,14 +39,18 @@ const defaultAppsResponse = [
|
|||
course_navigation: {
|
||||
text: 'Google Apps',
|
||||
icon_url: 'google.png'
|
||||
}
|
||||
},
|
||||
context_id: '100',
|
||||
context_name: 'new course'
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
course_navigation: {
|
||||
text: 'Attendance',
|
||||
icon_url: 'xyz123.png'
|
||||
}
|
||||
},
|
||||
context_id: '100',
|
||||
context_name: 'new course 2'
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -160,7 +164,9 @@ describe('ResourcesPage', () => {
|
|||
course_navigation: {
|
||||
text: 'Google Apps'
|
||||
},
|
||||
icon_url: '2.png'
|
||||
icon_url: '2.png',
|
||||
context_id: '100',
|
||||
context_name: 'new course'
|
||||
}
|
||||
]
|
||||
utils.fetchCourseApps.mockReturnValue(Promise.resolve(response))
|
||||
|
@ -172,7 +178,14 @@ describe('ResourcesPage', () => {
|
|||
})
|
||||
|
||||
it("doesn't fail if course_navigation property is null", async () => {
|
||||
const response = [{id: '3'}]
|
||||
const response = [
|
||||
{
|
||||
id: '3',
|
||||
context_id: '100',
|
||||
context_name: 'Biology',
|
||||
name: 'App'
|
||||
}
|
||||
]
|
||||
utils.fetchCourseApps.mockReturnValue(Promise.resolve(response))
|
||||
const {getByText, queryByText} = render(<ResourcesPage {...getProps()} />)
|
||||
await waitFor(() => expect(getByText('Student Applications')).toBeInTheDocument())
|
||||
|
|
Loading…
Reference in New Issue