Skip to content

Commit b8d01a5

Browse files
authored
VACMS-18456 Update legacy action links to DS action links (#2392)
* VACMS-18456 Update legacy action links to DS action links * Remove extra spacing in main_buttons * Update action_link to blue * Remove extra spacing on R&S CTA list * Test adjustments
1 parent 20bc19e commit b8d01a5

9 files changed

+96
-62
lines changed
+48-24
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,52 @@
11
{% comment %}
2-
This is used for Region Landing page and Contact us page
3-
Also used for VBA with parameter
2+
This is used for Region Landing page and Contact us page
3+
Also used for VBA with parameter
44
{% endcomment %}
55
<div data-template="facilities/main_buttons">
6-
<div>
7-
{% if buttonType == 'vba' %}
8-
<a class="vads-c-action-link--blue" href="https://va.my.site.com/VAVERA/s/">Make an appointment</a>
9-
{% else %}
10-
{% assign topTask = "make-an-appointment" | topTaskLovellComp: path, buildtype, fieldAdministration, fieldVamcEhrSystem, fieldRegionPage, fieldOffice %}
11-
<a class="vads-c-action-link--blue" href="{{topTask.url}}">{{topTask.text}}</a>
12-
{% endif %}
13-
</div>
14-
<div class="vads-u-margin-y--2">
15-
{% if buttonType == 'vba' %}
16-
<a class="vads-c-action-link--blue" href="https://ask.va.gov">Ask a benefit question</a>
17-
{% else %}
18-
<a class="vads-c-action-link--blue" href="/{{ path }}/health-services">View all health services</a>
19-
{% endif %}
20-
</div>
21-
<div>
22-
{% if buttonType == 'vba' %}
23-
<a class="vads-c-action-link--blue" href="/claim-or-appeal-status">Check a claim status</a>
24-
{% else %}
25-
<a class="vads-c-action-link--blue" href="/{{ path }}/register-for-care">Register for care</a>
26-
{% endif %}
27-
</div>
6+
{% if buttonType == 'vba' %}
7+
<va-link-action
8+
class="vads-u-display--block"
9+
href="https://va.my.site.com/VAVERA/s/"
10+
text="Make an appointment"
11+
type="secondary"
12+
></va-link-action>
13+
{% else %}
14+
{% assign topTask = "make-an-appointment" | topTaskLovellComp: path, buildtype, fieldAdministration, fieldVamcEhrSystem, fieldRegionPage, fieldOffice %}
15+
<va-link-action
16+
class="vads-u-display--block"
17+
href="{{topTask.url}}"
18+
text="{{topTask.text}}"
19+
type="secondary"
20+
></va-link-action>
21+
{% endif %}
22+
{% if buttonType == 'vba' %}
23+
<va-link-action
24+
class="vads-u-display--block"
25+
href="https://ask.va.gov"
26+
text="Ask a benefit question"
27+
type="secondary"
28+
></va-link-action>
29+
{% else %}
30+
<va-link-action
31+
class="vads-u-display--block"
32+
href="/{{ path }}/health-services"
33+
text="View all health services"
34+
type="secondary"
35+
></va-link-action>
36+
{% endif %}
37+
{% if buttonType == 'vba' %}
38+
<va-link-action
39+
class="vads-u-display--block"
40+
href="/claim-or-appeal-status"
41+
text="Check a claim status"
42+
type="secondary"
43+
></va-link-action>
44+
{% else %}
45+
<va-link-action
46+
class="vads-u-display--block"
47+
href="/{{ path }}/register-for-care"
48+
text="Register for care"
49+
type="secondary"
50+
></va-link-action>
51+
{% endif %}
2852
</div>

src/site/includes/support_resources_cta_list.drupal.liquid

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% if fieldButtons.length > 1 %}
22
<ul class="vads-u-margin-y--3 usa-unstyled-list">
33
{% for fieldButton in fieldButtons %}
4-
<li class="vads-u-margin-bottom--2">
4+
<li>
55
{% include "src/site/paragraphs/action_link.drupal.liquid" with entity = fieldButton.entity %}
66
</li>
77
{% endfor %}

