diff --git a/src/site/facilities/facilities_health_services_buttons.drupal.liquid b/src/site/facilities/facilities_health_services_buttons.drupal.liquid
index 3c302e40e5..f61bbb360e 100644
--- a/src/site/facilities/facilities_health_services_buttons.drupal.liquid
+++ b/src/site/facilities/facilities_health_services_buttons.drupal.liquid
@@ -2,14 +2,23 @@
This is used for Facility details pages and (A-Z) Health Services page
{% endcomment %}
-
- {% assign topTask = "make-an-appointment" | topTaskLovellComp: path, buildtype, fieldAdministration, fieldVamcEhrSystem, fieldRegionPage, fieldOffice %}
-
{{topTask.text}}
-
-
-
+ {% assign topTask = "make-an-appointment" | topTaskLovellComp: path, buildtype, fieldAdministration, fieldVamcEhrSystem, fieldRegionPage, fieldOffice %}
+
+
+
diff --git a/src/site/tests/cypress/vamc-lovell.cypress.spec.js b/src/site/tests/cypress/vamc-lovell.cypress.spec.js
index 18f6667584..c86fe19f5b 100644
--- a/src/site/tests/cypress/vamc-lovell.cypress.spec.js
+++ b/src/site/tests/cypress/vamc-lovell.cypress.spec.js
@@ -1,34 +1,45 @@
import { expect } from 'chai';
+const verifyActionLink = (expectedText, expectedHref) =>
+ cy
+ .get('va-link-action')
+ .eq(0)
+ .shadow()
+ .find('a')
+ .should('be.visible')
+ .should('have.text', expectedText)
+ .should('have.attr', 'href')
+ .and('include', expectedHref);
+
describe('VAMC Lovell - All TRICARE pages with expected MHS Genesis Patient Portal Top Task have it', () => {
it('TRICARE system has MHS Genesis Patient Portal link', () => {
cy.visit('/lovell-federal-health-care-tricare/');
cy.injectAxeThenAxeCheck();
+
cy.findByText('MHS Genesis Patient Portal').then(el => {
const attr = el.attr('href');
expect(attr).to.equal('https://my.mhsgenesis.health.mil/');
});
- // https://www.va.gov/lovell-federal-health-care-tricare/
});
it('TRICARE Health services has MHS Genesis Patient Portal link', () => {
cy.visit('/lovell-federal-health-care-tricare/health-services');
cy.injectAxeThenAxeCheck();
- cy.findByText('MHS Genesis Patient Portal').then(el => {
- const attr = el.attr('href');
- expect(attr).to.equal('https://my.mhsgenesis.health.mil/');
- });
- // https://www.va.gov/lovell-federal-health-care-tricare/health-services/
+
+ verifyActionLink(
+ 'MHS Genesis Patient Portal',
+ 'https://my.mhsgenesis.health.mil/',
+ );
});
it('TRICARE Locations has MHS Genesis Patient Portal link', () => {
cy.visit('/lovell-federal-health-care-tricare/locations');
cy.injectAxeThenAxeCheck();
+
cy.findByText('MHS Genesis Patient Portal').then(el => {
const attr = el.attr('href');
expect(attr).to.equal('https://my.mhsgenesis.health.mil/');
});
- // https://www.va.gov/lovell-federal-health-care-tricare/locations/
});
it('TRICARE Captain James A. Lovell Location has MHS Genesis Patient Portal link', () => {
@@ -36,11 +47,11 @@ describe('VAMC Lovell - All TRICARE pages with expected MHS Genesis Patient Port
'/lovell-federal-health-care-tricare/locations/captain-james-a-lovell-federal-health-care-center/',
);
cy.injectAxeThenAxeCheck();
- cy.findByText('MHS Genesis Patient Portal').then(el => {
- const attr = el.attr('href');
- expect(attr).to.equal('https://my.mhsgenesis.health.mil/');
- });
- // https://www.va.gov/lovell-federal-health-care-tricare/locations/captain-james-a-lovell-federal-health-care-center/
+
+ verifyActionLink(
+ 'MHS Genesis Patient Portal',
+ 'https://my.mhsgenesis.health.mil/',
+ );
});
});
@@ -48,42 +59,43 @@ describe('VAMC Lovell - All VA pages with expected Make an appointment Top Task
it('VA system has Make an appointment link', () => {
cy.visit('/lovell-federal-health-care-va/');
cy.injectAxeThenAxeCheck();
+
cy.findByText('Make an appointment').then(el => {
const attr = el.attr('href');
expect(attr.endsWith('make-an-appointment')).to.be.true;
});
- // https://www.va.gov/lovell-federal-health-care-va/
});
it('VA Health services has Make an appointment link', () => {
cy.visit('/lovell-federal-health-care-va/health-services/');
cy.injectAxeThenAxeCheck();
- cy.findByText('Make an appointment').then(el => {
- const attr = el.attr('href');
- expect(attr.endsWith('make-an-appointment')).to.be.true;
- });
- // https://www.va.gov/lovell-federal-health-care-va/health-services/
+
+ verifyActionLink(
+ 'Make an appointment',
+ '/lovell-federal-health-care-va/make-an-appointment',
+ );
});
it('VA Locations has Make an appointment link', () => {
cy.visit('/lovell-federal-health-care-va/locations/');
cy.injectAxeThenAxeCheck();
+
cy.findByText('Make an appointment').then(el => {
const attr = el.attr('href');
expect(attr.endsWith('make-an-appointment')).to.be.true;
});
- // https://www.va.gov/lovell-federal-health-care-va/locations/
});
+
it('VA Captain James A. Lovell Location has Make an appointment link', () => {
cy.visit(
'/lovell-federal-health-care-va/locations/captain-james-a-lovell-federal-health-care-center/',
);
cy.injectAxeThenAxeCheck();
- cy.findByText('Make an appointment').then(el => {
- const attr = el.attr('href');
- expect(attr.endsWith('make-an-appointment')).to.be.true;
- });
- // https://www.va.gov/lovell-federal-health-care-va/locations/captain-james-a-lovell-federal-health-care-center/
+
+ verifyActionLink(
+ 'Make an appointment',
+ '/lovell-federal-health-care-va/make-an-appointment',
+ );
});
});