Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

73841 - Update IndentityNotVerified component copy and add additional-info component #28226

Merged
merged 61 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
62d9321
update IndentityNotVerified component copy and add VerifyI
jzucadi Feb 28, 2024
227681f
update styles
jzucadi Feb 28, 2024
c1f5d2c
update test
jzucadi Feb 28, 2024
c0a96d5
update styles
jzucadi Feb 28, 2024
0926b94
update E2E test
jzucadi Feb 28, 2024
c081bdd
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Feb 28, 2024
762c921
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Feb 28, 2024
71bd9ec
update prop for additional info component
jzucadi Feb 28, 2024
7023f39
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Feb 28, 2024
dd53d84
revert loa1 test to original
jzucadi Feb 28, 2024
7166fe7
Merge remote-tracking branch 'origin/73841-Add-Additional-Info-Compon…
jzucadi Feb 28, 2024
bf3f5cf
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Feb 28, 2024
df8e7b3
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Feb 28, 2024
d6a78bd
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Feb 28, 2024
afcdfdb
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Feb 28, 2024
83bea63
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Feb 28, 2024
635fc0b
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Feb 28, 2024
f6c816c
update loa1 test
jzucadi Feb 28, 2024
4ec020e
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Feb 29, 2024
4f8a661
update tests
jzucadi Feb 29, 2024
8802222
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Feb 29, 2024
0c2a3a3
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Feb 29, 2024
bbac481
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Feb 29, 2024
827f009
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Feb 29, 2024
56529fe
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 1, 2024
8fc89e4
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 1, 2024
0758e01
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 1, 2024
869b5fb
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 1, 2024
3ff6ea8
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 4, 2024
bc2f5a8
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 4, 2024
0f0401a
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 4, 2024
ebe3be8
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 4, 2024
e3ee5dd
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 4, 2024
6489e96
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 5, 2024
3c7435d
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 6, 2024
cddb40f
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 6, 2024
fef8c9e
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 7, 2024
392074b
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 7, 2024
5e696bf
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 11, 2024
ee3e3d6
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 11, 2024
07764d1
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 11, 2024
fabf306
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 12, 2024
8bff88d
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 12, 2024
f45baae
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 12, 2024
a318435
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 12, 2024
7368132
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 13, 2024
fa11152
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 13, 2024
1451fd7
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 13, 2024
0e6bc6a
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 14, 2024
f6a1a96
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 18, 2024
2fec0cc
update copy and add conditional rendering for specific service types …
jzucadi Mar 19, 2024
4b8ab86
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 19, 2024
fafe679
remove mistaken console log exceptions
jzucadi Mar 19, 2024
8bee243
Merge remote-tracking branch 'origin/73841-Add-Additional-Info-Compon…
jzucadi Mar 19, 2024
210f760
update test
jzucadi Mar 19, 2024
d334d11
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 19, 2024
9428941
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 20, 2024
125e76f
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 20, 2024
05b839f
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 21, 2024
cea8b56
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 21, 2024
42d388c
Merge branch 'main' into 73841-Add-Additional-Info-Component-for-Not-…
jzucadi Mar 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ const LandingPage = ({ data = {} }) => {
const hasHealth = useSelector(hasHealthData);
const signInService = useSelector(signInServiceName);
const showPersonalization = useSelector(personalizationEnabled);

const showCards = hasHealth && !isUnverified;

const serviceLabel = SERVICE_PROVIDERS[signInService]?.label;
const unVerifiedHeadline = `Verify your identity to use your ${serviceLabel} account on My HealtheVet`;
const noCardsDisplay = isUnverified ? (
<IdentityNotVerified
headline={unVerifiedHeadline}
showHelpContent={false}
showVerifyIdenityHelpInfo
signInService={signInService}
/>
) : (
<NoHealthAlert />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ const loa1DashboardTest = (mobile, stubs) => {
}

// make sure that the "Verify" alert is shown
cy.findByText(/Verify your identity to access/i).should('exist');
cy.findByText(/we need to make sure you’re you/i).should('exist');
cy.findByText(/We need you to verify your identity for this account/i).should(
Copy link
Contributor

@carlosfelix2 carlosfelix2 Mar 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if these tests are brittle as the text is in an external component. Is there a way to test for the presence without having to specify the text? I see this test of looking for the text is in the unit test below, so perhaps change this to just detect it exists.

'exist',
);
cy.findByText(/will ask you for certain personal information/i).should(
'exist',
);
cy.findByRole('link', { name: 'Verify your identity' }).should(
'have.attr',
'href',
Expand All @@ -39,8 +43,12 @@ const loa1DashboardTest = (mobile, stubs) => {
cy.findByTestId('name-tag').should('not.exist');

// make sure that the "Verify" alert is shown
cy.findByText(/Verify your identity to access/i).should('exist');
cy.findByText(/we need to make sure you’re you/i).should('exist');
cy.findByText(/We need you to verify your identity for this account/i).should(
'exist',
);
cy.findByText(/will ask you for certain personal information/i).should(
'exist',
);
cy.findByRole('link', { name: 'Verify your identity' }).should(
'have.attr',
'href',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,69 @@ export const HowToVerifyLink = () => (
</p>
);

const VerifyIdentityInfo = () => (
<va-additional-info
trigger="If you have trouble verifying your identity"
uswds
>
<a
href="https://www.va.gov/resources/verifying-your-identity-on-vagov/"
clasName="vads-u-padding-bottom--2"
>
Get answers to common questions about verifying your identity
</a>
<div className="vads-u-margin-top--2p5">
<p>
Or, if you have a Premium My HealtheVet account with a My HealtheVet
user ID and password, you can sign out and then sign back in with that
account to access My HealtheVet.
</p>
</div>
</va-additional-info>
);

const IdentityNotVerified = ({
headline = 'Verify your identity to access your complete profile',
showHelpContent = true,
showVerifyIdenityHelpInfo = false,
signInService,
}) => {
let serviceName;
switch (signInService) {
case 'mhv':
case 'dslogon':
serviceName = 'Login.gov or ID.me';
break;
case 'idme':
serviceName = 'ID.me';
break;
case 'logingov':
serviceName = 'Login.gov';
break;
default:
serviceName = 'your account';
}
return (
<>
<va-alert status="continue" class="vads-u-margin-top--3">
<va-alert
status="continue"
class="vads-u-margin-top--3 vads-u-margin-bottom--3"
>
<h2 slot="headline" data-testid="verify-identity-alert-headline">
{headline}
</h2>

<div className="vads-u-margin-bottom--1">
<p>
We need to make sure you’re you&#8212;and not someone pretending to
be you&#8212;before we can give you access to your personal and
health-related information. This helps to keep your information
safe. It helps to prevent fraud and identity theft.
Our records show that you haven’t verified your identity for your
&nbsp;
{serviceName} account. We need you to verify your identity for this
account to help us keep your information safe and prevent fraud and
identity theft.
</p>

<p className="vads-u-font-weight--bold">
This one-time process takes about 5-10 minutes.
<p>
{serviceName} will ask you for certain personal information and
identification. This process often takes about 10 minutes.
</p>

<a
className="vads-c-action-link--green"
href="/verify"
Expand All @@ -48,6 +88,7 @@ const IdentityNotVerified = ({
</va-alert>

{showHelpContent && <HowToVerifyLink />}
{showVerifyIdenityHelpInfo && <VerifyIdentityInfo />}
</>
);
};
Expand All @@ -56,6 +97,8 @@ IdentityNotVerified.propTypes = {
additionalInfoClickHandler: PropTypes.func,
headline: PropTypes.string,
showHelpContent: PropTypes.bool,
showVerifyIdenityHelpInfo: PropTypes.bool,
signInService: PropTypes.string,
};

export { IdentityNotVerified as default };
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ describe('IdentityNotVerified component', () => {
expect(view.getByText(headline)).to.exist;
});
it('renders the correct alert content', () => {
expect(view.getByText(/We need to make sure you’re you/i)).to.exist;
expect(view.getByText(/your personal and health-related information/i)).to
.exist;
expect(
view.getByText(/We need you to verify your identity for this account/i),
).to.exist;
expect(view.getByText(/will ask you for certain personal information/i))
.to.exist;
});
it('renders the correct CTA', () => {
expect(
Expand Down
Loading