Skip to content

Commit

Permalink
Merge branch 'main' into ns/1255-2/veteran-status-card-image-assets
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksayre committed Dec 4, 2024
2 parents 248eaa8 + ab6655e commit 8559590
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 64 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 &
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ 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:
description: path for yarn cache
required: false
default: ''
path:
description: path for actions/cache@v3
description: path for actions/cache@v4
required: false
default: ''

Expand All @@ -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 }}

Expand All @@ -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 }}
24 changes: 22 additions & 2 deletions src/site/includes/operatingStatusFlagsLinks.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,35 @@
/>
</va-alert>
{% elsif fieldOperatingStatusFacility == 'limited' %}
<va-alert status="warning" slim visible>
<va-alert status="info" slim visible>
<va-link
class="vads-u-font-weight--bold operating-status-link"
href="{{ facilitySidebar.links.0.url.path }}/operating-status"
text="Limited services and hours"
/>
</va-alert>
{% elsif fieldOperatingStatusFacility == 'temporary_closure' %}
<va-alert status="warning" slim visible>
<va-link class="vads-u-font-weight--bold operating-status-link"
href="{{ facilitySidebar.links.0.url.path }}/operating-status" text="Temporary facility closure" />
</va-alert>
{% elsif fieldOperatingStatusFacility == 'temporary_location' %}
<va-alert status="warning" slim visible>
<va-link class="vads-u-font-weight--bold operating-status-link"
href="{{ facilitySidebar.links.0.url.path }}/operating-status" text="Temporary location" />
</va-alert>
{% elsif fieldOperatingStatusFacility == 'virtual_care' %}
<va-alert status="warning" slim visible>
<va-link class="vads-u-font-weight--bold operating-status-link"
href="{{ facilitySidebar.links.0.url.path }}/operating-status" text="Virtual care only" />
</va-alert>
{% elsif fieldOperatingStatusFacility == 'coming_soon' %}
<va-alert status="warning" slim visible>
<va-link class="vads-u-font-weight--bold operating-status-link"
href="{{ facilitySidebar.links.0.url.path }}/operating-status" text="Coming soon" />
</va-alert>
{% elsif fieldOperatingStatusFacility == 'closed' %}
<va-alert status="error" slim visible>
<va-alert status="warning" slim visible>
<va-link
class="vads-u-font-weight--bold operating-status-link"
href="{{ facilitySidebar.links.0.url.path }}/operating-status"
Expand Down
31 changes: 28 additions & 3 deletions src/site/includes/operating_status_expandable_alert.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,26 @@
{% endif %}
{% case fieldOperatingStatusFacility %}
{% when 'limited' %}
{% assign status = "warning" %}
{% assign status = "info" %}
{% assign trigger = "Limited services and hours" %}
{% when 'closed' %}
{% assign status = "error" %}
{% assign status = "warning" %}
{% assign trigger = "Facility Closed" %}
{% when 'notice' %}
{% assign status = "info" %}
{% assign trigger = "Facility notice" %}
{% when 'temporary_closure' %}
{% assign status = "warning" %}
{% assign trigger = "Temporary facility closure" %}
{% when 'temporary_location' %}
{% assign status = "warning" %}
{% assign trigger = "Temporary location" %}
{% when 'virtual_care' %}
{% assign status = "warning" %}
{% assign trigger = "Virtual care only" %}
{% when 'coming_soon' %}
{% assign status = "warning" %}
{% assign trigger = "Coming soon" %}
{% endcase %}
{% if status and fieldOperatingStatusMoreInfo and fieldOperatingStatusMoreInfo != blank %}
<div class="vads-u-margin-bottom--1">
Expand All @@ -25,8 +37,21 @@
class="vads-u-margin-y--0 vamc-facility-expandable-alert"
style="max-width: 303px;"
>
<p>{{ fieldOperatingStatusMoreInfo | drupalToVaPath | phoneLinks | newline_to_br }}</p>
<p>{{ fieldOperatingStatusMoreInfo | drupalToVaPath | phoneLinks | newline_to_br }}</p>
</va-alert-expandable>
</div>
{% elsif status %}
<div class="vads-u-margin-bottom--1">
<va-alert
id="operating-status-nonexp-{{ operatingStatusId }}"
data-testid="operating-status-nonexp-{{ operatingStatusId }}"
status="{{ status }}"
class="vads-u-margin-y--0"
slim
style="max-width: 303px;"
>
<p class="vads-u-margin-y--0 vads-u-padding-y--0 vads-u-font-weight--bold">{{ trigger }}</p>
</va-alert>
</div>
{% endif %}
{% endif %}
19 changes: 0 additions & 19 deletions src/site/includes/operation_status_information.liquid

This file was deleted.

