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-20726: Adds script to migrate widget names for MHV to VA.gov transition. #20760

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

dsasser
Copy link
Contributor

@dsasser dsasser commented Mar 3, 2025

Description

Adds cbo script to migrate CTA widget names to the new 'MHV on VA.gov' modern names.

Relates to #20726

Testing done

Manual and using cbo logging.

Screenshots

Screenshot 2025-03-07 at 8 19 30 AM Screenshot 2025-03-07 at 8 19 21 AM

QA steps

Validate pre-script states:

  • Visit node 27
  • Validate it has a React widget refill-track-prescriptions-page
  • Visit node 40
  • Validate it has the React widget view-test-and-lab-results-page
  • Visit the unpublished node 2439
  • Validate it has the React widget health-records
  • Visit node 20144
  • Validate it has the React widget schedule-appointments
  • Visit node 20204
  • Validate it has the React widget rx
  • Visit node 33340
  • Validate it has the React widget health-records
  • Visit node 35275
  • Validate it has no React widget.

Run the script

  • Open the terminal
  • Run drush codit-batch-operations:run ReactWidgetUpdatesForMHVMigration
  • Validate you see no errors and that ~294 items were processed

Validate post-script states:

  • Visit node 27
  • Validate it has a React widget remained refill-track-prescriptions-page
  • Visit node 40
  • Validate it has the React widget remained view-test-and-lab-results-page
  • Visit the unpublished node 2439
  • Validate it now has the React widget modern-get-medical-records-page
  • Visit node 20144
  • Validate it now has the React widget modern-schedule-view-va-appointments-page
  • Visit node 20204
  • Validate it now has the React widget modern-refill-track-prescriptions-page
  • Visit node 33340
  • Validate it has the React widget modern-get-medical-records-page
  • Visit node 35275
  • Validate it has no React widget.

Definition of Done

  • Documentation has been updated, if applicable.
  • Tests have been added if necessary.
  • Automated tests have passed.
  • Code Quality Tests have passed.
  • Acceptance Criteria in related issue are met.
  • Manual Code Review Approved.
  • If there are field changes, front end output has been thoroughly checked.

Select Team for PR review

  • CMS Team
  • Public websites
  • Facilities
  • User support
  • Accelerated Publishing

@dsasser dsasser requested a review from a team as a code owner March 3, 2025 21:41
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 3, 2025 21:41 Destroyed
Copy link

github-actions bot commented Mar 3, 2025

Checking composer.lock changes...

Copy link

github-actions bot commented Mar 3, 2025

