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

Update appointment links that open in a new tab #33769

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
services?
<br />
<NewTabAnchor href="/profile/contact-information">
Go to your VA profile
Go to your VA.gov profile (opens in new tab)
</NewTabAnchor>
.
</p>
Expand Down Expand Up @@ -90,7 +90,7 @@
if (featureBreadcrumbUrlUpdate) {
changeCrumb(pageTitle);
}
}, []);

Check warning on line 93 in src/applications/vaos/covid-19-vaccine/components/ContactInfoPage.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/vaos/covid-19-vaccine/components/ContactInfoPage.jsx:93:6:React Hook useEffect has missing dependencies: 'changeCrumb', 'featureBreadcrumbUrlUpdate', 'openFormPage', and 'prefillContactInfo'. Either include them or remove the dependency array. If 'prefillContactInfo' changes too often, find the parent component that defines it and wrap that definition in useCallback.

return (
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
services?
<br />
<NewTabAnchor href="/profile/contact-information">
Go to your VA profile
Go to your VA.gov profile (opens in new tab)
</NewTabAnchor>
.
</p>
Expand All @@ -148,7 +148,7 @@
document.title = `${pageTitle} | Veterans Affairs`;
scrollAndFocus();
recordPopulatedEvents(email, mobilePhone || homePhone);
}, []);

Check warning on line 151 in src/applications/vaos/new-appointment/components/ContactInfoPage.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/vaos/new-appointment/components/ContactInfoPage.jsx:151:6:React Hook useEffect has missing dependencies: 'email', 'homePhone', 'mobilePhone', and 'pageTitle'. Either include them or remove the dependency array.

const uiSchema = {
'ui:description': <Description />,
Expand Down Expand Up @@ -245,7 +245,7 @@
benefits and services in your VA.gov profile.
<br />
<NewTabAnchor href="/profile/contact-information">
Go to your VA profile
Go to your VA.gov profile (opens in new tab)
</NewTabAnchor>
</div>
</va-additional-info>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function NoAddressNote() {
your home address to your VA profile.
<br />
<NewTabAnchor href="/profile/contact-information">
Go to your VA.gov profile
Go to your VA.gov profile (opens in new tab)
</NewTabAnchor>
</p>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ import InfoAlert from '../../../components/InfoAlert';
export default function UpdateAddressAlert({ onClickUpdateAddress }) {
const headline =
'To use some of the tool’s features, you need a home address on file';
const style = {
width: 'fit-content',
webkitWidth: 'fit-content',
};

return (
<InfoAlert
Expand All @@ -19,14 +15,14 @@ export default function UpdateAddressAlert({ onClickUpdateAddress }) {
>
<p>
To update your address, go to your VA.gov profile. Please allow some
time for your address update to process through our system. <br />
time for your address update to process through our system.
<br />
<NewTabAnchor
style={style}
href="/change-address/#how-do-i-change-my-address-in-"
className="usa-button usa-button-primary vads-u-margin-top--4"
href="http://va.gov/profile/contact-information"
onClick={() => onClickUpdateAddress(headline)}
renderAriaLabel={false}
>
Update your address
Go to your VA.gov profile (opens in new tab)
</NewTabAnchor>
</p>
</InfoAlert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import set from 'platform/utilities/data/set';
import { mockFetch, setFetchJSONResponse } from 'platform/testing/unit/helpers';

import moment from 'moment';

Check warning on line 11 in src/applications/vaos/new-appointment/components/TypeOfCarePage/index.unit.spec.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/vaos/new-appointment/components/TypeOfCarePage/index.unit.spec.js:11:1:Use date-fns or Native Date methods instead of moment.js
import environment from '@department-of-veterans-affairs/platform-utilities/environment';

import TypeOfCarePage from './index';
Expand Down Expand Up @@ -299,7 +299,9 @@
'vaos-update-address-alert-displayed',
),
);
fireEvent.click(screen.getByText('Update your address'));
fireEvent.click(
screen.getByText('Go to your VA.gov profile (opens in new tab)'),
);
await waitFor(
() =>
expect(
Expand Down Expand Up @@ -355,7 +357,9 @@
/To use some of the tool’s features, you need a home address on file/i,
),
).to.exist;
fireEvent.click(screen.getByText('Update your address'));
fireEvent.click(
screen.getByText('Go to your VA.gov profile (opens in new tab)'),
);
await waitFor(
() =>
expect(
Expand Down
Loading