diff --git a/integration_tests/e2e/compliance.cy.ts b/integration_tests/e2e/compliance.cy.ts index af2805db..54a02ca2 100644 --- a/integration_tests/e2e/compliance.cy.ts +++ b/integration_tests/e2e/compliance.cy.ts @@ -17,7 +17,7 @@ context('Compliance', () => { page.getRowData('breach1', 'startDate', 'Value').should('contain.text', '2 March 2020') page.getRowData('breach1', 'status', 'Value').should('contain.text', 'An active breach status') - page.getCardHeader('activity1').should('contain.text', '10 days RAR, 9 completed') + page.getCardHeader('activity1').should('contain.text', '9 of 10 RAR days completed') page.getRowData('activity1', 'appointments', 'Value').should('contain.text', '1 national standard appointments') page.getRowData('activity1', 'withoutOutcome', 'Value').should('contain.text', '3 without a recorded outcome') diff --git a/integration_tests/e2e/overview.cy.ts b/integration_tests/e2e/overview.cy.ts index be47eb5e..0e3edff6 100644 --- a/integration_tests/e2e/overview.cy.ts +++ b/integration_tests/e2e/overview.cy.ts @@ -28,6 +28,7 @@ context('Overview', () => { .should('contain.text', 'Committed/ Transferred to Crown: Life imprisonment (Adult)') page.getRowData('personalDetails', 'disabilities', 'Value').should('contain.text', 'Dyslexia, Arthritis') page.getRowData('personalDetails', 'adjustments', 'Value').should('contain.text', 'Hand Rails, Special Furniture') + page.getCardHeader('sentence2').should('contain.text', 'ORA Community Order') page .getRowData('sentence2', 'mainOffence', 'Value') .should( @@ -35,12 +36,13 @@ context('Overview', () => { '(Having possession a picklock or other implement with intent to break into any premises - 18502)', ) page.getRowData('sentence2', 'order', 'Value').should('contain.text', 'ORA Community Order') - page.getRowData('sentence2', 'requirements', 'Value').should('contain.text', '10 days RAR, 9 completed') + page.getRowData('sentence2', 'requirements', 'Value').should('contain.text', '9 of 10 RAR days completed') + page.getCardHeader('sentence3').should('contain.text', '12 month Community order') page .getRowData('sentence3', 'mainOffence', 'Value') .should('contain.text', 'Breach of Restraining Order (Protection from Harassment Act 1997) - 00831') page.getRowData('sentence3', 'order', 'Value').should('contain.text', '12 month Community order') - page.getRowData('sentence3', 'requirements', 'Value').should('contain.text', '16 days RAR, 14 completed') + page.getRowData('sentence3', 'requirements', 'Value').should('contain.text', '14 of 16 RAR days completed') page .getRowData('activityAndCompliance', 'previousOrders', 'Value') .should('contain.text', '1 previous orders (No breaches on previous orders)') diff --git a/server/views/pages/compliance/_compliance-current-order.njk b/server/views/pages/compliance/_compliance-current-order.njk index 44fb0e79..b1641b67 100644 --- a/server/views/pages/compliance/_compliance-current-order.njk +++ b/server/views/pages/compliance/_compliance-current-order.njk @@ -17,7 +17,7 @@ {% if sentence.rar and sentence.rarCategory %} {% set queryParams = '?requirement=' + sentence.rarCategory | toSlug %} {% set requirements %} - {{ sentence.rar.totalDays }} days RAR, {{ sentence.rar.completed }} completed + {{ sentence.rar.completed }} of {{ sentence.rar.totalDays }} RAR days completed {% endset %} {% else %} {% set requirements = false %} diff --git a/server/views/pages/overview.njk b/server/views/pages/overview.njk index 40f84e3a..6816a095 100644 --- a/server/views/pages/overview.njk +++ b/server/views/pages/overview.njk @@ -285,7 +285,7 @@ {% endset %} {% set requirements %} {% if sentence.rar %} - {{ sentence.rar.totalDays }} days RAR, {{ sentence.rar.completed }} completed + {{ sentence.rar.completed }} of {{ sentence.rar.totalDays }} RAR days completed {% endif %} {% endset %} {% set mainOffence %} @@ -321,7 +321,7 @@ {% endset %} {{ appSummaryCard({ - titleText: 'Sentence (' + sentence.eventNumber + ')', + titleText: sentence.order.description, classes: 'govuk-!-margin-bottom-6 app-summary-card--large-title', attributes: {'data-qa': 'sentence' + sentence.eventNumber + 'Card'}, html: sentenceHtml,