diff --git a/integration_tests/e2e/compliance.cy.ts b/integration_tests/e2e/compliance.cy.ts index a5cace65..64f0a66d 100644 --- a/integration_tests/e2e/compliance.cy.ts +++ b/integration_tests/e2e/compliance.cy.ts @@ -18,7 +18,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', '9 of 10 RAR days completed') + page.getCardHeader('activity1').should('contain.text', '12 of 15 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 8cbda8e3..222ef6e7 100644 --- a/integration_tests/e2e/overview.cy.ts +++ b/integration_tests/e2e/overview.cy.ts @@ -37,13 +37,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', '9 of 10 RAR days completed') + page.getRowData('sentence2', 'requirements', 'Value').should('contain.text', '10 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', '14 of 16 RAR days completed') + page.getRowData('sentence3', 'requirements', 'Value').should('contain.text', '16 of 20 RAR days completed') page .getRowData('activityAndCompliance', 'previousOrders', 'Value') .should('contain.text', '1 previous orders (No breaches on previous orders)') diff --git a/server/data/model/compliance.ts b/server/data/model/compliance.ts index 7035daea..0ab31980 100644 --- a/server/data/model/compliance.ts +++ b/server/data/model/compliance.ts @@ -1,5 +1,5 @@ import { PersonSummary } from './common' -import { ActivityCount, Compliance, Offence, Order, PreviousOrders, Rar } from './overview' +import { ActivityCount, Compliance, Offence, Order, PreviousOrders } from './overview' export interface PersonCompliance { personSummary: PersonSummary @@ -13,7 +13,7 @@ export interface SentenceCompliance { mainOffence: Offence order: Order activeBreach?: Breach - rar?: Rar + rarDescription?: string } export interface Breach { diff --git a/server/data/model/overview.ts b/server/data/model/overview.ts index 337e6f50..3295b298 100644 --- a/server/data/model/overview.ts +++ b/server/data/model/overview.ts @@ -21,7 +21,7 @@ export interface Sentence { additionalOffences: Offence[] mainOffence: Offence order?: Order - rar?: Rar + rarDescription?: string } export interface Rar { diff --git a/server/views/pages/compliance/_compliance-current-order.njk b/server/views/pages/compliance/_compliance-current-order.njk index 1d78cf70..9c003363 100644 --- a/server/views/pages/compliance/_compliance-current-order.njk +++ b/server/views/pages/compliance/_compliance-current-order.njk @@ -14,10 +14,10 @@ {% set complianceStatus = getComplianceStatus(failureToComplyCount, sentence.compliance.breachStarted) %} - {% if sentence.rar and sentence.rarCategory %} + {% if sentence.rarDescription and sentence.rarCategory %} {% set queryParams = '?requirement=' + sentence.rarCategory | toSlug %} {% set requirements %} - {{ sentence.rar.completed }} of {{ sentence.rar.totalDays }} RAR days completed + {{ sentence.rarDescription }} {% endset %} {% else %} {% set requirements = false %} diff --git a/server/views/pages/overview.njk b/server/views/pages/overview.njk index 695b38fb..2519cabd 100644 --- a/server/views/pages/overview.njk +++ b/server/views/pages/overview.njk @@ -295,8 +295,8 @@ {% endif %} {% endset %} {% set requirements %} - {% if sentence.rar %} - {{ sentence.rar.completed }} of {{ sentence.rar.totalDays }} RAR days completed + {% if sentence.rarDescription %} + {{ sentence.rarDescription }} {% endif %} {% endset %} {% set mainOffence %} diff --git a/wiremock/mappings/X000001-compliance.json b/wiremock/mappings/X000001-compliance.json index 2d6581d1..976e2035 100644 --- a/wiremock/mappings/X000001-compliance.json +++ b/wiremock/mappings/X000001-compliance.json @@ -67,11 +67,7 @@ "startDate": "2020-03-02", "status": "An active breach status" }, - "rar": { - "completed": 9, - "scheduled": 1, - "totalDays": 10 - }, + "rarDescription": "12 of 15 RAR days completed", "rarCategory": "RAR Category" }, { diff --git a/wiremock/mappings/X000001-full.json b/wiremock/mappings/X000001-full.json index fd3e5e88..2db84813 100644 --- a/wiremock/mappings/X000001-full.json +++ b/wiremock/mappings/X000001-full.json @@ -71,11 +71,7 @@ "endDate": "2024-12-01", "startDate": "2023-12-01" }, - "rar": { - "completed": 14, - "scheduled": 2, - "totalDays": 16 - } + "rarDescription": "16 of 20 RAR days completed" }, { "additionalOffences": [ @@ -98,11 +94,7 @@ "endDate": "2024-09-01", "startDate": "2020-03-02" }, - "rar": { - "completed": 9, - "scheduled": 1, - "totalDays": 10 - } + "rarDescription": "10 of 10 RAR days completed" } ], "activity": {