generated from openedx/frontend-template-application
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
1,658 additions
and
1,234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
import React from 'react'; | ||
import { render } from '@testing-library/react'; | ||
import DashboardPage from 'features/Dashboard/DashboardPage'; | ||
import { InstitutionContext } from 'features/Main/institutionContext'; | ||
import '@testing-library/jest-dom/extend-expect'; | ||
import { Provider } from 'react-redux'; | ||
import { initializeStore } from 'store'; | ||
|
||
let store; | ||
|
||
describe('DashboardPage component', () => { | ||
beforeEach(() => { | ||
store = initializeStore(); | ||
}); | ||
test('renders components', () => { | ||
const { getByText } = render( | ||
<InstitutionContext.Provider value={[{ id: 1, name: 'Institution Name' }]}> | ||
<Provider store={store}> | ||
<DashboardPage /> | ||
</InstitutionContext.Provider>, | ||
</Provider>, | ||
); | ||
|
||
expect(getByText('This week')).toBeInTheDocument(); | ||
expect(getByText('Next week')).toBeInTheDocument(); | ||
expect(getByText('Next month')).toBeInTheDocument(); | ||
expect(getByText('New students registered')).toBeInTheDocument(); | ||
expect(getByText('Classes scheduled')).toBeInTheDocument(); | ||
expect(getByText('Welcome to Institution Name')).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 0 additions & 53 deletions
53
src/features/Instructors/AddInstructors/_test_/reducer.test.jsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.