From bfb04af628fb734a72412bc3e11bb4945b33a274 Mon Sep 17 00:00:00 2001 From: Tim Cosgrove Date: Tue, 3 Dec 2024 14:23:32 -0800 Subject: [PATCH 1/2] Source Cypress from Va-internal S3. (#2373) * Source Cypress from Va-internal S3. * Add Cypress caching path. * Rework and simplify yarn/cypress caching. * Disable use of cache if for cypress container. * Corrected syntax for if. * Add cypress install commands. * Restore removed caching for cypress step. * Restore from main. * Modifying to match vets-website setup more closely. --- .github/workflows/continuous-integration.yml | 17 ++++++++--------- .github/workflows/install/action.yml | 20 +++++++++++--------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index e4a349375a..9abb2ec71c 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -393,20 +393,20 @@ jobs: cypress-tests: name: Cypress E2E Tests - runs-on: [self-hosted, asg] + runs-on: ubuntu-16-cores-latest needs: - login-to-amazon-ecr - build timeout-minutes: 30 container: - image: 008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/cypress-io:node16.13.2-chrome100-ff98 + image: 008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/dsva/cypress-io/cypress/browsers:node16.16.0-chrome107-ff107-edge credentials: username: ${{ needs.login-to-amazon-ecr.outputs.docker_username }} password: ${{ needs.login-to-amazon-ecr.outputs.docker_password }} - options: --user 1001:1001 - volumes: - - /usr/local/share:/share - - /etc/ssl/certs:/etc/ssl/certs + # options: --user 1001:1001 + # volumes: + # - /usr/local/share:/share + # - /etc/ssl/certs:/etc/ssl/certs env: NODE_EXTRA_CA_CERTS: /etc/ssl/certs/ca-certificates.crt @@ -428,13 +428,12 @@ jobs: uses: ./.github/workflows/install timeout-minutes: 30 with: - key: on-demand-runner-cypress-${{ hashFiles('**/yarn.lock') }} - restore-keys: on-demand-runner-cypress- + key: ${{ hashFiles('yarn.lock') }} yarn_cache_folder: .cache/yarn path: | .cache/yarn /github/home/.cache/Cypress - **/node_modules + node_modules - name: Start server run: node src/platform/testing/e2e/test-server.js --buildtype vagovprod --port=3002 & diff --git a/.github/workflows/install/action.yml b/.github/workflows/install/action.yml index d4ea12e20b..db0d15ccff 100644 --- a/.github/workflows/install/action.yml +++ b/.github/workflows/install/action.yml @@ -3,11 +3,11 @@ description: Install dependencies inputs: key: - description: keys for actions/cache@v3 + description: keys for actions/cache@v4 required: false default: '' restore-keys: - description: restore-keys for actions/cache@v3 + description: restore-keys for actions/cache@v4 required: false default: '' yarn_cache_folder: @@ -15,7 +15,7 @@ inputs: required: false default: '' path: - description: path for actions/cache@v3 + description: path for actions/cache@v4 required: false default: '' @@ -28,7 +28,7 @@ runs: run: echo NODE_VERSION=$(cat .nvmrc) >> $GITHUB_OUTPUT - name: Setup Node - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + uses: actions/setup-node@v4 with: node-version: ${{ steps.get-node-version.outputs.NODE_VERSION }} @@ -38,17 +38,19 @@ runs: - name: Cache dependencies id: cache-dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache@v4 with: path: ${{ inputs.path }} key: ${{ steps.get-node-version.outputs.NODE_VERSION }}-${{ inputs.key }} - restore-keys: ${{ steps.get-node-version.outputs.NODE_VERSION }}-${{ inputs.restore-keys }} - name: Install dependencies - uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2.8.3 + uses: nick-fields/retry@v3 with: - command: yarn install --frozen-lockfile --prefer-offline --production=false + command: | + CYPRESS_INSTALL_BINARY=https://vetsgov-website-builds-s3-upload.s3.us-gov-west-1.amazonaws.com/artifacts/cypress/13.3.0.zip yarn install --frozen-lockfile --prefer-offline --production=false --network-timeout 1000000000 + npx cypress install + npx cypress --version max_attempts: 3 timeout_minutes: 7 env: - YARN_CACHE_FOLDER: ${{ inputs.yarn_cache_folder }} + YARN_CACHE_FOLDER: ${{ inputs.yarn_cache_folder }} \ No newline at end of file From ab6655e04dfffd217b242b81197b4d212e4fb52f Mon Sep 17 00:00:00 2001 From: Eli Selkin <5606931+eselkin@users.noreply.github.com> Date: Tue, 3 Dec 2024 17:32:27 -0800 Subject: [PATCH 2/2] VACMS 19825 - Updated all operating status content-build templates (#2355) * updated all operating status content-build templates * operation_status_information.liquid was not used/imported * slim alert if no fieldOperatingStatusMoreInfo * margin and spacing --- .../operatingStatusFlagsLinks.drupal.liquid | 24 ++++++++- .../operating_status_expandable_alert.liquid | 31 ++++++++++-- .../operation_status_information.liquid | 19 ------- .../vba_facilities/expandable_alert.liquid | 50 +++++++++++++++---- .../health_care_facility_status.drupal.liquid | 24 ++++++++- ...er_locations_operating_status.unit.spec.js | 4 +- ..._operating_status_and_alerts.drupal.liquid | 17 ++++++- src/site/layouts/vba_facility.drupal.liquid | 6 +-- 8 files changed, 129 insertions(+), 46 deletions(-) delete mode 100644 src/site/includes/operation_status_information.liquid diff --git a/src/site/includes/operatingStatusFlagsLinks.drupal.liquid b/src/site/includes/operatingStatusFlagsLinks.drupal.liquid index 360c978ea6..08124f1fae 100644 --- a/src/site/includes/operatingStatusFlagsLinks.drupal.liquid +++ b/src/site/includes/operatingStatusFlagsLinks.drupal.liquid @@ -7,15 +7,35 @@ /> {% elsif fieldOperatingStatusFacility == 'limited' %} - + +{% elsif fieldOperatingStatusFacility == 'temporary_closure' %} + + + +{% elsif fieldOperatingStatusFacility == 'temporary_location' %} + + + +{% elsif fieldOperatingStatusFacility == 'virtual_care' %} + + + +{% elsif fieldOperatingStatusFacility == 'coming_soon' %} + + + {% elsif fieldOperatingStatusFacility == 'closed' %} - + @@ -25,8 +37,21 @@ class="vads-u-margin-y--0 vamc-facility-expandable-alert" style="max-width: 303px;" > -

{{ fieldOperatingStatusMoreInfo | drupalToVaPath | phoneLinks | newline_to_br }}

+

{{ fieldOperatingStatusMoreInfo | drupalToVaPath | phoneLinks | newline_to_br }}

+ {% elsif status %} +
+ +

{{ trigger }}

+
+
{% endif %} {% endif %} \ No newline at end of file diff --git a/src/site/includes/operation_status_information.liquid b/src/site/includes/operation_status_information.liquid deleted file mode 100644 index 922aa879a7..0000000000 --- a/src/site/includes/operation_status_information.liquid +++ /dev/null @@ -1,19 +0,0 @@ -{% if fieldOperatingStatusFacility == 'notice' %} - - - Facility notice - - - {% elsif fieldOperatingStatusFacility == 'limited' %} - - - Limited services and hours - - - {% elsif fieldOperatingStatusFacility == 'closed' %} - - - Facility Closed - - -{% endif %} \ No newline at end of file diff --git a/src/site/includes/vba_facilities/expandable_alert.liquid b/src/site/includes/vba_facilities/expandable_alert.liquid index a1b08beaa8..7bd364cec8 100644 --- a/src/site/includes/vba_facilities/expandable_alert.liquid +++ b/src/site/includes/vba_facilities/expandable_alert.liquid @@ -7,24 +7,52 @@ {% elsif fieldOperatingStatusFacility == 'limited' %} {% assign showVBAExpandableAlert = true %} {% assign VBAExpandableAlertTrigger = 'Limited services and hours' %} - {% assign VBAExpandableAlertStatus = 'warning' %} + {% assign VBAExpandableAlertStatus = 'info' %} {% elsif fieldOperatingStatusFacility == 'closed' %} {% assign showVBAExpandableAlert = true %} {% assign VBAExpandableAlertTrigger = 'Facility Closed' %} - {% assign VBAExpandableAlertStatus = 'error' %} + {% assign VBAExpandableAlertStatus = 'warning' %} +{% elsif fieldOperatingStatusFacility == 'temporary_closure' %} + {% assign showVBAExpandableAlert = true %} + {% assign VBAExpandableAlertTrigger = 'Temporary facility closure' %} + {% assign VBAExpandableAlertStatus = 'warning' %} +{% elsif fieldOperatingStatusFacility == 'temporary_location' %} + {% assign showVBAExpandableAlert = true %} + {% assign VBAExpandableAlertTrigger = 'Temporary location' %} + {% assign VBAExpandableAlertStatus = 'warning' %} +{% elsif fieldOperatingStatusFacility == 'virtual_care' %} + {% assign showVBAExpandableAlert = true %} + {% assign VBAExpandableAlertTrigger = 'Virtual care only' %} + {% assign VBAExpandableAlertStatus = 'warning' %} +{% elsif fieldOperatingStatusFacility == 'coming_soon' %} + {% assign showVBAExpandableAlert = true %} + {% assign VBAExpandableAlertTrigger = 'Coming soon' %} + {% assign VBAExpandableAlertStatus = 'warning' %} {% endif %} {% if showVBAExpandableAlert %} - -
+
+ {% if fieldOperatingStatusMoreInfo and fieldOperatingStatusMoreInfo != blank %} +

{{ fieldOperatingStatusMoreInfo | newline_to_br | phoneLinks }}

-
- + + {% else %} + +

{{ VBAExpandableAlertTrigger }}

+
+ {% endif %} +
{% endif %} diff --git a/src/site/layouts/health_care_facility_status.drupal.liquid b/src/site/layouts/health_care_facility_status.drupal.liquid index 10a9bb45fe..76c0b53360 100644 --- a/src/site/layouts/health_care_facility_status.drupal.liquid +++ b/src/site/layouts/health_care_facility_status.drupal.liquid @@ -21,13 +21,33 @@ {% if office.fieldOperatingStatusFacility == 'normal' %} Normal services and hours {% elsif office.fieldOperatingStatusFacility == 'limited' %} - + Limited services and hours {% elsif office.fieldOperatingStatusFacility == 'closed' %} - + Facility closed + {% elsif office.fieldOperatingStatusFacility == 'notice' %} + + Facility notice + + {% elsif office.fieldOperatingStatusFacility == 'temporary_closure' %} + + Temporary facility closure + + {% elsif office.fieldOperatingStatusFacility == 'temporary_location' %} + + Temporary location + + {% elsif office.fieldOperatingStatusFacility == 'virtual_care' %} + + Virtual care only + + {% elsif office.fieldOperatingStatusFacility == 'coming_soon' %} + + Coming soon + {% endif %} {% endfor %} diff --git a/src/site/layouts/tests/vet_center/vet_center_locations_operating_status.unit.spec.js b/src/site/layouts/tests/vet_center/vet_center_locations_operating_status.unit.spec.js index 77fe2e322c..b722bc9f86 100644 --- a/src/site/layouts/tests/vet_center/vet_center_locations_operating_status.unit.spec.js +++ b/src/site/layouts/tests/vet_center/vet_center_locations_operating_status.unit.spec.js @@ -51,9 +51,9 @@ describe('Vet Center Locations Operating Status', () => { ); const operatingStatus = queryAllByTestId( rendered, - 'operating-status-vc_5141OS', + 'operating-status-nonexp-vc_5141OS', ); - expect(operatingStatus).to.be.empty; + expect(operatingStatus).to.have.lengthOf(1); }); it('should render a limited operating status when has status and more info', async () => { diff --git a/src/site/layouts/vamc_operating_status_and_alerts.drupal.liquid b/src/site/layouts/vamc_operating_status_and_alerts.drupal.liquid index 77b493f56b..f440c5e0bc 100644 --- a/src/site/layouts/vamc_operating_status_and_alerts.drupal.liquid +++ b/src/site/layouts/vamc_operating_status_and_alerts.drupal.liquid @@ -68,12 +68,25 @@ {% elsif status.entity.fieldOperatingStatusFacility == 'limited' %} - Limited services and hours + Limited services and hours {% elsif status.entity.fieldOperatingStatusFacility == 'closed' %} - Facility Closed + Facility Closed + + {% elsif status.entity.fieldOperatingStatusFacility == 'temporary_closure' %} + Temporary facility closure + + {% elsif status.entity.fieldOperatingStatusFacility == 'temporary_location' %} + Temporary location + + {% elsif status.entity.fieldOperatingStatusFacility == 'virtual_care' %} + Virtual care only + + {% elsif status.entity.fieldOperatingStatusFacility == 'coming_soon' %} + Coming soon {% endif %} + {% if status.entity.fieldOperatingStatusMoreInfo and status.entity.fieldOperatingStatusFacility != 'normal' %}
{{ status.entity.fieldOperatingStatusMoreInfo }} diff --git a/src/site/layouts/vba_facility.drupal.liquid b/src/site/layouts/vba_facility.drupal.liquid index 8bf957a9ae..9b7cfebf0a 100644 --- a/src/site/layouts/vba_facility.drupal.liquid +++ b/src/site/layouts/vba_facility.drupal.liquid @@ -43,11 +43,7 @@
- {% if fieldOperatingStatusMoreInfo and fieldOperatingStatusFacility and fieldOperatingStatusFacility != 'normal' %} -
- {% include "src/site/includes/vba_facilities/expandable_alert.liquid" %} -
- {% endif %} + {% include "src/site/includes/vba_facilities/expandable_alert.liquid" %}