Files
replypier/e2e/specs/a11y/a11y.spec.ts
T
WangShen007 20fef2b9f3 chore: settle product naming across app, widget and deployments
One word everywhere: ReplyPier in UI copy, package and image names, the
replypier.site domains (app/api/docs/help), REPLYPIER_* settings and the
--rp-* design tokens.

- public widget API is window.ReplyPier with replypierId / replypierBaseUrl /
  replypierConfig / replypierToken, loader at webclient/replypier.min.js;
  both bundles rebuilt from source
- NOTICE, llms.txt, CONTRIBUTING, HELP_CENTER_INFRA and the demo runtime
  config rewritten; the demo config ships no third-party keys
- migration adds the ReplyPier managed model value to the AI model enum
- local compose project, database, role, volume and Docker network carry the
  same name
2026-10-26 00:57:22 +08:00

46 lines
2.1 KiB
TypeScript

import { test, expect, expectNoNewA11yViolations, InboxPage } from '@e2e'
// Serious and critical axe findings, per screen, held to a baseline
// (a11y-baseline/): today's known issues pass, anything new fails, and the
// baseline shrinks as they are fixed. The widget is checked in both themes.
test.describe('accessibility', () => {
test('sign-in page @a11y', async ({ anonymousPage }) => {
await anonymousPage.goto('/login')
await expect(anonymousPage.getByRole('button', { name: /sign in/i })).toBeVisible()
await expectNoNewA11yViolations(anonymousPage, 'login')
})
// The dashboard is dark unless the user picks light (stored as rp-theme); both are checked.
for (const scheme of ['dark', 'light'] as const) {
const suffix = scheme === 'dark' ? '' : '-light'
test(`dashboard screens, ${scheme} theme @a11y`, async ({ page, agent, agentsPage, aiConfigPage, ticketsPage, peoplePage }) => {
// An agent of its own, so the agents screen is the list (with a card to check), not first-run setup.
expect(agent.id).toBeTruthy()
await page.addInitScript((theme) => localStorage.setItem('rp-theme', theme), scheme)
await new InboxPage(page).goto()
expect(await page.evaluate(() => document.documentElement.dataset.theme)).toBe(scheme)
await expectNoNewA11yViolations(page, `inbox${suffix}`)
await agentsPage.goto()
await expectNoNewA11yViolations(page, `ai-agents${suffix}`)
await aiConfigPage.goto()
await expectNoNewA11yViolations(page, `ai-config${suffix}`)
await ticketsPage.goto()
await expectNoNewA11yViolations(page, `tickets${suffix}`)
await peoplePage.goto()
await expectNoNewA11yViolations(page, `people${suffix}`)
})
}
for (const scheme of ['light', 'dark'] as const) {
test(`widget, ${scheme} theme @a11y @widget`, async ({ widget }) => {
await widget.page.emulateMedia({ colorScheme: scheme })
await widget.embed()
await widget.open()
await expect(widget.messageInput).toBeEditable()
await expectNoNewA11yViolations(widget.page, `widget-${scheme}`)
})
}
})