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

updates login info component #34049

Merged
merged 4 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
10 changes: 5 additions & 5 deletions src/applications/login/containers/MhvAccess.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ export default function MhvAccess() {
<section className="container row login vads-u-padding--3">
<div className="columns small-12 vads-u-padding--0">
<h1 id="signin-signup-modal-title">
Get temporary access to My HealtheVet
Access the My HealtheVet sign-in option
</h1>
<p className="vads-u-measure--5">
Some groups are approved to access the My HealtheVet sign-in option
until they create a new modern account. This sign-in process may
change in the future.
Get temporary access to the My HealtheVet sign-in option. This sign-in
process may change in the future.
</p>
</div>
<h2>Sign in</h2>
<div className="vads-u-margin-y--2">
<va-button
onClick={() => login({ policy: 'mhv' })}
text="Sign in with My HealtheVet"
text="My HealtheVet"
data-testid="accessMhvBtn"
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,23 @@ describe('MhvAccess', () => {
it('renders main title', () => {
const screen = renderInReduxProvider(<MhvAccess />);
const mainTitle = screen.getByRole('heading', {
name: /get temporary access to my healthevet/i,
name: /accesss the my healthevet sign-in option/i,
});
expect(mainTitle).to.exist;
});

it('renders information paragraph', () => {
const screen = renderInReduxProvider(<MhvAccess />);
const description = screen.getByText(
/Some groups are approved to access the My HealtheVet sign-in option/i,
/get temporary access to the mu healthevet sign-in option/i,
);
expect(description).to.exist;
});

it('renders button', () => {
const screen = renderInReduxProvider(<MhvAccess />);
const signInHeading = screen.getByText(/sign in/i);
expect(signInHeading).to.exist;
const accessButton = screen.getByTestId('accessMhvBtn');
expect(accessButton).to.exist;
fireEvent.click(accessButton);
Expand Down
77 changes: 56 additions & 21 deletions src/platform/user/authentication/components/LoginInfo.jsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,61 @@
import React from 'react';
import { useSelector } from 'react-redux';
import SubmitSignInForm from 'platform/static-data/SubmitSignInForm';

export default () => (
<div className="row">
<div className="columns print-full-width sign-in-wrapper">
<div className="help-info">
<h2 className="vads-u-margin-top--0">Having trouble signing in?</h2>
<p>
Get answers to common{' '}
<a href="/resources/signing-in-to-vagov/">
questions about signing in
</a>{' '}
and{' '}
<a href="/resources/verifying-your-identity-on-vagov/">
verifying your identity
</a>
.
</p>
<p>
<SubmitSignInForm startSentence /> We're here 24/7.
</p>
export default () => {
const mhvButtonDeprecated = useSelector(
state => state?.featureToggles?.mhvCredentialButtonDisabled,
);
return (
<div className="row">
<div className="columns print-full-width sign-in-wrapper">
<div className="help-info">
<h2 className="vads-u-margin-top--0">Having trouble signing in?</h2>
{mhvButtonDeprecated ? (
<div>
<p>Get help with questions about:</p>
<div>
<div role="list" className="vads-u-padding-bottom--3">
<li>
<a href="/resources/signing-in-to-vagov/">signing in</a>
</li>
<li>
<a href="/resources/verifying-your-identity-on-vagov/">
verifying your identity
</a>
</li>
<li>
<a href="/resources/verifying-your-identity-on-vagov/">
deleting your account
</a>
</li>
</div>
</div>
<va-link
text="The My HealtheVet sign-in option is no loner available"
label="The My HealtheVet sign-in option is no longer available"
href="/"
className="vads-u-margin-top--3"
/>
</div>
) : (
<p>
Get answers to common{' '}
<a href="/resources/signing-in-to-vagov/">
questions about signing in
</a>{' '}
and{' '}
<a href="/resources/verifying-your-identity-on-vagov/">
verifying your identity
</a>
.
</p>
)}
<p>
<SubmitSignInForm startSentence /> We're here 24/7.
</p>
</div>
</div>
</div>
</div>
);
);
};
Loading