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

VACMS-16964 VAMC Locations web components #29634

Merged
merged 1 commit into from
May 9, 2024
Merged
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 @@ -7,7 +7,7 @@ const FacilityApiAlert = () => (
<p>
Our location finder isn’t working right now. We’re sorry about that.
Please check back a bit later. Or, if you need location details right
away, you can try searching for
away, you can try searching for&nbsp;&nbsp;
<a
href="https://www.google.com/maps/search/?api=1&query=VA+locations+near+me"
target="_blank"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}

componentDidMount() {
this.request = apiRequest(`/facilities/va?ids=${this.props.facilities}`, {

Check warning on line 16 in src/applications/static-pages/facilities/OtherFacilityListWidget.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/static-pages/facilities/OtherFacilityListWidget.jsx:16:64:'facilities' is missing in props validation

Check warning on line 16 in src/applications/static-pages/facilities/OtherFacilityListWidget.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/static-pages/facilities/OtherFacilityListWidget.jsx:16:64:'facilities' is missing in props validation
apiVersion: 'v1',
})
.then(this.handleFacilitiesSuccess)
Expand Down Expand Up @@ -51,9 +51,10 @@
>
<section key={facility.id} className="usa-width-one-half">
<h3 className="vads-u-margin-bottom--1 vads-u-font-size--md medium-screen:vads-u-font-size--lg">
<a href={`/find-locations/facility/${facility.id}`}>
{facility.attributes.name}
</a>
<va-link
href={`/find-locations/facility/${facility.id}`}
text={facility.attributes.name}
/>
</h3>
<FacilityAddress facility={facility} />
<div className="vads-u-margin-bottom--0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ describe('facilities <OtherFacilityListWidget>', () => {
tree.update();
expect(tree.find('va-loading-indicator').exists()).to.be.false;

const facilityName = tree.find('h3');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has to be removed because now its contents are a web component and we can't assert on the shadow DOM in unit tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

yay shadow DOM

expect(facilityName.text()).to.contain(
'Pittsburgh VA Medical Center-University Drive',
);

const facilityAddressComponent = tree.find('FacilityAddress').dive();
const address = facilityAddressComponent.find('address');
expect(address.text()).to.contain(
Expand Down
Loading