generated from ministryofjustice/hmpps-template-typescript
-
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.
Show POM details below Referrer details
- Loading branch information
1 parent
261dec7
commit 4a099cb
Showing
6 changed files
with
99 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
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ import { | |
referralFactory, | ||
referralStatusHistoryFactory, | ||
referralStatusRefDataFactory, | ||
staffDetailFactory, | ||
} from '../../testutils/factories' | ||
import CourseUtils from '../courseUtils' | ||
import type { ReferralStatusHistoryPresenter } from '@accredited-programmes/ui' | ||
|
@@ -348,6 +349,22 @@ describe('ShowReferralUtils', () => { | |
key: { text: 'Referrer email address' }, | ||
value: { html: `<a href="mailto:${referrerEmail}">${referrerEmail}</a>` }, | ||
}, | ||
{ | ||
key: { | ||
text: 'Prison Offender Manager', | ||
}, | ||
value: { | ||
text: 'Not assigned', | ||
}, | ||
}, | ||
{ | ||
key: { | ||
text: 'Prison Offender Manager email address', | ||
}, | ||
value: { | ||
text: 'Not assigned', | ||
}, | ||
}, | ||
]) | ||
}) | ||
|
||
|
@@ -365,6 +382,40 @@ describe('ShowReferralUtils', () => { | |
) | ||
}) | ||
}) | ||
|
||
describe('when the referral has a prison offender manager assigned', () => { | ||
const referral = referralFactory.submitted().build({ | ||
primaryPrisonOffenderManager: staffDetailFactory.build({ | ||
firstName: 'Bob', | ||
lastName: 'Smith', | ||
primaryEmail: '[email protected]', | ||
}), | ||
}) | ||
|
||
it('returns the prison offender manager details', () => { | ||
expect( | ||
ShowReferralUtils.submissionSummaryListRows( | ||
referral.submittedOn, | ||
'Test User', | ||
'[email protected]', | ||
referral.primaryPrisonOffenderManager, | ||
), | ||
).toEqual( | ||
expect.arrayContaining([ | ||
{ | ||
key: { text: 'Prison Offender Manager' }, | ||
value: { text: 'Bob Smith' }, | ||
}, | ||
{ | ||
key: { text: 'Prison Offender Manager email address' }, | ||
value: { | ||
html: '<a href="mailto:[email protected]">[email protected]</a>', | ||
}, | ||
}, | ||
]), | ||
) | ||
}) | ||
}) | ||
}) | ||
|
||
describe('subNavigationItems', () => { | ||
|
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