Compare commits

...

1 Commits

Author SHA1 Message Date
429e0a90c6 enable a11y on all visual suites 2023-12-21 11:21:17 -08:00
6 changed files with 26 additions and 8 deletions

View File

@ -24,7 +24,7 @@
Tests the branding associated with the default deployment. At least the about modal for now
*/
const { test, expect } = require('../../../pluginFixtures');
const { test, expect, scanForA11yViolations } = require('../../../avpFixtures');
const percySnapshot = require('@percy/playwright');
const VISUAL_URL = require('../../../constants').VISUAL_URL;
@ -50,4 +50,7 @@ test.describe('Visual - Branding', () => {
// Take a snapshot of the About modal
await percySnapshot(page, `About (theme: '${theme}')`);
});
test.afterEach(async ({ page }, testInfo) => {
await scanForA11yViolations(page, testInfo.title);
});
});

View File

@ -20,7 +20,7 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/
const { test } = require('../../../pluginFixtures.js');
const { test, scanForA11yViolations } = require('../../../avpFixtures');
const { VISUAL_URL, MISSION_TIME } = require('../../../constants.js');
const percySnapshot = require('@percy/playwright');
@ -53,4 +53,7 @@ test.describe('Visual - Controlled Clock', () => {
scope: inspectorPane
});
});
test.afterEach(async ({ page }, testInfo) => {
await scanForA11yViolations(page, testInfo.title);
});
});

View File

@ -20,7 +20,7 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/
const { test } = require('../../../pluginFixtures.js');
const { test, scanForA11yViolations } = require('../../../avpFixtures');
const {
expandTreePaneItemByName,
createDomainObjectWithDefaults
@ -95,4 +95,7 @@ test.describe('Visual - Tree Pane', () => {
scope: treePane
});
});
test.afterEach(async ({ page }, testInfo) => {
await scanForA11yViolations(page, testInfo.title);
});
});

View File

@ -26,13 +26,13 @@
* @property {Object<string, import('@playwright/test').Locator>} LayoutLocator
*/
const { test } = require('../../pluginFixtures');
const { test, scanForA11yViolations } = require('../../avpFixtures');
const { createDomainObjectWithDefaults } = require('../../appActions');
const VISUAL_URL = require('../../constants').VISUAL_URL;
const percySnapshot = require('@percy/playwright');
const snapshotScope = '.l-shell__pane-main .l-pane__contents';
test.describe('Visual - Display Layout', () => {
test.describe('Visual - Display Layout - @a11y', () => {
test('Resize Marquee surrounds selection', async ({ page, theme }) => {
const baseline = await setupBaseline(page);
const { child1LayoutLocator, child1LayoutObjectLocator } = baseline;
@ -70,6 +70,9 @@ test.describe('Visual - Display Layout', () => {
scope: snapshotScope
});
});
test.afterEach(async ({ page }, testInfo) => {
await scanForA11yViolations(page, testInfo.title);
});
});
/**

View File

@ -21,12 +21,12 @@
*****************************************************************************/
/* global __dirname */
const path = require('path');
const { test } = require('../../pluginFixtures');
const { test, scanForA11yViolations } = require('../../avpFixtures');
const percySnapshot = require('@percy/playwright');
const utils = require('../../helper/faultUtils');
test.describe('Fault Management Visual Tests', () => {
test.describe('Fault Management Visual Tests - @a11y', () => {
test('icon test', async ({ page, theme }) => {
await page.addInitScript({
path: path.join(__dirname, '../../helper/', 'addInitFaultManagementPlugin.js')
@ -87,4 +87,7 @@ test.describe('Fault Management Visual Tests', () => {
`Selected faults highlight the ability to Acknowledge or Shelve above the fault list (theme: '${theme}')`
);
});
test.afterEach(async ({ page }, testInfo) => {
await scanForA11yViolations(page, testInfo.title);
});
});

View File

@ -20,7 +20,7 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/
const { expect, test } = require('../../pluginFixtures');
const { test, expect, scanForA11yViolations } = require('../../avpFixtures');
const percySnapshot = require('@percy/playwright');
const { createDomainObjectWithDefaults } = require('../../appActions');
const VISUAL_URL = require('../../constants').VISUAL_URL;
@ -74,4 +74,7 @@ test.describe('Visual - LAD Table', () => {
`LAD Table w/ Sine Wave Generator columns expanded (theme: ${theme})`
);
});
test.afterEach(async ({ page }, testInfo) => {
await scanForA11yViolations(page, testInfo.title);
});
});