Skip to content

Commit

Permalink
fix uncaught TypeError in k5 tests
Browse files Browse the repository at this point in the history
If no mocks are provided, the accounts break when sorting by name

test plan:
  - run `yarn test:jest ui/features/k5_dashboard/react/__tests__/CreateCourseModal.test.js`
    - notice somewhat clean test logs
  - remove the change
  - rerun `yarn test:jest ui/features/k5_dashboard/react/__tests__/CreateCourseModal.test.js`
    - notice :barf: of red

qa risk: low

Change-Id: I7286ae6cc0bc4ba0ad75929f232cfbf7186e2eae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/273943
Tested-by: Service Cloud Jenkins <[email protected]>
Reviewed-by: Omar Soto-Fortuño <[email protected]>
QA-Review: Omar Soto-Fortuño <[email protected]>
Product-Review: Omar Soto-Fortuño <[email protected]>
  • Loading branch information
davishyer committed Sep 21, 2021
1 parent e4ff312 commit 91deed4
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ describe('CreateCourseModal', () => {
})

it('shows a spinner with correct title while loading accounts', async () => {
fetchMock.get(MANAGEABLE_COURSES_URL, MANAGEABLE_COURSES)
const {getByText} = render(<CreateCourseModal {...getProps()} />)
await waitFor(() => expect(getByText('Loading accounts...')).toBeInTheDocument())
})
Expand Down

0 comments on commit 91deed4

Please sign in to comment.