forcedotcom/sf-skills

experience-lwc-accessibility-jest-run

Use ALWAYS when running Sa11y accessibility Jest tests for a Lightning Web Component — locally before pushing, producing the exact command(s), running one file vs a whole suite, selecting tests by naming convention, saving Sa11y-rendered HTML, or reproducin…

View source
Original skill document

Rendered from the source repository. Headings, examples, code, tables, links, and referenced images are preserved.

<!-- adk-managed-skill -->

Running LWC Accessibility Jest Tests

Run Sa11y accessibility unit tests on Lightning Web Components in either:

  • Core (Bazel) — when a WORKSPACE file is present.
  • Standalone (Jest) — when there's no WORKSPACE.

Selenium-level reproductions, GUS A11yBug ingestion, and other internal Salesforce-only flows are out of scope for this skill. For source-code-level WCAG review without running tests, see experience-lwc-accessibility-validate.

When to Use This Skill

  • User wants to run accessibility unit tests (Sa11y Jest) locally before

pushing a fix.

  • User has a known failing test file path (e.g. from an A11yBug's

Test_Names__c) and wants to target it directly.

  • User is iterating on an accessibility fix and needs the fastest

pass/fail signal.

Prerequisites

  • For Bazel Jest tests: a Salesforce core build environment (a WORKSPACE

file is present).

  • For standalone Jest tests: @sa11y/jest installed and configured.

Workflow

Follow running-sa11y-jest-tests.md. Pick the correct mode:

  • Core (Bazel) — use when WORKSPACE is present. Prefer single-file

targets (//{moduleName}:{relativePath}) over module targets when the failing test file path is already known (.test.js extension dropped). Bazel commands must pass --test_env=SA11Y_AUTO=1 --test_env=SA11Y_ENABLE_DOM_MUTATION_OBSERVER=1; when debugging, add SA11Y_ENABLE_RENDERED_DOM_SAVE=1 with the documented save path to avoid EPERM issues.

  • Standalone (Jest) — use when there's no WORKSPACE. Run

npm test -- --testMatch="**/*.accessibility.test.js" for the whole suite, or npm test -- <file> targeting the file by the name/path given in the prompt (a bare filename when it is "in this directory"). Do not prepend SA11Y_* env vars in standalone mode — Sa11y runs automatically because @sa11y/jest is wired into the project's Jest setup; no extra environment variables are needed.

Answer only what is asked. Emit just the command(s) the prompt requests plus the exit-code meaning. Do not pad the plan with unrequested variants (watch, coverage, verbose), snapshot-update steps, or HTML-save sections unless the user explicitly asks for them.

Verification Checklist

  • [ ] Sa11y Jest run completed with a clear pass/fail signal (exit 0 or 3

for Bazel; exit 0 or 1 for Jest).

  • [ ] If snapshots were intentionally updated, the new snapshots are

committed alongside the fix.

Troubleshooting

  • Bazel test "not found" — the target path is off. Remember to drop the

.test.js extension in {relativePath}.

  • HTML saving fails with EPERM — use the prescribed save path

sfdc-test/unit/javascript/htdocs/sa11y/jest.

from this repository

More skills

All skills
forcedotcom
Community

agentforce-d360-analyze

Data Cloud 360° view of a single Agentforce session. TRIGGER when user asks to trace, inspect, summarize, or describe a specific Agentforce session by session id (Agent Session UUID 019d… or MessagingSession id 0Mw…). Also triggers on session discovery — find/list/search sessions by time, agent, channel, outcome, or conversation text — when the user has no session id yet. DO NOT TRIGGER for design-time architecture questions (use agentforce-architecture-analyze instead) or for runtime perf/latency/SLO questions that require platform telemetry beyond Data Cloud.

installs
1
GitHub stars
972
Updated
Sep 7
forcedotcom
Community

agentforce-generate

Build, modify, audit, repair, optimize, debug, and deploy agents with Agentforce Agent Script. TRIGGER when: user creates, reviews, or changes .agent files or aiAuthoringBundle metadata; asks to fix AgentScript, audit an existing agent, run an AgentScript health check, common-pitfall review, or baseline-versus-candidate repair loop; changes a response, action, subagent, route, state flow, or Agent Spec; previews, debugs, deploys, publishes, or tests agents; uses sf agent generate/preview/publish/test; or manages Agentforce MCP servers, tools, assets, or authentication. DO NOT TRIGGER when: Apex, Flow, Prompt Template, Experience Cloud, or general Salesforce CLI work is unrelated to Agent Script; or the primary input is a production session or trace ID rather than an agent artifact.

installs
1
GitHub stars
972
Updated
Sep 7
forcedotcom
Community

platform-quick-deploy

Deploy validated metadata to a Production Salesforce org without re-running tests. TRIGGER when the user wants to deploy to production, says 'quick deploy', 'promote', 'ship to prod', or has just validated and wants to push the change live. REQUIRES a recent sf project deploy validate job ID (≤10 days old, ≤3 days for --use-most-recent). DO NOT TRIGGER for sandbox/scratch deploys (use platform-metadata-deploy) or unvalidated deploys (use platform-deploy-validate first).

installs
1
GitHub stars
972
Updated
Sep 7
forcedotcom
Community

agentforce-test

Write, run, and analyze structured test suites for Agentforce agents — functional AND security. TRIGGER when: user writes or modifies test spec YAML (AiEvaluationDefinition); runs sf agent test create, run, run-eval, or results commands; asks about test coverage strategy, metric selection, or custom evaluations; interprets test results or diagnoses test failures; asks about batch testing, regression suites, or CI/CD test integration; requests security testing, OWASP LLM Top 10, red-teaming, penetration testing, prompt-injection tests, a security grade, or a vulnerability assessment of an agent. DO NOT TRIGGER when: user creates, modifies, previews, or debugs .agent files (use agentforce-generate); deploys or publishes agents; writes Agent Script code; uses sf agent preview for development iteration; analyzes production session traces (use agentforce-observe); performs a static safety review of .agent file content (use agentforce-generate Section 15).

installs
3
GitHub stars
972
Updated
Sep 7