diff --git a/assets/scss/application.scss b/assets/scss/application.scss index b4b2b8ed..9f74ea9b 100755 --- a/assets/scss/application.scss +++ b/assets/scss/application.scss @@ -15,7 +15,7 @@ $govuk-page-width: $moj-page-width; @import './components/field-and-button-group'; @import './components/header'; @import './components/footer'; -@import './components/key-prisoner-details'; +@import './components/mini-profile-header'; @import './components/prisoner-photo'; @import './components/sortable-table'; @import './page/list'; diff --git a/assets/scss/components/_key-prisoner-details.scss b/assets/scss/components/_mini-profile-header.scss similarity index 64% rename from assets/scss/components/_key-prisoner-details.scss rename to assets/scss/components/_mini-profile-header.scss index f728466c..4afa021d 100644 --- a/assets/scss/components/_key-prisoner-details.scss +++ b/assets/scss/components/_mini-profile-header.scss @@ -1,23 +1,23 @@ -.app-key-prisoner-details { - @extend .govuk-\!-padding-4; +.dps-mini-profile-header { + @extend .govuk-\!-padding-3; display: flex; flex-direction: row; align-items: start; background: govuk-colour('light-grey'); .app-prisoner-photo--small { - margin-right: 50px; + margin-right: govuk-spacing(6); } dl { - margin-right: 80px; + margin-right: govuk-spacing(9); &:last-child { margin-right: 0; } } - .app-key-prisoner-details--align-right { + .dps-mini-profile-header--align-right { align-self: center; margin-left: auto; @@ -35,6 +35,14 @@ dl { margin-right: 0; + + &:last-child { + margin-bottom: 0; + + dd { + margin-bottom: 0; + } + } } } } diff --git a/assets/scss/components/_prisoner-photo.scss b/assets/scss/components/_prisoner-photo.scss index 25815b53..48c9041e 100644 --- a/assets/scss/components/_prisoner-photo.scss +++ b/assets/scss/components/_prisoner-photo.scss @@ -4,7 +4,7 @@ .app-prisoner-photo--small { @extend .app-prisoner-photo; - width: 70px; + width: 80px; } .app-prisoner-photo--large { diff --git a/integration_tests/e2e/list.cy.ts b/integration_tests/e2e/list.cy.ts index f7af2337..cc9b3d7b 100644 --- a/integration_tests/e2e/list.cy.ts +++ b/integration_tests/e2e/list.cy.ts @@ -24,9 +24,9 @@ context('List non-associations page', () => { }) it('should show key prisoner’s details', () => { - listPage.keyPrisonerBox.should('contain.text', 'Jones, David') - listPage.keyPrisonerBox.should('contain.text', davidJones.prisonerNumber) - listPage.keyPrisonerBox.should('contain.text', davidJones.cellLocation) + listPage.miniProfileHeader.should('contain.text', 'Jones, David') + listPage.miniProfileHeader.should('contain.text', davidJones.prisonerNumber) + listPage.miniProfileHeader.should('contain.text', davidJones.cellLocation) }) it('should have open tab selected', () => { diff --git a/integration_tests/e2e/view.cy.ts b/integration_tests/e2e/view.cy.ts index 7113c8cd..3385e718 100644 --- a/integration_tests/e2e/view.cy.ts +++ b/integration_tests/e2e/view.cy.ts @@ -16,10 +16,10 @@ context('View non-association details page', () => { }) it('should show key prisoner’s details', () => { - viewPage.keyPrisonerBox.should('contain.text', 'Jones, David') - viewPage.keyPrisonerBox.should('contain.text', davidJones.prisonerNumber) - viewPage.keyPrisonerBox.should('contain.text', davidJones.cellLocation) - viewPage.keyPrisonerBox.should('contain.text', 'Perpetrator') + viewPage.miniProfileHeader.should('contain.text', 'Jones, David') + viewPage.miniProfileHeader.should('contain.text', davidJones.prisonerNumber) + viewPage.miniProfileHeader.should('contain.text', davidJones.cellLocation) + viewPage.miniProfileHeader.should('contain.text', 'Perpetrator') }) it('should show other prisoner’s details', () => { diff --git a/integration_tests/pages/nonAssociations/list.ts b/integration_tests/pages/nonAssociations/list.ts index 9209e6b2..1bb8f648 100644 --- a/integration_tests/pages/nonAssociations/list.ts +++ b/integration_tests/pages/nonAssociations/list.ts @@ -21,8 +21,8 @@ export default class ListPage extends Page { return this.tabs.eq(1) } - get keyPrisonerBox(): PageElement { - return cy.get('.app-key-prisoner-details') + get miniProfileHeader(): PageElement { + return cy.get('.dps-mini-profile-header') } get tables(): PageElement { diff --git a/integration_tests/pages/nonAssociations/view.ts b/integration_tests/pages/nonAssociations/view.ts index 7ab281bb..8ae338ab 100644 --- a/integration_tests/pages/nonAssociations/view.ts +++ b/integration_tests/pages/nonAssociations/view.ts @@ -8,8 +8,8 @@ export default class ViewPage extends Page { super(`Non-association: ${prisonerName} and ${otherPrisonerName}`) } - get keyPrisonerBox(): PageElement { - return cy.get('.app-key-prisoner-details') + get miniProfileHeader(): PageElement { + return cy.get('.dps-mini-profile-header') } get otherPrisonerBox(): PageElement { diff --git a/server/views/pages/list.njk b/server/views/pages/list.njk index ebb9bc03..ef9a1565 100644 --- a/server/views/pages/list.njk +++ b/server/views/pages/list.njk @@ -21,7 +21,7 @@ {{ prisonerName | possessiveName}} non-associations - {% include "../partials/keyPrisonerDetailsForList.njk" %} + {% include "../partials/miniProfileHeaderForList.njk" %}