diff --git a/.github/percy/d10-verification.yml b/.github/percy/d10-verification.yml new file mode 100644 index 0000000000..11322a0382 --- /dev/null +++ b/.github/percy/d10-verification.yml @@ -0,0 +1,101 @@ +- name: Article with ALL components + url: https://d8-dev2.boston.gov/departments/digital-team/test-page + waitForTimeout: 5000 + execute: | + jQuery('.paragraphs-item-events-and-notices').addClass("hidden"); + +- name: Event (basic) - WEST END COMMUNITY PRESERVATION + url: https://d8-dev2.boston.gov/node/61556 + +- name: Event (with header) - MAYOR ON MAIN TROLLEY TOUR + url: https://d8-dev2.boston.gov/node/45361 + +- name: Listing Page - PAY AND APPLY + url: https://d8-dev2.boston.gov/node/32906 + +- name: Listing Page - PARKS AND PLAYGROUNDS + url: https://d8-dev2.boston.gov/node/32946 + +- name: Place Profile - ANIMAL CARE AND CONTROL CENTER + url: https://d8-dev2.boston.gov/node/2191 + +- name: Place Profile - BAY VILLAGE HISTORIC DISTRICT + url: https://d8-dev2.boston.gov/node/3251 + +- name: Person Profile - MARK CIOMMO + url: https://d8-dev2.boston.gov/node/401 + +- name: Person Profile - KIM JANEY + url: https://d8-dev2.boston.gov/node/38046 + +- name: Program Initiative Page - MY BROTHERS KEEPER BOSTON + url: https://d8-dev2.boston.gov/node/7396 + +- name: Program Initiative Page - AGE-FRIENDLY BOSTON + url: https://d8-dev2.boston.gov/node/25396 + +- name: Post - BIKE SHARE + url: https://d8-dev2.boston.gov/node/1741 + +- name: Post - RODENT AND PEST CONTROL + url: http://d8-dev2.boston.gov/node/63036 + +- name: How To - CPR TRAINING + url: https://d8-dev2.boston.gov/node/3606 + execute: | + jQuery('.dr-tr:last()').click(); +# Expands last drawer on page + +- name: How To - FILE FOR A PROPERTY TAX ABATEMENT + url: https://d8-dev2.boston.gov/node/12806 + execute: | + jQuery('.dr-tr:last()').click(); +# Expands last drawer on page + +- name: Article - PARKING METERS + url: https://d8-dev2.boston.gov/node/551 + +- name: Article - MAYORS OFFICE OF HOUSING + url: https://d8-dev2.boston.gov/node/2726 + +- name: Department - INSPECTIONAL SERVICES + url: https://d8-dev2.boston.gov/node/151 + execute: | + jQuery('.paragraphs-item-events-and-notices').addClass("hidden"); +# Hides dynamic content on page to reduce false positives for changes + +- name: Department - HUMAN RESOURCES + url: https://d8-dev2.boston.gov/node/216 + execute: | + jQuery('.dr-c:first()').; +# Expands first drawer on page + +- name: Public Notice - PUBLIC FACILITIES COMMISSION MEETING + url: https://d8-dev2.boston.gov/node/64966 + +- name: Guide - GETTING AROUND BOSTON + url: https://d8-dev2.boston.gov/node/506 + +- name: Guide - HAVING A CAR IN BOSTON + url: https://d8-dev2.boston.gov/node/6 + +- name: Landing Page - HOMEPAGE + url: https://d8-dev2.boston.gov/node/21 + execute: | + jQuery('.dr-tr:last()').click(); +# Expands first drawer on page + +- name: Landing Page - CAREER CENTER + url: https://d8-dev2.boston.gov/node/19261 + execute: | + jQuery('.paragraphs-item-grid-of-cards:first()').addClass("hidden"); + # Hides dynamic content on page to reduce false positives for changes + +- name: Procurement - INSPECTIONAL SERVICES RELATIVE TO ... + url: https://d8-dev2.boston.gov/node/15920681 + +- name: Procurement - BFD THERMAL IMAGING CAMERAS ... + url: https://d8-dev2.boston.gov/node/15920521 + +- name: Map Verification - 30 Westville St (BH) + url: https://d8-dev2.boston.gov/buildinghousing/30-westville-st diff --git a/.github/workflows/percy-d10.yml b/.github/workflows/percy-d10.yml new file mode 100644 index 0000000000..015b81fad0 --- /dev/null +++ b/.github/workflows/percy-d10.yml @@ -0,0 +1,33 @@ +# @file(yaml) +# == GITHUB ACTION == +# Percy screenshot scripting for Boston.gov +# Workflow monitors master branch and is triggered by a Pull Request. +# The action is triggered before the code reaches the stage environment, so the workflow compares screenshots taken +# from the develop environment. +name: D10 visual Regression Testing +on: + pull_request: + branches: [ "drupal10" ] + workflow_dispatch: +jobs: + percy_frontend_test: + runs-on: ubuntu-latest + defaults: + run: + shell: bash + steps: + - name: checkout percy files + uses: Bhacaz/checkout-files@v2 + with: + files: .github/percy + branch: d10-percy + - name: Setup Node 16 + uses: actions/setup-node@v3 + with: + node-version: '16' + - name: Install Percy CLI + run: npm install --save-dev @percy/cli + - name: Compare Frontend Snapshots + run: npx @percy/cli snapshot --config "$GITHUB_WORKSPACE/.github/percy/percy_config.yml" "$GITHUB_WORKSPACE/.github/percy/d10-verification.yml" + env: + PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_STAGE }} diff --git a/docroot/modules/custom/bos_core/includes/token.extensions.inc b/docroot/modules/custom/bos_core/includes/token.extensions.inc index e52d0dc8bd..9a9885c884 100644 --- a/docroot/modules/custom/bos_core/includes/token.extensions.inc +++ b/docroot/modules/custom/bos_core/includes/token.extensions.inc @@ -118,7 +118,7 @@ function bos_core_tokens($type, $tokens, array $data = [], array $options = []) $details = $step->field_step_details->getValue(); foreach ($details as $ht_step_details) { $details_trim = str_replace(',', '', $ht_step_details['value']); - $tab_token_details .= filter_var($details_trim, FILTER_SANITIZE_STRING) . ","; + $tab_token_details .= strip_tags($details_trim) . ","; } } } diff --git a/scripts/deploy/cob_utilities.sh b/scripts/deploy/cob_utilities.sh index 7f74bb1151..93cec45738 100755 --- a/scripts/deploy/cob_utilities.sh +++ b/scripts/deploy/cob_utilities.sh @@ -291,29 +291,39 @@ function importConfigs() { # Removes schema_audit which is deprecated or is not D10 compatible. # Also ensures some settings which are lingering in the copied D9 are removed as cim does not seem to do this. ${drush_cmd} config:delete core.extension module.color &>> ${TEMPFILE} + ${drush_cmd} sql:query "delete from `key_value` where collection = 'system.schema' and name = 'color';" + ${drush_cmd} config:delete core.extension module.hal &>> ${TEMPFILE} + ${drush_cmd} config:delete hal.settings &>> ${TEMPFILE} + ${drush_cmd} sql:query "delete from `key_value` where collection = 'system.schema' and name = 'hal';" + ${drush_cmd} config:delete core.extension module.rdf &>> ${TEMPFILE} - ${drush_cmd} config:delete core.extension module.simplesamlphp_auth &>> ${TEMPFILE} - ${drush_cmd} config:delete simplesamlphp_auth.settings &>> ${TEMPFILE} ${drush_cmd} config:delete rdf.mapping.node.article &>> ${TEMPFILE} ${drush_cmd} config:delete rdf.mapping.user.user &>> ${TEMPFILE} ${drush_cmd} config:delete rdf.mapping.taxonomy_term.tags &>> ${TEMPFILE} - ${drush_cmd} config:delete hal.settings &>> ${TEMPFILE} - ${drush_cmd} pm:uninstall samlauth &>> ${TEMPFILE} + ${drush_cmd} sql:query "delete from `key_value` where collection = 'system.schema' and name = 'rdf';" + + ${drush_cmd} config:delete core.extension module.simplesamlphp_auth &>> ${TEMPFILE} + ${drush_cmd} config:delete simplesamlphp_auth.settings &>> ${TEMPFILE} + ${drush_cmd} sql:query "delete from `key_value` where collection = 'system.schema' and name = 'simplesamlphp_auth';" + + ${drush_cmd} pm:uninstall dblog, samlauth &>> ${TEMPFILE} ${drush_cmd} en samlauth &>> ${TEMPFILE} # --end # Always be sure the config and config_split modules are enabled. ${drush_cmd} pm:enable config, config_split &>> ${TEMPFILE} directory="${REPO_ROOT}/config/default" + + # I have not installed Drupal CLI for D10 .... # /var/www/html/bostond8.ci/docroot$ ../vendor/bin/drupal - ${drupal_cmd} config:import:single --file="${directory}/config_split.config_split.acquia_dev.yml" &>> ${TEMPFILE} - ${drupal_cmd} config:import:single --file="${directory}/config_split.config_split.acquia_prod.yml" &>> ${TEMPFILE} - ${drupal_cmd} config:import:single --file="${directory}/config_split.config_split.acquia_stage.yml" &>> ${TEMPFILE} - ${drupal_cmd} config:import:single --file="${directory}/config_split.config_split.local.yml" &>> ${TEMPFILE} - ${drupal_cmd} config:import:single --file="${directory}/config_split.config_split.never_import.yml" &>> ${TEMPFILE} - ${drupal_cmd} config:import:single --file="${directory}/config_split.config_split.travis.yml" &>> ${TEMPFILE} - ${drush_cmd} cr &> /dev/null +# ${drupal_cmd} config:import:single --file="${directory}/config_split.config_split.acquia_dev.yml" &>> ${TEMPFILE} +# ${drupal_cmd} config:import:single --file="${directory}/config_split.config_split.acquia_prod.yml" &>> ${TEMPFILE} +# ${drupal_cmd} config:import:single --file="${directory}/config_split.config_split.acquia_stage.yml" &>> ${TEMPFILE} +# ${drupal_cmd} config:import:single --file="${directory}/config_split.config_split.local.yml" &>> ${TEMPFILE} +# ${drupal_cmd} config:import:single --file="${directory}/config_split.config_split.never_import.yml" &>> ${TEMPFILE} +# ${drupal_cmd} config:import:single --file="${directory}/config_split.config_split.travis.yml" &>> ${TEMPFILE} +# ${drush_cmd} cr &> /dev/null # Import the configs - remember... config_split is enabled. # Sometimes the import needs to run multiple times to come up clear. IDK