GitHub Workflows (.github/workflows/*.yml)

Have you...

  • pinned all affected GitHub Actions at a specific commit by SHA?
  • reviewed the source code of the action at the commit you are pinning?
  • confirmed that no GitHub security measures are being bypassed?
  • checked for any injection of user content into protected contexts?
  • reviewed Security hardening for GitHub Actions?
  • reviewed GitHub Workflows?

Copy link

github-actions bot commented Mar 3, 2025

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 4, 2025 08:51 Destroyed
@dsasser
Copy link
Contributor Author

dsasser commented Mar 4, 2025

Taking another look at this. We may need to switch to a csv source for canonical migration data. Flagging as DO NOT MERGE until we get more info on the data from MHV.

@dsasser dsasser added the DO NOT MERGE Do not merge this PR label Mar 4, 2025
@dsasser dsasser changed the title VACMS-20726: Adds script to migrate widget names for MHV to VA.gov transition. DNM: VACMS-20726: Adds script to migrate widget names for MHV to VA.gov transition. Mar 4, 2025
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 5, 2025 08:45 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 6, 2025 08:47 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 6, 2025 21:53 Destroyed
Copy link

github-actions bot commented Mar 6, 2025

Checking composer.lock changes...

@dsasser
Copy link
Contributor Author

dsasser commented Mar 6, 2025

Refactored this to use a CSV source for target nodes and process them rather than coming from within the paragraph angle directly.

@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 6, 2025 22:43 Destroyed
Copy link

github-actions bot commented Mar 6, 2025

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 7, 2025 08:44 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 7, 2025 15:21 Destroyed
Copy link

github-actions bot commented Mar 7, 2025

Checking composer.lock changes...

@dsasser dsasser removed the DO NOT MERGE Do not merge this PR label Mar 7, 2025
@dsasser dsasser changed the title DNM: VACMS-20726: Adds script to migrate widget names for MHV to VA.gov transition. VACMS-20726: Adds script to migrate widget names for MHV to VA.gov transition. Mar 7, 2025
…ore clear which nodes get updates and which do not.
@dsasser dsasser requested a review from omahane March 7, 2025 16:34
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 7, 2025 16:35 Destroyed
Copy link

github-actions bot commented Mar 7, 2025

Checking composer.lock changes...

Copy link
Contributor

@omahane omahane left a comment

Choose a reason for hiding this comment

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

This worked perfectly. The code is terrific, too.

@va-cms-bot
Copy link
Collaborator

Cypress Accessibility Violations

/user/5382

ID: link-name
Impact: serious
Tags: cat.name-role-value, wcag2a, wcag244, wcag412, section508, section508.22.a, TTv5, TT6.a, EN-301-549, EN-9.2.4.4, EN-9.4.1.2, ACT
Description: Ensure links have discernible text
Help: Links must have discernible text
Nodes:

  • HTML: <a href="/user" class="toolbar-icon toolbar-icon-user trigger toolbar-item" id="toolbar-item-user" data-toolbar-tray="toolbar-item-user-tray" role="button" aria-pressed="false" style="background-color: rgb(2, 191, 231); border-bottom: 0px; color: rgb(33, 33, 33);">
    Impact: serious
    Target: #toolbar-item-user
    Summary: Fix all of the following:
    Element is in tab order and does not have accessible text

Fix any of the following:
Element does not have text that is visible to screen readers
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute

/test-data-omnis

ID: button-name
Impact: critical
Tags: cat.name-role-value, wcag2a, wcag412, section508, section508.22.a, TTv5, TT6.a, EN-301-549, EN-9.4.1.2, ACT
Description: Ensure buttons have discernible text
Help: Buttons must have discernible text
Nodes:

  • HTML: <button class="proofing-element-help" role="tooltip" data-proofing-help-title="About 'Page introduction' field" data-proofing-help="Add an introduction that helps visitors understand if information on the page is relevant to them."> <span aria-hidden="true">i</span> </button>
    Impact: critical
    Target: .field--name-field-intro-text-limited-html > .field__label > .proofing-element-help[role="tooltip"]
    Summary: Fix any of the following:
    Element does not have inner text that is visible to screen readers
    aria-label attribute does not exist or is empty
    aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
    Element has no title attribute
    Element does not have an implicit (wrapped) <label>
    Element does not have an explicit <label>
    Element's default semantics were not overridden with role="none" or role="presentation"

  • HTML: <button class="proofing-element-help" role="tooltip" data-proofing-help-title="About 'Generate a table of contents from major headings' field" data-proofing-help="By checking this box, all h2's below this point on the page will be linked with with anchor links. This helps users navigate content on very long pages. Do not check this box unless there is at least 2 h2's on the page.">
    Impact: critical
    Target: .field--name-field-table-of-contents-boolean > .field__label > .proofing-element-help[role="tooltip"]
    Summary: Fix any of the following:
    Element does not have inner text that is visible to screen readers
    aria-label attribute does not exist or is empty
    aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
    Element has no title attribute
    Element does not have an implicit (wrapped) <label>
    Element does not have an explicit <label>
    Element's default semantics were not overridden with role="none" or role="presentation"

  • HTML: <button class="proofing-element-help" role="tooltip" data-proofing-help-title="About 'Main content' field" data-proofing-help="The main body of the page, which appears below the featured content."> <span aria-hidden="true">i</span> </button>
    Impact: critical
    Target: button[data-proofing-help-title="About 'Main content' field"]
    Summary: Fix any of the following:
    Element does not have inner text that is visible to screen readers
    aria-label attribute does not exist or is empty
    aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
    Element has no title attribute
    Element does not have an implicit (wrapped) <label>
    Element does not have an explicit <label>
    Element's default semantics were not overridden with role="none" or role="presentation"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants