From 072e15534e06c1d4ad036120f287c3436b06e420 Mon Sep 17 00:00:00 2001 From: Tessa Kelly Date: Thu, 14 Apr 2022 10:36:23 -0700 Subject: [PATCH] Adds modal axe check --- script/percy-tests.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/script/percy-tests.js b/script/percy-tests.js index f47563c6..213d4fe4 100644 --- a/script/percy-tests.js +++ b/script/percy-tests.js @@ -86,6 +86,7 @@ describe('UI tests', function () { 'Fonts': ['heading-order'], 'Heading': ['heading-order'], 'Menu': ['heading-order', 'region'], + 'Modal': ['region'], 'Message': ['heading-order', 'region'], 'Page': ['color-contrast', 'heading-order', 'select-name'], 'RadioButton': ['duplicate-id', 'region'], @@ -107,6 +108,10 @@ describe('UI tests', function () { await page.click('#launch-modal') await page.waitFor('[role="dialog"]') await percySnapshot(page, 'Full Info Modal') + + const results = await new AxePuppeteer(page).disableRules(skippedRules[name] || []).analyze(); + handleAxeResults(results); + await page.click('[aria-label="Close modal"]') await page.select('select', 'warning') await page.click('#launch-modal')