Skip to content

Commit

Permalink
Merge pull request #318 from ministryofjustice/feature/rst-786-benefi…
Browse files Browse the repository at this point in the history
…t-question

Updating Benefit questions for en and cy.
  • Loading branch information
zaparka authored Mar 1, 2018
2 parents 21c9aa0 + fbe8bd6 commit affd223
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 136 deletions.
30 changes: 5 additions & 25 deletions app/views/questions/forms/_benefit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,11 @@
= t('on_benefits_true', scope: @form.i18n_scope)

.form-group
details
summary = t('summary', scope: "#{@form.i18n_scope}.details")
.text
h2.heading-small = t('heading', scope: "#{@form.i18n_scope}.details.section_2")
p = t('details', scope: "#{@form.i18n_scope}.details.section_2")

.panel-indent
.text
h2.heading-small = t('heading', scope: "#{@form.i18n_scope}.details.section_1")
p = t('details', scope: "#{@form.i18n_scope}.details.section_1")
h2.heading-small = t('heading', scope: "#{@form.i18n_scope}.details.section_1")
p = t('details', scope: "#{@form.i18n_scope}.details.section_1")

h2.heading-small = t('heading', scope: "#{@form.i18n_scope}.details.section_2")
p = t('details', scope: "#{@form.i18n_scope}.details.section_2")

ul.list.list-bullet
li
= t('name', scope: "#{@form.i18n_scope}.details.section_2.item_1")
span.hint   #{t('hint', scope: "#{@form.i18n_scope}.details.section_2.item_1")}
li
= t('name', scope: "#{@form.i18n_scope}.details.section_2.item_2")
span.hint   #{t('hint', scope: "#{@form.i18n_scope}.details.section_2.item_2")}
li
= t('name', scope: "#{@form.i18n_scope}.details.section_2.item_3")
li
= t('name', scope: "#{@form.i18n_scope}.details.section_2.item_4")
span.hint   #{t('hint', scope: "#{@form.i18n_scope}.details.section_2.item_4")}
li
= t('name', scope: "#{@form.i18n_scope}.details.section_2.item_5")
li
= t('name', scope: "#{@form.i18n_scope}.details.section_2.item_6")
span.hint   #{t('hint', scope: "#{@form.i18n_scope}.details.section_2.item_6")}
49 changes: 35 additions & 14 deletions app/views/questions/headers/_benefit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,40 @@ p = t('header', scope:"#{@form.i18n_scope}.list")

ul.list.list-bullet
li
= t('name', scope: "#{@form.i18n_scope}.list.item_1")
span.hint   #{t('hint', scope: "#{@form.i18n_scope}.list.item_1")}
= t('check_1', scope: "#{@form.i18n_scope}.list")
li
= t('name', scope: "#{@form.i18n_scope}.list.item_2")
span.hint   #{t('hint', scope: "#{@form.i18n_scope}.list.item_2")}
= t('check_2', scope: "#{@form.i18n_scope}.list")
li
= t('name', scope: "#{@form.i18n_scope}.list.item_3")
li
= t('name', scope: "#{@form.i18n_scope}.list.item_4")
span.hint   #{t('hint', scope: "#{@form.i18n_scope}.list.item_4")}
li
= t('name', scope: "#{@form.i18n_scope}.list.item_5")
span.hint   #{t('hint', scope: "#{@form.i18n_scope}.list.item_5")}
li
= t('name', scope: "#{@form.i18n_scope}.list.item_6")
span.hint   #{t('hint', scope: "#{@form.i18n_scope}.list.item_6")}
= t('check_3', scope: "#{@form.i18n_scope}.list")

table
tr
th
= t('name', scope: "#{@form.i18n_scope}.list.column_1")
br
= t('header', scope: "#{@form.i18n_scope}.list.column_1")

th
= t('name', scope: "#{@form.i18n_scope}.list.column_2")
br
= t('header', scope: "#{@form.i18n_scope}.list.column_2")
tr
td = t('item_1', scope: "#{@form.i18n_scope}.list.column_1")
td = t('item_1', scope: "#{@form.i18n_scope}.list.column_2")
tr
td = t('item_2', scope: "#{@form.i18n_scope}.list.column_1")
td = t('item_2', scope: "#{@form.i18n_scope}.list.column_2")
tr
td = t('item_3', scope: "#{@form.i18n_scope}.list.column_1")
td = t('item_3', scope: "#{@form.i18n_scope}.list.column_2")
tr
td = t('item_4', scope: "#{@form.i18n_scope}.list.column_1")
td = t('item_4', scope: "#{@form.i18n_scope}.list.column_2")
tr
td = t('item_5', scope: "#{@form.i18n_scope}.list.column_1")
td = t('item_5', scope: "#{@form.i18n_scope}.list.column_2")
tr
td = t('item_6', scope: "#{@form.i18n_scope}.list.column_1")
td  

