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 31a5748
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 10 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 @@ -22,21 +22,34 @@
</h3>

<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
12 changes: 6 additions & 6 deletions spec/features/admin/admin_ey_tasks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
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 31a5748

Please sign in to comment.