From c801b1006bf6c8fc7f93bdcb8e664b74a7d2f5e4 Mon Sep 17 00:00:00 2001 From: JackReeveMoJ Date: Tue, 5 Nov 2024 15:41:42 +0000 Subject: [PATCH] MIC-734: Investigation confirmation screens (#315) --- .../record-investigation/confirmation/tests.cy.ts | 13 +++++++++++-- .../record-investigation/confirmation/view.njk | 7 ++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/server/routes/journeys/record-investigation/confirmation/tests.cy.ts b/server/routes/journeys/record-investigation/confirmation/tests.cy.ts index 7df6c9cd..522f70f4 100644 --- a/server/routes/journeys/record-investigation/confirmation/tests.cy.ts +++ b/server/routes/journeys/record-investigation/confirmation/tests.cy.ts @@ -28,10 +28,10 @@ context('test /record-investigation/confirmation', () => { const validatePageContents = () => { cy.findByRole('link', { name: /Digital Prison Services/ }).should('be.visible') - cy.findByRole('link', { name: /CSIP/ }).should('be.visible') + cy.get('.csip-breadcrumbs__breadcrumbs').findByRole('link', { name: /CSIP/ }).should('be.visible') cy.findByText('CSIP investigation recorded').should('be.visible') - cy.findByText('We’ve updated the status of the referral to ‘awaiting decision’.').should('be.visible') + cy.findByText('Status: Awaiting decision').should('be.visible') cy.findByRole('heading', { name: /What needs to happen next/ }).should('be.visible') cy.findByText( @@ -40,5 +40,14 @@ context('test /record-investigation/confirmation', () => { cy.findByText( 'If the Custodial Manager is not available then another appropriate person can do this, such as the Residential Governor or a Safer Custody team member.', ).should('be.visible') + + cy.findByRole('link', { name: 'View CSIP details for Testname User' }) + .should('be.visible') + .and('have.attr', 'href') + .and('match', /\/manage-csips\?query=A1111AA$/) + cy.findByRole('link', { name: 'View all CSIPs for Leeds (HMP)' }) + .should('be.visible') + .and('have.attr', 'href') + .and('match', /\/manage-csips\?clear=true$/) } }) diff --git a/server/routes/journeys/record-investigation/confirmation/view.njk b/server/routes/journeys/record-investigation/confirmation/view.njk index 62bfb518..38bdb385 100644 --- a/server/routes/journeys/record-investigation/confirmation/view.njk +++ b/server/routes/journeys/record-investigation/confirmation/view.njk @@ -6,11 +6,12 @@ {% block innerContent %} {{ govukPanel({ - titleText: "CSIP investigation recorded" + titleText: "CSIP investigation recorded", + html: "Status: Awaiting decision" }) }} -

We’ve updated the status of the referral to ‘awaiting decision’.

-

What needs to happen next

The Custodial Manager should assess the findings of the investigation and make a decision about whether {{ prisoner | firstNameSpaceLastName }} needs to be placed on a CSIP.

If the Custodial Manager is not available then another appropriate person can do this, such as the Residential Governor or a Safer Custody team member.

+ + {% include "../../base/components/view-other-csips.njk" %} {% endblock %}