This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(appointments): adds new appointment route
- Loading branch information
1 parent
a00c0c6
commit 86c9a32
Showing
8 changed files
with
107 additions
and
2 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
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
23 changes: 23 additions & 0 deletions
23
src/__tests__/scheduling/appointments/new/NewAppointment.test.tsx
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import '../../../../__mocks__/matchMediaMock' | ||
import React from 'react' | ||
import NewAppointment from 'scheduling/appointments/new/NewAppointment' | ||
import { MemoryRouter } from 'react-router' | ||
import store from 'store' | ||
import { Provider } from 'react-redux' | ||
import { mount } from 'enzyme' | ||
import * as titleUtil from '../../../../page-header/useTitle' | ||
|
||
describe('New Appointment', () => { | ||
it('should use "New Appointment" as the header', () => { | ||
jest.spyOn(titleUtil, 'default') | ||
mount( | ||
<Provider store={store}> | ||
<MemoryRouter> | ||
<NewAppointment /> | ||
</MemoryRouter> | ||
</Provider>, | ||
) | ||
|
||
expect(titleUtil.default).toHaveBeenCalledWith('scheduling.appointments.new') | ||
}) | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react' | ||
import useTitle from 'page-header/useTitle' | ||
import { useTranslation } from 'react-i18next' | ||
|
||
const NewAppointment = () => { | ||
const { t } = useTranslation() | ||
useTitle(t('scheduling.appointments.new')) | ||
|
||
return <h1>{t('scheduling.appointments.new')}</h1> | ||
} | ||
|
||
export default NewAppointment |
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