From 03101012b9991a97e7c16f24edc844e68cef8033 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 20 Apr 2026 17:42:25 +0000 Subject: [PATCH] chore: add accessibility tests for various pages including certificates, dashboard, dns providers, login, proxy hosts, and settings --- tests/a11y/certificates.a11y.spec.ts | 28 ++++++++++++++++ tests/a11y/dashboard.a11y.spec.ts | 28 ++++++++++++++++ tests/a11y/dns-providers.a11y.spec.ts | 28 ++++++++++++++++ tests/a11y/login.a11y.spec.ts | 30 +++++++++++++++++ tests/a11y/proxy-hosts.a11y.spec.ts | 28 ++++++++++++++++ tests/a11y/settings.a11y.spec.ts | 48 +++++++++++++++++++++++++++ 6 files changed, 190 insertions(+) create mode 100644 tests/a11y/certificates.a11y.spec.ts create mode 100644 tests/a11y/dashboard.a11y.spec.ts create mode 100644 tests/a11y/dns-providers.a11y.spec.ts create mode 100644 tests/a11y/login.a11y.spec.ts create mode 100644 tests/a11y/proxy-hosts.a11y.spec.ts create mode 100644 tests/a11y/settings.a11y.spec.ts diff --git a/tests/a11y/certificates.a11y.spec.ts b/tests/a11y/certificates.a11y.spec.ts new file mode 100644 index 00000000..4b0270df --- /dev/null +++ b/tests/a11y/certificates.a11y.spec.ts @@ -0,0 +1,28 @@ +import { test } from '../fixtures/a11y'; +import { waitForLoadingComplete } from '../utils/wait-helpers'; +import { expectNoA11yViolations } from '../utils/a11y-helpers'; +import { getBaselinedRuleIds } from './a11y-baseline'; + +test.describe('Accessibility: Certificates', () => { + test.describe.configure({ mode: 'parallel' }); + + test('certificates page has no critical a11y violations', async ({ page, makeAxeBuilder }) => { + await test.step('Navigate to certificates', async () => { + await page.goto('/certificates'); + await waitForLoadingComplete(page); + }); + + await test.step('Run axe accessibility scan', async () => { + const results = await makeAxeBuilder().analyze(); + + test.info().attach('a11y-results', { + body: JSON.stringify(results.violations, null, 2), + contentType: 'application/json', + }); + + expectNoA11yViolations(results, { + knownViolations: getBaselinedRuleIds('/certificates'), + }); + }); + }); +}); diff --git a/tests/a11y/dashboard.a11y.spec.ts b/tests/a11y/dashboard.a11y.spec.ts new file mode 100644 index 00000000..33a54ba5 --- /dev/null +++ b/tests/a11y/dashboard.a11y.spec.ts @@ -0,0 +1,28 @@ +import { test } from '../fixtures/a11y'; +import { waitForLoadingComplete } from '../utils/wait-helpers'; +import { expectNoA11yViolations } from '../utils/a11y-helpers'; +import { getBaselinedRuleIds } from './a11y-baseline'; + +test.describe('Accessibility: Dashboard', () => { + test.describe.configure({ mode: 'parallel' }); + + test('dashboard has no critical a11y violations', async ({ page, makeAxeBuilder }) => { + await test.step('Navigate to dashboard', async () => { + await page.goto('/'); + await waitForLoadingComplete(page); + }); + + await test.step('Run axe accessibility scan', async () => { + const results = await makeAxeBuilder().analyze(); + + test.info().attach('a11y-results', { + body: JSON.stringify(results.violations, null, 2), + contentType: 'application/json', + }); + + expectNoA11yViolations(results, { + knownViolations: getBaselinedRuleIds('/'), + }); + }); + }); +}); diff --git a/tests/a11y/dns-providers.a11y.spec.ts b/tests/a11y/dns-providers.a11y.spec.ts new file mode 100644 index 00000000..0f59e677 --- /dev/null +++ b/tests/a11y/dns-providers.a11y.spec.ts @@ -0,0 +1,28 @@ +import { test } from '../fixtures/a11y'; +import { waitForLoadingComplete } from '../utils/wait-helpers'; +import { expectNoA11yViolations } from '../utils/a11y-helpers'; +import { getBaselinedRuleIds } from './a11y-baseline'; + +test.describe('Accessibility: DNS Providers', () => { + test.describe.configure({ mode: 'parallel' }); + + test('DNS providers page has no critical a11y violations', async ({ page, makeAxeBuilder }) => { + await test.step('Navigate to DNS providers', async () => { + await page.goto('/dns/providers'); + await waitForLoadingComplete(page); + }); + + await test.step('Run axe accessibility scan', async () => { + const results = await makeAxeBuilder().analyze(); + + test.info().attach('a11y-results', { + body: JSON.stringify(results.violations, null, 2), + contentType: 'application/json', + }); + + expectNoA11yViolations(results, { + knownViolations: getBaselinedRuleIds('/dns/providers'), + }); + }); + }); +}); diff --git a/tests/a11y/login.a11y.spec.ts b/tests/a11y/login.a11y.spec.ts new file mode 100644 index 00000000..2f0f8d0a --- /dev/null +++ b/tests/a11y/login.a11y.spec.ts @@ -0,0 +1,30 @@ +import { test } from '../fixtures/a11y'; +import { waitForLoadingComplete } from '../utils/wait-helpers'; +import { expectNoA11yViolations } from '../utils/a11y-helpers'; +import { getBaselinedRuleIds } from './a11y-baseline'; + +test.use({ storageState: { cookies: [], origins: [] } }); + +test.describe('Accessibility: Login', () => { + test.describe.configure({ mode: 'parallel' }); + + test('login page has no critical a11y violations', async ({ page, makeAxeBuilder }) => { + await test.step('Navigate to login page', async () => { + await page.goto('/login'); + await waitForLoadingComplete(page); + }); + + await test.step('Run axe accessibility scan', async () => { + const results = await makeAxeBuilder().analyze(); + + test.info().attach('a11y-results', { + body: JSON.stringify(results.violations, null, 2), + contentType: 'application/json', + }); + + expectNoA11yViolations(results, { + knownViolations: getBaselinedRuleIds('/login'), + }); + }); + }); +}); diff --git a/tests/a11y/proxy-hosts.a11y.spec.ts b/tests/a11y/proxy-hosts.a11y.spec.ts new file mode 100644 index 00000000..29be2d23 --- /dev/null +++ b/tests/a11y/proxy-hosts.a11y.spec.ts @@ -0,0 +1,28 @@ +import { test } from '../fixtures/a11y'; +import { waitForLoadingComplete } from '../utils/wait-helpers'; +import { expectNoA11yViolations } from '../utils/a11y-helpers'; +import { getBaselinedRuleIds } from './a11y-baseline'; + +test.describe('Accessibility: Proxy Hosts', () => { + test.describe.configure({ mode: 'parallel' }); + + test('proxy hosts page has no critical a11y violations', async ({ page, makeAxeBuilder }) => { + await test.step('Navigate to proxy hosts', async () => { + await page.goto('/proxy-hosts'); + await waitForLoadingComplete(page); + }); + + await test.step('Run axe accessibility scan', async () => { + const results = await makeAxeBuilder().analyze(); + + test.info().attach('a11y-results', { + body: JSON.stringify(results.violations, null, 2), + contentType: 'application/json', + }); + + expectNoA11yViolations(results, { + knownViolations: getBaselinedRuleIds('/proxy-hosts'), + }); + }); + }); +}); diff --git a/tests/a11y/settings.a11y.spec.ts b/tests/a11y/settings.a11y.spec.ts new file mode 100644 index 00000000..e71c9ed8 --- /dev/null +++ b/tests/a11y/settings.a11y.spec.ts @@ -0,0 +1,48 @@ +import { test } from '../fixtures/a11y'; +import { waitForLoadingComplete } from '../utils/wait-helpers'; +import { expectNoA11yViolations } from '../utils/a11y-helpers'; +import { getBaselinedRuleIds } from './a11y-baseline'; + +test.describe('Accessibility: Settings', () => { + test.describe.configure({ mode: 'parallel' }); + + test('settings page has no critical a11y violations', async ({ page, makeAxeBuilder }) => { + await test.step('Navigate to settings', async () => { + await page.goto('/settings'); + await waitForLoadingComplete(page); + }); + + await test.step('Run axe accessibility scan', async () => { + const results = await makeAxeBuilder().analyze(); + + test.info().attach('a11y-results', { + body: JSON.stringify(results.violations, null, 2), + contentType: 'application/json', + }); + + expectNoA11yViolations(results, { + knownViolations: getBaselinedRuleIds('/settings'), + }); + }); + }); + + test('users page has no critical a11y violations', async ({ page, makeAxeBuilder }) => { + await test.step('Navigate to users', async () => { + await page.goto('/settings/users'); + await waitForLoadingComplete(page); + }); + + await test.step('Run axe accessibility scan', async () => { + const results = await makeAxeBuilder().analyze(); + + test.info().attach('a11y-results', { + body: JSON.stringify(results.violations, null, 2), + contentType: 'application/json', + }); + + expectNoA11yViolations(results, { + knownViolations: getBaselinedRuleIds('/settings/users'), + }); + }); + }); +});