Skip to content

Commit

Permalink
Merge pull request #142 from ministryofjustice/probate-summary-fix
Browse files Browse the repository at this point in the history
Probate summary fixed
  • Loading branch information
colinbruce committed Apr 1, 2016
2 parents c1671a6 + 35d0aeb commit a28cbfe
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 18 deletions.
23 changes: 13 additions & 10 deletions app/views/home/summary.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,20 @@ table
td =t('fee', scope: 'summary.labels')
td =@summary.fee_paid
td.right= link_to "Change", question_path(:fee)
tr
td =t('probate', scope: 'summary.labels')
td=t("probate_case_#{@summary.probate_kase}", scope: 'summary')
td.right= link_to "Change", question_path(:probate)
-if @summary.probate_kase
tr
td = t('deceased_name', scope: 'summary.labels')
td colspan="2" =@summary.probate_deceased_name
td =@summary.probate_deceased_name
td.right= link_to "Change", question_path(:probate)
tr
td = t('date_of_death', scope: 'summary.labels')
td colspan="2" =@summary.probate_date_of_death
td =@summary.probate_date_of_death
td.right= link_to "Change", question_path(:probate)
-else
tr
td =t('probate', scope: 'summary.labels')
td=t("probate_case_#{@summary.probate_kase}", scope: 'summary')
td.right= link_to "Change", question_path(:probate)
tr
td =t('claim', scope: 'summary.labels')
td =t("claim_number_#{@summary.claim_number}", scope: 'summary')
Expand All @@ -47,14 +50,14 @@ table
td =t('form_name', scope: 'summary.labels')
td=@summary.form_name_identifier
td.right= link_to "Change", question_path(:form_name)
tr
td =t('date_of_birth', scope: 'summary.labels')
td =@summary.dob_date_of_birth
td.right= link_to "Change", question_path(:dob)
tr
td =t('ni_number', scope: 'summary.labels')
td =@summary.national_insurance_number
td.right= link_to "Change", question_path(:national_insurance)
tr
td =t('date_of_birth', scope: 'summary.labels')
td =@summary.dob_date_of_birth
td.right= link_to "Change", question_path(:dob)
tr
td =t('personal', scope: 'summary.labels')
td =@summary.full_name
Expand Down
5 changes: 3 additions & 2 deletions config/locales/summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ en:
date_of_death: 'Date of death'
claim: 'Claim number'
form_name: 'Form name'
ni_number: 'National insurance number'
personal: 'Personal information'
ni_number: 'National Insurance number'
date_of_birth: 'Date of birth'
personal: 'Full name'
address: 'Address'
contact: 'Contact'
contact_email: 'Email'
Expand Down
6 changes: 4 additions & 2 deletions spec/features/apply_for_help_with_fees_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@
expect(page).to have_content 'Probate caseNo'
expect(page).to have_content 'Claim numberNo'
expect(page).to have_content 'Form nameN1'
expect(page).to have_content 'National insurance numberAB123456A'
expect(page).to have_content 'National Insurance numberAB123456A'
expect(page).to have_content 'Date of birth01/01/1980'
expect(page).to have_content 'Sir Bob Oliver'
expect(page).to have_content 'Foo Street'
expect(page).to have_content 'Bar'
Expand Down Expand Up @@ -522,7 +523,8 @@
expect(page).to have_content 'Probate caseNo'
expect(page).to have_content 'Claim numberNo'
expect(page).to have_content 'Form nameN1'
expect(page).to have_content 'National insurance numberAB123456A'
expect(page).to have_content 'National Insurance numberAB123456A'
expect(page).to have_content 'Date of birth01/01/1980'
expect(page).to have_content 'Sir Bob Oliver'
expect(page).to have_content 'Foo Street'
expect(page).to have_content 'Bar'
Expand Down
10 changes: 6 additions & 4 deletions spec/features/pages/summary_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@
end

scenario 'I expect to see my answers' do
expect(page).to have_content 'Name of deceasedFoo'
expect(page).to have_content "Date of death#{(Time.zone.today - 1.month).strftime(Date::DATE_FORMATS[:default])}"
expect(page).to have_no_content 'Probate case'
expect(page).to have_content 'Name of deceasedFooChange'
expect(page).to have_content "Date of death#{(Time.zone.today - 1.month).strftime(Date::DATE_FORMATS[:default])}Change"
end
end

Expand All @@ -55,8 +56,9 @@
end

scenario 'I do not expect to see the probate sub headers' do
expect(page).not_to have_content 'Name of deceased'
expect(page).not_to have_content 'Date of death'
expect(page).to have_content 'Probate case'
expect(page).to have_no_content 'Name of deceased'
expect(page).to have_no_content 'Date of death'
end
end

Expand Down

0 comments on commit a28cbfe

Please sign in to comment.