src/site/layouts/campaign_landing_page.drupal.liquid

+4-4
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,12 @@
169169
<!-- Call to action -->
170170
{% if fieldClpVideoPanelMoreVideo.entity.fieldButtonLink.url.path and fieldClpVideoPanelMoreVideo.entity.fieldButtonLabel %}
171171
<p>
172-
<va-link
173-
class="vads-c-action-link--blue"
172+
<va-link-action
173+
class="vads-u-display--block"
174174
href="{{ fieldClpVideoPanelMoreVideo.entity.fieldButtonLink.url.path }}"
175175
text="{{ fieldClpVideoPanelMoreVideo.entity.fieldButtonLabel | strip }}"
176-
>
177-
</va-link>
176+
type="secondary"
177+
></va-link-action>
178178
</p>
179179
{% endif %}
180180
</div>

src/site/layouts/vamc_operating_status_and_alerts.drupal.liquid

+4-5
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@
2525
<div class="usa-grid usa-grid-full vads-u-margin-y--1p5">
2626
<div class="vads-l-row">
2727
<div class="vads-u-margin-right--2p5">
28-
<a
29-
class="vads-u-margin-top--1 vads-u-margin--0 vads-c-action-link--green"
28+
<va-link-action
29+
class="vads-u-display--block"
3030
href="{{ fieldOffice.entity.fieldLinkFacilityEmergList.url.path }}"
31-
>
32-
Subscribe to emergency notifications
33-
</a>
31+
text="Subscribe to emergency notifications"
32+
></va-link-action>
3433
</div>
3534
</div>
3635
</div>
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
<a class="vads-c-action-link--blue" data-template="paragraphs/action_link" href="{{ entity.fieldButtonLink.url.path }}">
2-
{{ entity.fieldButtonLabel }}
3-
</a>
1+
<va-link-action
2+
data-template="paragraphs/action_link"
3+
class="vads-u-display--block"
4+
href="{{ entity.fieldButtonLink.url.path }}"
5+
text="{{ entity.fieldButtonLabel }}"
6+
type="secondary"
7+
></va-link-action>

src/site/paragraphs/react_widget.drupal.liquid

+9-3
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,17 @@
5959
<span class="static-widget-content vads-u-display--none" aria-hidden="true">
6060
{% if entity.fieldDefaultLink != empty %}
6161
{% if entity.fieldButtonFormat %}
62-
{% assign classes = 'class="vads-c-action-link--green"' %}
62+
<va-link-action
63+
class="vads-u-display--block"
64+
href="{{ entity.fieldDefaultLink.url.path }}"
65+
text="{{ entity.fieldDefaultLink.title }}"
66+
></va-link-action>
6367
{% else %}
64-
{% assign classes = '' %}
68+
<va-link
69+
href="{{ entity.fieldDefaultLink.url.path }}"
70+
text="{{ entity.fieldDefaultLink.title }}"
71+
></va-link>
6572
{% endif %}
66-
<a href="{{ entity.fieldDefaultLink.url.path }}" {{ classes }}>{{ entity.fieldDefaultLink.title }}</a>
6773
{% endif %}
6874
</span>
6975
{% if entity.fieldErrorMessage != empty %}

src/site/paragraphs/service_location.drupal.liquid

+6-3
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,12 @@
222222
{% assign scheduleAppointmentLink = "/health-care/schedule-view-va-appointments" %}
223223
{% endif %}
224224

225-
<a class="vads-c-action-link--blue" href="{{ scheduleAppointmentLink }}">
226-
Schedule an appointment online
227-
</a>
225+
<va-link-action
226+
class="vads-u-display--block"
227+
href="{{ scheduleAppointmentLink }}"
228+
text="Schedule an appointment online"
229+
type="secondary"
230+
></va-link-action>
228231
</div>
229232
{% endif %}
230233

