Skip to content

Commit

Permalink
Show the ol and claimant entered DOB
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rjlynch committed Jan 6, 2025
1 parent 42f2916 commit 11d24b8
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,36 @@
) %>
</h3>

<%# prob need to move the keys into the locales %>
<table class="govuk-table">
<thead class="govuk-table__head">
<tr class="govuk-table__row">
<th class="govuk-table__cell">Claimant identity check</th>
<th class="govuk-table__cell">Full name</th>
<th class="govuk-table__cell">Date of birth</th>
</tr>
</thead>
<tbody class="govuk-table__body">
<tr class="govuk-table__row">
<th scope="row" class="govuk-table__header">
Provider entered claimant name
One Login identity verification (IDV)
</th>
<td class="govuk-table__cell">
<%= @tasks_presenter.provider_entered_claimant_name %>
<%= @tasks_presenter.one_login_claimant_name %>
</td>
<td class="govuk-table__cell">
<%= @tasks_presenter.one_login_claimant_dob %>
</td>
</tr>
<tr class="govuk-table__row">
<th scope="row" class="govuk-table__header">
Claimant name from One login
Provider entered claimant name
</th>
<td class="govuk-table__cell">
<%= @tasks_presenter.one_login_claimant_name %>
<%= @tasks_presenter.provider_entered_claimant_name %>
</td>
<td class="govuk-table__cell">
<%= @tasks_presenter.practitioner_entered_dob %>
</td>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 11d24b8

Please sign in to comment.