From 84a78635d0805300218c525eed82a910ebb516c7 Mon Sep 17 00:00:00 2001 From: igorkorenfeld Date: Mon, 17 Apr 2023 18:02:43 -0400 Subject: [PATCH] Place pa11y outside docker for gh action Try running pa11y as a seperate step Add install for pa11y in gh action Add path for package.json Change app to localhost in pa11yci Change path for disabling middlewar in gh step Update path again for perl line Add rule to ignore whoami link in pa11yci Revert "Update path again for perl line" This reverts commit f08324a9463a666ef665e42af1983d84154e708b. --- .github/workflows/test.yaml | 12 ++++++++--- src/.pa11yci | 42 +++++++++++++++++++++---------------- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 13f9a48c0..d1923e473 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -43,9 +43,15 @@ jobs: run: | perl -pi \ -e 's/"csp.middleware.CSPMiddleware",/$&"registrar.tests.common.MockUserLogin",/' \ - src/registrar/config/settings.py + /registrar/config/settings.py - - name: Accessibility Scan + - name: Start container working-directory: ./src # leverage the docker compose setup that we already have for local development - run: docker compose run pa11y npm run pa11y-ci + run: docker compose up -d + + - name: run pa11y + working-directory: ./src + run: | + npm i -g pa11y-ci + pa11y-ci diff --git a/src/.pa11yci b/src/.pa11yci index ce70e8537..1c6e245a1 100644 --- a/src/.pa11yci +++ b/src/.pa11yci @@ -1,22 +1,28 @@ { + "defaults": { + "concurrency": 1, + "timeout": 10000, + "hideElements": "a[href='/whoami/']" + + }, "urls": [ - "http://app:8080/", - "http://app:8080/health/", - "http://app:8080/whoami/", - "http://app:8080/register/", - "http://app:8080/register/organization/", - "http://app:8080/register/org_federal/", - "http://app:8080/register/org_election/", - "http://app:8080/register/org_contact/", - "http://app:8080/register/authorizing_official/", - "http://app:8080/register/current_sites/", - "http://app:8080/register/dotgov_domain/", - "http://app:8080/register/purpose/", - "http://app:8080/register/your_contact/", - "http://app:8080/register/other_contacts/", - "http://app:8080/register/anything_else/", - "http://app:8080/register/requirements/", - "http://app:8080/register/review/", - "http://app:8080/register/finished/" + "http://localhost:8080/", + "http://localhost:8080/health/", + "http://localhost:8080/whoami/", + "http://localhost:8080/register/", + "http://localhost:8080/register/organization/", + "http://localhost:8080/register/org_federal/", + "http://localhost:8080/register/org_election/", + "http://localhost:8080/register/org_contact/", + "http://localhost:8080/register/authorizing_official/", + "http://localhost:8080/register/current_sites/", + "http://localhost:8080/register/dotgov_domain/", + "http://localhost:8080/register/purpose/", + "http://localhost:8080/register/your_contact/", + "http://localhost:8080/register/other_contacts/", + "http://localhost:8080/register/anything_else/", + "http://localhost:8080/register/requirements/", + "http://localhost:8080/register/review/", + "http://localhost:8080/register/finished/" ] }