50 changes: 39 additions & 11 deletions src/site/includes/vba_facilities/expandable_alert.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
<va-alert-expandable
data-template="components/vba_facilities/expandable-alert.drupal.liquid"
class="vads-u-margin-top--0 vads-u-margin-bottom--0 vamc-facility-expandable-alert"
status="{{ VBAExpandableAlertStatus }}"
trigger="{{ VBAExpandableAlertTrigger }}"
>
<div>
<div class="vads-u-display--inline-block vads-u-margin-bottom--2">
{% if fieldOperatingStatusMoreInfo and fieldOperatingStatusMoreInfo != blank %}
<va-alert-expandable
trigger="{{ VBAExpandableAlertTrigger }}"
data-template="components/vba_facilities/expandable-alert.drupal.liquid"
class="vads-u-margin-top--0 vads-u-margin-bottom--0 vamc-facility-expandable-alert"
status="{{ VBAExpandableAlertStatus }}"
style="max-width: 303px;"
>
<p>
{{ fieldOperatingStatusMoreInfo | newline_to_br | phoneLinks }}
</p>
</div>
</va-alert-expandable>
</va-alert-expandable>
{% else %}
<va-alert
slim
status="{{ VBAExpandableAlertStatus }}"
class="vads-u-margin-y--0"
style="max-width: 303px;"
>
<p class="vads-u-margin-y--0 vads-u-padding-y--0 vads-u-font-weight--bold">{{ VBAExpandableAlertTrigger }}</p>
</va-alert>
{% endif %}
</div>
{% endif %}
24 changes: 22 additions & 2 deletions src/site/layouts/health_care_facility_status.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,33 @@
{% if office.fieldOperatingStatusFacility == 'normal' %}
Normal services and hours
{% elsif office.fieldOperatingStatusFacility == 'limited' %}
<va-alert slim="true" status="warning">
<va-alert slim="true" status="info">
Limited services and hours
</va-alert>
{% elsif office.fieldOperatingStatusFacility == 'closed' %}
<va-alert slim="true" status="error">
<va-alert slim="true" status="warning">
Facility closed
</va-alert>
{% elsif office.fieldOperatingStatusFacility == 'notice' %}
<va-alert slim="true" status="info">
Facility notice
</va-alert>
{% elsif office.fieldOperatingStatusFacility == 'temporary_closure' %}
<va-alert slim="true" status="warning">
Temporary facility closure
</va-alert>
{% elsif office.fieldOperatingStatusFacility == 'temporary_location' %}
<va-alert slim="true" status="warning">
Temporary location
</va-alert>
{% elsif office.fieldOperatingStatusFacility == 'virtual_care' %}
<va-alert slim="true" status="warning">
Virtual care only
</va-alert>
{% elsif office.fieldOperatingStatusFacility == 'coming_soon' %}
<va-alert slim="true" status="warning">
Coming soon
</va-alert>
{% endif %}
{% endfor %}
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
17 changes: 15 additions & 2 deletions src/site/layouts/vamc_operating_status_and_alerts.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,25 @@
</span>

{% elsif status.entity.fieldOperatingStatusFacility == 'limited' %}
<va-alert slim status="warning" visible>Limited services and hours</va-alert>
<va-alert slim status="info" visible>Limited services and hours</va-alert>

{% elsif status.entity.fieldOperatingStatusFacility == 'closed' %}
<va-alert slim status="error" visible>Facility Closed</va-alert>
<va-alert slim status="warning" visible>Facility Closed</va-alert>

{% elsif status.entity.fieldOperatingStatusFacility == 'temporary_closure' %}
<va-alert slim status="warning" visible>Temporary facility closure</va-alert>

{% elsif status.entity.fieldOperatingStatusFacility == 'temporary_location' %}
<va-alert slim status="warning" visible>Temporary location</va-alert>

{% elsif status.entity.fieldOperatingStatusFacility == 'virtual_care' %}
<va-alert slim status="warning" visible>Virtual care only</va-alert>

{% elsif status.entity.fieldOperatingStatusFacility == 'coming_soon' %}
<va-alert slim status="warning" visible>Coming soon</va-alert>
{% endif %}


{% if status.entity.fieldOperatingStatusMoreInfo and status.entity.fieldOperatingStatusFacility != 'normal' %}
<div class="vads-u-margin-top--1p5">
{{ status.entity.fieldOperatingStatusMoreInfo }}
Expand Down
6 changes: 1 addition & 5 deletions src/site/layouts/vba_facility.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@
<div>
<div>

{% if fieldOperatingStatusMoreInfo and fieldOperatingStatusFacility and fieldOperatingStatusFacility != 'normal' %}
<div class="vads-u-display--inline-block vads-u-margin-bottom--1">
{% include "src/site/includes/vba_facilities/expandable_alert.liquid" %}
</div>
{% endif %}
{% include "src/site/includes/vba_facilities/expandable_alert.liquid" %}

<section>
<script type="application/ld+json">
Expand Down

0 comments on commit 8559590

Please sign in to comment.