src/site/tests/cypress/vamc-lovell.cypress.spec.js

+16-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { expect } from 'chai';
2-
31
const verifyActionLink = (expectedText, expectedHref) =>
42
cy
53
.get('va-link-action')
@@ -16,10 +14,10 @@ describe('VAMC Lovell - All TRICARE pages with expected MHS Genesis Patient Port
1614
cy.visit('/lovell-federal-health-care-tricare/');
1715
cy.injectAxeThenAxeCheck();
1816

19-
cy.findByText('MHS Genesis Patient Portal').then(el => {
20-
const attr = el.attr('href');
21-
expect(attr).to.equal('https://my.mhsgenesis.health.mil/');
22-
});
17+
verifyActionLink(
18+
'MHS Genesis Patient Portal',
19+
'https://my.mhsgenesis.health.mil/',
20+
);
2321
});
2422

2523
it('TRICARE Health services has MHS Genesis Patient Portal link', () => {
@@ -36,10 +34,10 @@ describe('VAMC Lovell - All TRICARE pages with expected MHS Genesis Patient Port
3634
cy.visit('/lovell-federal-health-care-tricare/locations');
3735
cy.injectAxeThenAxeCheck();
3836

39-
cy.findByText('MHS Genesis Patient Portal').then(el => {
40-
const attr = el.attr('href');
41-
expect(attr).to.equal('https://my.mhsgenesis.health.mil/');
42-
});
37+
verifyActionLink(
38+
'MHS Genesis Patient Portal',
39+
'https://my.mhsgenesis.health.mil/',
40+
);
4341
});
4442

4543
it('TRICARE Captain James A. Lovell Location has MHS Genesis Patient Portal link', () => {
@@ -60,10 +58,10 @@ describe('VAMC Lovell - All VA pages with expected Make an appointment Top Task
6058
cy.visit('/lovell-federal-health-care-va/');
6159
cy.injectAxeThenAxeCheck();
6260

63-
cy.findByText('Make an appointment').then(el => {
64-
const attr = el.attr('href');
65-
expect(attr.endsWith('make-an-appointment')).to.be.true;
66-
});
61+
verifyActionLink(
62+
'Make an appointment',
63+
'/lovell-federal-health-care-va/make-an-appointment',
64+
);
6765
});
6866

6967
it('VA Health services has Make an appointment link', () => {
@@ -80,10 +78,10 @@ describe('VAMC Lovell - All VA pages with expected Make an appointment Top Task
8078
cy.visit('/lovell-federal-health-care-va/locations/');
8179
cy.injectAxeThenAxeCheck();
8280

83-
cy.findByText('Make an appointment').then(el => {
84-
const attr = el.attr('href');
85-
expect(attr.endsWith('make-an-appointment')).to.be.true;
86-
});
81+
verifyActionLink(
82+
'Make an appointment',
83+
'/lovell-federal-health-care-va/make-an-appointment',
84+
);
8785
});
8886

8987
it('VA Captain James A. Lovell Location has Make an appointment link', () => {

src/site/tests/static-pages/static-page-widgets.unit.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const widgetContent = `
1414
</span>
1515
</div>
1616
<span class="static-widget-content vads-u-display--none" aria-hidden="true">
17-
<a class="vads-c-action-link--green" href="/pension/application/527EZ">Apply for Veterans Pension Benefits</a>
17+
<va-link-action class="vads-u-display--block" href="/pension/application/527EZ" text="Apply for Veterans Pension Benefits"></va-link-action>
1818
</span>
1919
<div class="usa-alert usa-alert-error sip-application-error vads-u-display--none" aria-hidden="true">
2020
<div class="usa-alert-body">

0 commit comments

Comments
 (0)