Skip to content

Commit

Permalink
VB-5151 Update table availability text on Select date/time page (#929)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpmcgowan authored Feb 4, 2025
1 parent 3639e99 commit 08995ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/views/pages/bookAVisit/dateAndTime.njk
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<br>
{{ slot.capacity + (slot.availableTables | abs) }} of {{ slot.capacity}} {{ "table" | pluralise(slot.capacity) }} booked
{%- else -%}
{{ slot.availableTables }} {{ "table" | pluralise(slot.availableTables) }} available
{{ slot.availableTables }} {{ "table" | pluralise(slot.availableTables) }} available of {{ slot.capacity }} {{ "table" | pluralise(slot.capacity) }}
{%- endif %}
{% endset %}

Expand Down
6 changes: 3 additions & 3 deletions server/views/pages/bookAVisit/dateAndTime.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ describe('Views - Date and time of visit', () => {
expect($('#slots-month-February2022-heading-1').text().trim()).toBe('Monday 14 February')
expect($('#slots-month-February2022-content-1 h3').eq(0).text()).toBe('Morning')
expect($('label[for="1"]').text()).toContain('10am to 11am')
expect($('label[for="1"]').text()).toContain('15 tables available')
expect($('label[for="1"]').text()).toContain('15 tables available of 30 tables')
expect($('label[for="2"]').text()).toContain('11:59am to 12:59pm')
expect($('label[for="2"]').text()).toContain('1 table available')
expect($('label[for="2"]').text()).toContain('1 table available of 30 tables')
expect($('label[for="3"]').text()).toContain('12pm to 1:05pm')
expect($('label[for="3"]').text()).toContain('Prisoner has a visit')
expect($('#3').attr('disabled')).toBe('disabled')
Expand Down Expand Up @@ -252,7 +252,7 @@ describe('Views - Date and time of visit', () => {

expect($('#1').prop('checked')).toBe(false)
expect($('label[for="1"]').text()).toContain('10am to 11am')
expect($('label[for="1"]').text()).toContain('15 tables available')
expect($('label[for="1"]').text()).toContain('15 tables available of 30 tables')
})

it('should correctly label currently reserved slot when booking a visit', () => {
Expand Down

0 comments on commit 08995ce

Please sign in to comment.