From 31a5748905c51e0bc8d5b234ced033051c55db1f Mon Sep 17 00:00:00 2001 From: Richard Lynch Date: Mon, 6 Jan 2025 11:16:23 +0000 Subject: [PATCH] Show the ol and claimant entered DOB In order to highlight why the IDV task might have failed we want to display the DOB returned from one login and the DOB entered by the claimant. A quirk of the designs is that we show the claimant entered DOB in the "Provider entered claimant name" row. --- .../admin_tasks_presenter.rb | 8 +++++ .../identity_confirmation.html.erb | 21 ++++++++++--- spec/features/admin/admin_ey_tasks_spec.rb | 12 ++++---- .../admin_tasks_presenter_spec.rb | 30 +++++++++++++++++++ 4 files changed, 61 insertions(+), 10 deletions(-) diff --git a/app/models/policies/early_years_payments/admin_tasks_presenter.rb b/app/models/policies/early_years_payments/admin_tasks_presenter.rb index be259ec421..fea1291328 100644 --- a/app/models/policies/early_years_payments/admin_tasks_presenter.rb +++ b/app/models/policies/early_years_payments/admin_tasks_presenter.rb @@ -24,10 +24,18 @@ def provider_entered_claimant_name claim.eligibility.practitioner_name end + def practitioner_entered_dob + claim.date_of_birth + end + def one_login_claimant_name claim.onelogin_idv_full_name end + def one_login_claimant_dob + claim.onelogin_idv_date_of_birth + end + def practitioner_journey_completed? claim.eligibility.practitioner_journey_completed? end diff --git a/app/views/admin/tasks/early_years_payments/identity_confirmation.html.erb b/app/views/admin/tasks/early_years_payments/identity_confirmation.html.erb index c8146aa0c0..d1632d11f4 100644 --- a/app/views/admin/tasks/early_years_payments/identity_confirmation.html.erb +++ b/app/views/admin/tasks/early_years_payments/identity_confirmation.html.erb @@ -22,21 +22,34 @@ + + + + + + + + + diff --git a/spec/features/admin/admin_ey_tasks_spec.rb b/spec/features/admin/admin_ey_tasks_spec.rb index ddac25060e..3cb1241792 100644 --- a/spec/features/admin/admin_ey_tasks_spec.rb +++ b/spec/features/admin/admin_ey_tasks_spec.rb @@ -52,11 +52,11 @@ click_on "Confirm the claimant made the claim" expect(page).to have_content( - "Provider entered claimant name Bobby Bobberson" + "Provider entered claimant name Bobby Bobberson 1986-01-01" ) expect(page).to have_content( - "Claimant name from One login Bobby Bobberson" + "One Login identity verification (IDV) Bobby Bobberson 1986-01-01" ) expect(page).to have_content( @@ -90,11 +90,11 @@ click_on "Confirm the claimant made the claim" expect(page).to have_content( - "Provider entered claimant name Bobby Bobberson" + "Provider entered claimant name Bobby Bobberson 1986-01-01" ) expect(page).to have_content( - "Claimant name from One login Robby Bobberson" + "One Login identity verification (IDV) Robby Bobberson 1986-01-01" ) expect(page).to have_content( @@ -166,11 +166,11 @@ click_on "Confirm the claimant made the claim" expect(page).to have_content( - "Provider entered claimant name Bobby Bobberson" + "Provider entered claimant name Bobby Bobberson 1986-01-01" ) expect(page).to have_content( - "Claimant name from One login Robby Robberson" + "One Login identity verification (IDV) Robby Robberson 1986-01-01" ) expect(page).to have_content( diff --git a/spec/models/policies/early_years_payments/admin_tasks_presenter_spec.rb b/spec/models/policies/early_years_payments/admin_tasks_presenter_spec.rb index 1e37d46268..64b00b3cd9 100644 --- a/spec/models/policies/early_years_payments/admin_tasks_presenter_spec.rb +++ b/spec/models/policies/early_years_payments/admin_tasks_presenter_spec.rb @@ -23,4 +23,34 @@ expect(subject[1][1]).to eq "1 January 2018" end end + + describe "#practitioner_entered_dob" do + let(:claim) do + create( + :claim, + :submitted, + policy: Policies::EarlyYearsPayments, + date_of_birth: Date.new(1990, 1, 1) + ) + end + + subject { described_class.new(claim).practitioner_entered_dob } + + it { is_expected.to eq Date.new(1990, 1, 1) } + end + + describe "#one_login_claimant_dob" do + let(:claim) do + create( + :claim, + :submitted, + policy: Policies::EarlyYearsPayments, + onelogin_idv_date_of_birth: Date.new(1990, 2, 1) + ) + end + + subject { described_class.new(claim).one_login_claimant_dob } + + it { is_expected.to eq Date.new(1990, 2, 1) } + end end
Claimant identity checkFull nameDate of birth
- Provider entered claimant name + One Login identity verification (IDV) - <%= @tasks_presenter.provider_entered_claimant_name %> + <%= @tasks_presenter.one_login_claimant_name %> + + <%= @tasks_presenter.one_login_claimant_dob %>
- Claimant name from One login + Provider entered claimant name - <%= @tasks_presenter.one_login_claimant_name %> + <%= @tasks_presenter.provider_entered_claimant_name %> + + <%= @tasks_presenter.practitioner_entered_dob %>