-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
some content tweaks and added validation for existing upcoming appoin…
…tments
- Loading branch information
Showing
3 changed files
with
110 additions
and
13 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
32 changes: 32 additions & 0 deletions
32
src/applications/vaos/tests/referral-appointments/ChooseDateAndTime.unit.spec.js
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,32 @@ | ||
import React from 'react'; | ||
import { expect } from 'chai'; | ||
// import sinon from 'sinon'; | ||
import userEvent from '@testing-library/user-event'; | ||
import { createTestStore, renderWithStoreAndRouter } from '../mocks/setup'; | ||
import ChooseDateAndTime from '../../referral-appointments/ChooseDateAndTime'; | ||
|
||
// Tests skipped for now since there are issues with displaying TZ and redux/data in flux. | ||
describe('VAOS referral-appointments', () => { | ||
const store = createTestStore(); | ||
// it.skip('should store the selected date', async () => { | ||
// const screen = renderWithStoreAndRouter(<ChooseDateAndTime />, { | ||
// store, | ||
// }); | ||
// }); | ||
it.skip('should validate on submit', async () => { | ||
const screen = renderWithStoreAndRouter(<ChooseDateAndTime />, { | ||
store, | ||
}); | ||
const button = await screen.findByText(/^Continue/); | ||
|
||
userEvent.click(button); | ||
expect( | ||
screen.findByText( | ||
'Please choose your preferred date and time for your appointment', | ||
), | ||
).to.be.ok; | ||
}); | ||
// it('should display the timezone in the correct format', async () => { | ||
|
||
// }); | ||
}); |