-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[10-10CG] Update Facility Confirmation Page #33807
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,22 +31,8 @@ describe('CG <FacilityConfirmation>', () => { | |
const { getByText, getByRole } = render( | ||
<FacilityConfirmation {...props} />, | ||
); | ||
const selectedFacilityAddress = selectedFacility.address.physical; | ||
const caregiverFacilityAddress = caregiverFacility.address.physical; | ||
|
||
const selectors = () => ({ | ||
selectedFacility: { | ||
name: getByText(new RegExp(selectedFacility.name)), | ||
address1: getByText(new RegExp(selectedFacilityAddress.address1)), | ||
address2: getByText(new RegExp(selectedFacilityAddress.address2)), | ||
address3: getByText(new RegExp(selectedFacilityAddress.address3)), | ||
}, | ||
caregiverFacility: { | ||
name: getByText(new RegExp(caregiverFacility.name)), | ||
address1: getByText(new RegExp(caregiverFacilityAddress.address1)), | ||
address2: getByText(new RegExp(caregiverFacilityAddress.address2)), | ||
address3: getByText(new RegExp(caregiverFacilityAddress.address3)), | ||
}, | ||
formNavButtons: { | ||
back: getByText('Back'), | ||
forward: getByText('Continue'), | ||
|
@@ -103,65 +89,23 @@ describe('CG <FacilityConfirmation>', () => { | |
}); | ||
}); | ||
|
||
it('renders selected facility description text', () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Went ahead and removed this test since it wasn't really adding value. |
||
const { getByRole, getByText } = subject(); | ||
expect( | ||
getByRole('heading', { | ||
level: 3, | ||
name: /Confirm your health care facilities/i, | ||
}), | ||
).to.be.visible; | ||
expect( | ||
getByRole('heading', { | ||
level: 4, | ||
name: /The Veteran’s Facility you selected/i, | ||
}), | ||
).to.be.visible; | ||
expect( | ||
getByText( | ||
/This is the facility where you told us the Veteran receives or plans to receive treatment/i, | ||
), | ||
).to.be.visible; | ||
}); | ||
|
||
it('should render veteran selected facility name', () => { | ||
const { selectors } = subject(); | ||
expect(selectors().selectedFacility.name).to.exist; | ||
}); | ||
|
||
it('should render veteran selected facility address', () => { | ||
const { selectors } = subject(); | ||
|
||
expect(selectors().selectedFacility.address1).to.exist; | ||
expect(selectors().selectedFacility.address2).to.exist; | ||
expect(selectors().selectedFacility.address3).to.exist; | ||
}); | ||
|
||
it('renders caregive facility description text', () => { | ||
const { getByRole, getByText } = subject(); | ||
expect( | ||
getByRole('heading', { | ||
level: 4, | ||
name: /Your assigned caregiver support facility/i, | ||
}), | ||
).to.be.visible; | ||
expect( | ||
getByText( | ||
/This is the facility we’ve assigned to support you in the application process and has a caregiver support coordinator on staff. The coordinator at this facility will support you through the application process./i, | ||
), | ||
).to.be.visible; | ||
}); | ||
it('should render caregiver facility name and address', () => { | ||
const { getByText } = subject(); | ||
const caregiverFacilityAddress = caregiverFacility.address.physical; | ||
|
||
it('should render caregiver facility name', () => { | ||
const { selectors } = subject(); | ||
expect(selectors().caregiverFacility.name).to.exist; | ||
expect(getByText(new RegExp(caregiverFacility.name))).to.exist; | ||
expect(getByText(new RegExp(caregiverFacilityAddress.address1))).to.exist; | ||
expect(getByText(new RegExp(caregiverFacilityAddress.address2))).to.exist; | ||
expect(getByText(new RegExp(caregiverFacilityAddress.address3))).to.exist; | ||
}); | ||
|
||
it('should render caregiver facility address', () => { | ||
const { selectors } = subject(); | ||
it('should render veteran selected facility name and address', () => { | ||
const { getByText } = subject(); | ||
const selectedFacilityAddress = selectedFacility.address.physical; | ||
|
||
expect(selectors().caregiverFacility.address1).to.exist; | ||
expect(selectors().caregiverFacility.address2).to.exist; | ||
expect(selectors().caregiverFacility.address3).to.exist; | ||
expect(getByText(new RegExp(selectedFacility.name))).to.exist; | ||
expect(getByText(new RegExp(selectedFacilityAddress.address1))).to.exist; | ||
expect(getByText(new RegExp(selectedFacilityAddress.address2))).to.exist; | ||
expect(getByText(new RegExp(selectedFacilityAddress.address3))).to.exist; | ||
}); | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced these with selectors in the specs to simplify these tests a bit.