From 0623cee790ffd2a0a8da7d3495767cd793065b65 Mon Sep 17 00:00:00 2001 From: Brandon Tabaska Date: Fri, 21 Jun 2024 16:39:50 -0400 Subject: [PATCH] [Issue #2147]: Pa11y API setup (navapbc/simpler-grants-gov#99) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #{74} > Added API setup to PA11y > Updated Pa11y runtime to enable FF for search > FF requirement was discovered with Ryan while exploring feature. Will enable the search page for proper testing > • svg elements with an img role have an alternative text (https://dequeuniversity.com/rules/axe/4.2/svg-img-alt?application=axeAPI) (html) • svg elements with an img role have an alternative text (https://dequeuniversity.com/rules/axe/4.2/svg-img-alt?application=axeAPI) (html) >Two new errors found now that API results are loading. ![desktop-main-view](https://github.com/navapbc/simpler-grants-gov/assets/29316916/f13859bd-87a7-466d-a20b-e86a9dbe71e5) --- .github/workflows/ci-frontend-a11y.yml | 10 ++++++++++ frontend/.pa11yci-desktop.json | 3 +++ frontend/.pa11yci-mobile.json | 3 +++ 3 files changed, 16 insertions(+) diff --git a/.github/workflows/ci-frontend-a11y.yml b/.github/workflows/ci-frontend-a11y.yml index 8930c324f..dab69f8a3 100644 --- a/.github/workflows/ci-frontend-a11y.yml +++ b/.github/workflows/ci-frontend-a11y.yml @@ -42,6 +42,16 @@ jobs: - name: Start server and log output run: npm run start & + - name: Start API Server for search results + run: | + cd ../api + make init db-seed-local start & + cd ../frontend + # ensure the API wait script is executable + chmod +x ../api/bin/wait-for-api.sh + ../api/bin/wait-for-api.sh + shell: bash + - name: Wait for frontend to be ready run: | # Ensure the server wait script is executable diff --git a/frontend/.pa11yci-desktop.json b/frontend/.pa11yci-desktop.json index 2f477b7bc..5f38da73a 100644 --- a/frontend/.pa11yci-desktop.json +++ b/frontend/.pa11yci-desktop.json @@ -8,6 +8,9 @@ "ignoreHTTPSErrors": true, "args": ["--disable-dev-shm-usage", "--no-sandbox"] }, + "headers": { + "Cookie": "_ff={%22showSearchV0%22:true}" + }, "actions": [ "wait for element #main-content to be visible", "screen capture screenshots-output/desktop-main-view.png" diff --git a/frontend/.pa11yci-mobile.json b/frontend/.pa11yci-mobile.json index 36e8032fa..b0dcbd2f9 100644 --- a/frontend/.pa11yci-mobile.json +++ b/frontend/.pa11yci-mobile.json @@ -8,6 +8,9 @@ "ignoreHTTPSErrors": true, "args": ["--disable-dev-shm-usage", "--no-sandbox"] }, + "headers": { + "Cookie": "_ff={%22showSearchV0%22:true}" + }, "viewport": { "width": 390, "height": 844,