br
67 changes: 26 additions & 41 deletions config/locales/cy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,52 +297,37 @@ cy:
breadcrumb: Cam 6 o 20
details:
section_1:
details: "(er enghraifft, yn y dyddiau diwethaf), mae'n bosibl na fydd ein staff yn gallu cadarnhau'ch bod yn gymwys gyda'r Adran Gwaith a Phensiynau. Os felly, dylech chi ddarparu llythyr oddi wrth y Ganolfan Waith."
heading: Os mai dim ond yn ddiweddar rydych chi wedi dechrau derbyn un o'r budd-daliadau hyn
details: "efallai na fydd ein staff yn gallu cadarnhau eich cymhwysedd gydar Adran Gwaith a Phensiynau. Yn yr achos hwn, dylech ddarparu llythyr gan y Ganolfan Waith."
heading: Os mai dim ond yn ddiweddar rydych chi wedi dechrau derbyn un o'r budd-daliadau hyn,
section_2:
details: Mae rhai budd-daliadau ag enwau tebyg. Os ydych chi'n derbyn un o'r budd-daliadau yn y rhestr isod, dewiswch 'Na'.
heading: Budd-daliadau ag enwau tebyg
item_1:
hint: "(JSA)"
name: Lwfans Ceisio Gwaith yn Seiliedig ar Gyfraniadau
item_2:
hint: "(ESA)"
name: Lwfans Cyflogaeth a Chymorth yn Seiliedig ar Gyfraniadau
item_3:
hint: ""
name: Credyd Pensiwn a Chredyd Cynilion
item_4:
hint: "(a'ch bod yn ennill mwy na £6,000 y flwyddyn)"
name: Credyd Cynhwysol
item_5:
hint: ""
name: Scottish Legal Aid Advice and Assistance
item_6:
hint: "(ABWOR)"
name: Scottish Legal Aid Advice by Way of Representation
details: Byddwn yn cysylltu â’r Adran Gwaith a Phensiynau i gadarnhau eich bod (neu yr oeddech) yn cael un o’r budd-daliadau hyn. Efallai y byddwn hefyd yn cysylltu â chi os ydym angen gweld tystiolaeth bellach.
heading: Cymorth gyda budd-daliadau
summary: Help gyda budd-daliadau
list:
header: Byddwn ni'n cysylltu â'r Adran Gwaith a Phensiynau i gadarnhau eich bod (neu wedi bod) yn derbyn un o'r budd-daliadau hyn.
item_1:
hint: "(JSA)"
name: Lwfans Ceisio Gwaith yn Seiliedig ar Incwm
item_2:
hint: "(ESA)"
name: Lwfans Cyflogaeth a Chymorth yn Seiliedig ar Incwm
item_3:
name: Cymhorthdal Incwm
item_4:
hint: "(a'ch bod yn ennill llai na £6,000 y flwyddyn)"
name: Credyd Cynhwysol
item_5:
hint: "(Credyd Gwarant)"
name: Credyd Pensiwn
item_6:
hint: "(nid Advice and Assistance neu Advice by Way of Representation)"
name: Scottish Civil Legal Aid
header: "Gwiriwch y tabl isod yn ofalus i ganfod a ydych (neu a oeddech adeg talu’ch ffi) yn cael unrhyw un o’r budd-daliadau canlynol:"
check_1: "Os ydych yn cael un o’r budd-daliadau a restrir yng ngholofn 1, dewiswch ‘Ydw’."
check_2: "Mae yna rai budd-daliadau gydag enwau tebyg wedi’u rhestru yng ngholofn 2. Os ydych yn cael un o’r budd-daliadau hyn, dewiswch ‘Nac ydw’."
check_3: "Os nad ydych yn cael unrhyw un o’r budd-daliadau a restrir ar y dudalen hon, dewiswch ‘Nac ydw’."
column_1:
name: "Colofn 1:"
header: Dewiswch ‘Ydw’ os ydych yn cael un o'r budd-daliadau hyn
item_1: Lwfans Ceisio Gwaith yn seiliedig ar Incwm (JSA)
item_2: Lwfans Cyflogaeth a Chymorth yn seiliedig ar Incwm (ESA)
item_3: Credyd Pensiwn (Credyd Gwarant)
item_4: Credyd Cynhwysol (a’ch bod yn ennill llai na £6,000 y flwyddyn)
item_5: Cymorth Cyfreithiol Sifil Yr Alban (nid Cyngor a Chymorth neu Gyngor drwy Gynrychiolaeth)
item_6: Cymhorthdal Incwm
column_2:
name: "Colofn 2:"
header: Dewiswch ‘Nac ydw’ os ydych yn cael un o'r budd-daliadau hyn
item_1: Lwfans Ceisio Gwaith yn seiliedig ar Gyfraniadau (JSA)
item_2: Lwfans Cyflogaeth a Chymorth yn seiliedig ar Gyfraniadau (ESA)
item_3: Credyd Pensiwn a Chredyd Cynilion
item_4: Credyd Cynhwysol (a’ch bod yn ennill mwy na £6,000 y flwyddyn)
item_5: Cymorth Cyfreithiol Yr Alban (Cyngor a Chymorth neu Gyngor drwy Gynrychiolaeth ABWOR)
on_benefits_false: Nac ydw
on_benefits_true: Ydw, rydw i'n derbyn un o'r budd-daliadau yn y rhestr
text: Ydych chi'n derbyn unrhyw un o'r budd-daliadau isod?
text: A ydych chi’n cael unrhyw un or budd-daliadau canlynol?
text_refund: Oeddech chi'n derbyn unrhyw un o'r budd-daliadau canlynol?
title: Budd-daliadau
claim/default:
Expand Down
67 changes: 26 additions & 41 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,51 +298,36 @@ en:
breadcrumb: Step 6 of 20
details:
section_1:
details: "(for example, in the last few days), our staff may not be able to confirm your eligibility with the Department for Work and Pensions. In this case you should provide a letter from the Jobcentre."
heading: If you’ve only recently started receiving one of these benefits
heading: If you’ve only recently started receiving one of these benefits,
details: "our staff may not be able to confirm your eligibility with the Department for Work and Pensions. In this case you should provide a letter from the Jobcentre."
section_2:
details: There are some benefits with similar names. If you are receiving one of the benefits listed below, select 'No'.
heading: Benefits with similar names
item_1:
hint: "(JSA)"
name: Contribution-based Job Seekers Allowance
item_2:
hint: "(ESA)"
name: Contribution-based Employment and Support Allowance
item_3:
hint: ''
name: Pension Credit and Savings Credit
item_4:
hint: "(and you're earning more than £6,000 a year)"
name: Universal Credit
item_5:
hint: ''
name: Scottish Legal Aid Advice and Assistance
item_6:
hint: "(ABWOR)"
name: Scottish Legal Aid Advice by Way of Representation
heading: Help with benefits
details: "We’ll contact the Department for Work and Pensions to confirm that you are (or were) getting one of these benefits. We may also contact you if we need to see additional evidence."
summary: Help with benefits
list:
header: We’ll contact the Department for Work and Pensions to confirm that you are (or were) getting one of these benefits.
item_1:
hint: "(JSA)"
name: Income-based Jobseeker’s Allowance
item_2:
hint: "(ESA)"
name: Income-related Employment and Support Allowance
item_3:
name: Income Support
item_4:
hint: "(and you’re earning less than £6,000 a year)"
name: Universal Credit
item_5:
hint: "(Guarantee Credit)"
name: Pension Credit
item_6:
hint: "(not Advice and Assistance or Advice by Way of Representation)"
name: Scottish Civil Legal Aid
header: "Please carefully check the table below to identify if you are (or were at the time you paid your fee) receiving any of the following benefits:"
check_1: "If you are receiving one of the benefits listed in column 1, select ‘Yes’."
check_2: "There are some benefits with similar names listed in column 2. If you are receiving one of these benefits, select 'No'."
check_3: "If you are not receiving any of benefits listed on this page, select 'No'."
column_1:
name: "Column 1:"
header: Select ‘Yes’ if you are receiving one of these benefits
item_1: Income-based Jobseeker’s Allowance (JSA)
item_2: Income-related Employment and Support Allowance (ESA)
item_3: Pension Credit (Guarantee Credit)
item_4: Universal Credit (and you’re earning less than £6,000 a year)
item_5: Scottish Civil Legal Aid (not Advice and Assistance or Advice by Way of Representation)
item_6: Income Support
column_2:
name: "Column 2:"
header: "Select ‘No’ if you are receiving one of these benefits"
item_1: Contribution-based Job Seekers Allowance (JSA)
item_2: Contribution-based Employment and Support Allowance (ESA)
item_3: Pension Credit and Savings Credit
item_4: Universal Credit (and you're earning £6,000 or more a year)
item_5: Scottish Legal Aid (Advice and Assistance or Advice by Way of Representation ABWOR)
on_benefits_false: 'No'
on_benefits_true: Yes, I am receiving one of the benefits listed
on_benefits_true: Yes, I am receiving one of the benefits listed in Column 1
text: Do you receive any of the following benefits?
text_refund: Did you receive any of the following benefits?
title: Benefits
Expand Down
10 changes: 9 additions & 1 deletion features/step_definitions/step_six_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,21 @@ def group_six(index)
common_page.continue_button.click
end

Then(/^I should see the benefits list:$/) do |benefits|
Then(/^I should see the instruction bullet points:$/) do |benefits|
expect(step_six_page.content).to have_benefits_text
benefits.rows.each_with_index do |benefit, index|
expect(step_six_page.content.li[index].text).to eq benefit[0]
end
end

Then(/^I should see the benefits table:$/) do |table|
table.raw.each_with_index do |item, index|
first = index * 2
expect(step_six_page.content.td[first].text).to eq item[0]
expect(step_six_page.content.td[first + 1].text).to eq item[1]
end
end

Then(/^I should see help with benefits copy$/) do
expect(group_six(1)).to have_help_with_benefits
expect(group_six(1)).to have_recently_receiving_heading
Expand Down
31 changes: 17 additions & 14 deletions features/step_six.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,26 @@ Feature: Step six page

Scenario: Displays step number
Then I should see step 6 of 20

Scenario: Displays header
Then I should see 'Do you receive any of the following benefits?' header

Scenario: Displays benefits list
Then I should see the benefits list:
| benefit |
| Income-based Jobseekers Allowance (JSA) |
| Income-related Employment and Support Allowance (ESA) |
| Income Support |
| Universal Credit (and youre earning less than £6,000 a year) |
| Pension Credit (Guarantee Credit) |
| Scottish Civil Legal Aid (not Advice and Assistance or Advice by Way of Representation) |
Scenario: Displays instruction bullet points
Then I should see the instruction bullet points:
| benefit |
| If you are receiving one of the benefits listed in column 1, selectYes’. |
| There are some benefits with similar names listed in column 2. If you are receiving one of these benefits, select 'No'. |
| If you are not receiving any of benefits listed on this page, select 'No'. |

Scenario: Displays benefits table
Then I should see the benefits table:
| Income-based Jobseekers Allowance (JSA) | Contribution-based Job Seekers Allowance (JSA) |
| Income-related Employment and Support Allowance (ESA) | Contribution-based Employment and Support Allowance (ESA) |
| Pension Credit (Guarantee Credit) | Pension Credit and Savings Credit |
| Universal Credit (and youre earning less than £6,000 a year) | Universal Credit (and you're earning £6,000 or more a year) |
| Scottish Civil Legal Aid (not Advice and Assistance or Advice by Way of Representation) | Scottish Legal Aid (Advice and Assistance or Advice by Way of Representation ABWOR) |
| Income Support ||


Scenario: No I am not receiving any benefits from list
When I submit the form with no I do not receive one of the benefits listed
Expand All @@ -32,7 +39,3 @@ Feature: Step six page
Scenario: Displays error message
When I click continue
Then I should see 'Select whether you're receiving one of the benefits listed' error message

Scenario: Help with benefits
When I click on 'Help with benefits'
Then I should see help with benefits copy
1 change: 1 addition & 0 deletions features/support/page_objects/step_six_page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class StepSixPage < BasePage
element :benefits_text, '.text', text: 'contact the Department for Work and Pensions'
element :benefit, '.text'
elements :li, 'li'
elements :td, 'td'
sections :form_group, '.form-group' do
element :no, '.block-label', text: 'No'
element :yes, '.block-label', text: 'Yes, I am receiving one of the benefits listed'
Expand Down

0 comments on commit affd223

Please sign in to comment.