Skip to content

Commit

Permalink
MAN-36 update RAR count display on overview and compliance pages
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-mills committed Jan 9, 2025
1 parent 51f9da9 commit a47edb4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion integration_tests/e2e/compliance.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
6 changes: 4 additions & 2 deletions integration_tests/e2e/overview.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,21 @@ 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(
'contain.text',
'(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)')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
4 changes: 2 additions & 2 deletions server/views/pages/overview.njk
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a47edb4

Please sign in to comment.