Generate and run tests for Adobe App Builder actions and UI components. Scaffolds Jest unit tests, integration tests against deployed actions, contract tests for Adobe API interactions, and React component tests using Testing Library. Provides mock helpers for State, Files, Events SDKs, @adobe/aio-lib-* clients, ExC Shell context (@adobe/exc-app), and UIX Guest SDK (@adobe/uix-guest). Use this skill whenever the user mentions testing App Builder actions, writing unit tests for Runtime actions, creating integration tests, mocking Adobe SDKs, setting up test fixtures, running aio app test, or wants to verify action behavior before deployment. Also trigger when users mention Jest configuration for App Builder, test coverage, CI test setup, React component test, Testing Library, UI test, Provider wrapper, test my page, test my form, test my table, test my component, mock shell context, mock extension context, debug test failures, or fix Jest errors.
69
85%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Generate and run Jest tests for Adobe App Builder actions and React Spectrum UI components. Scaffolds unit tests, integration tests, component tests, and mock helpers for Adobe SDKs.
Pick the template or reference that matches the user's intent. Default to assets/unit-test-template.js for generic test requests.
| User wants | Reference | Template / Asset |
|---|---|---|
| Unit test for an existing action | references/testing-patterns.md | assets/unit-test-template.js |
| Integration test against deployed action | references/testing-patterns.md | assets/integration-test-template.js |
| Component test for React Spectrum UI | references/component-testing-patterns.md | assets/component-test-template.js |
| Mock ExC Shell context in tests | references/component-testing-patterns.md | assets/shell-mock-helper.js |
| Mock AEM extension context in tests | references/component-testing-patterns.md | assets/uix-guest-mock-helper.js |
| Mock State SDK in tests | references/mock-catalog.md | assets/mock-state-sdk.js |
| Mock Files SDK in tests | references/mock-catalog.md | assets/mock-files-sdk.js |
| Mock Events SDK in tests | references/mock-catalog.md | assets/mock-events-sdk.js |
| Mock Database SDK in tests | references/mock-catalog.md | assets/mock-database-sdk.js |
| Full mock catalog (all SDKs) | references/mock-catalog.md | — |
| Contract test for API interactions | references/testing-patterns.md | — |
| Pre-deployment verification | references/checklist.md | — |
| Debug test failures | references/debugging.md | — |
When the user's request maps unambiguously to a single pattern above — they name a specific test type, reference a template, or describe a use case that clearly matches one entry — skip straight to generation. Use the matched template and proceed directly.
Examples of fast-path triggers:
assets/unit-test-template.js, generate immediatelyassets/mock-state-sdk.js, inject into test fileassets/integration-test-template.js, configure for deployed actionnpx jest --coverage or aio app testassets/component-test-template.js, wrap in Providerassets/shell-mock-helper.js, inject into test fileassets/uix-guest-mock-helper.js + assets/component-test-template.jsIf there is any ambiguity — multiple test types needed, project structure unclear, or the user hasn't specified enough — fall through to the full workflow below.
test/ mirroring the action path, e.g., test/actions/<action-name>/index.test.js.package.json or jest.config.js.aio app test (wrapper) or npx jest --coverage (direct).jest.mock() at the top of test files to mock Adobe SDK dependencies before importing the action.{ statusCode, body } — assert both in every test.require() and module.exports (not ES imports).test/web-src/components/<ComponentName>.test.js (or test/components/).<Provider theme={defaultTheme}> — Spectrum renders nothing without it.getByRole(), not CSS classes — see references/component-testing-patterns.md selector table.findBy* for data that appears async, queryBy* for absence, waitFor for state changes.test/ directory, jest.config.js, and test scripts in package.json. Scan both src/ for actions AND web-src/ for UI components.ext.config.yaml (or app.config.yaml) for declared actions and their source paths. Check web-src/src/components/ for React components.assets/unit-test-template.js as the base.c. Inject appropriate mocks from references/mock-catalog.md based on detected dependencies.d. Add error scenario tests (missing params, auth failures, SDK errors).assets/component-test-template.js as the base.c. Wrap all renders in <Provider theme={defaultTheme}> — Spectrum renders nothing without it.d. Inject shell mock (assets/shell-mock-helper.js) or UIX guest mock (assets/uix-guest-mock-helper.js) as needed.e. Add loading, success, and error state tests for async data using findBy* and waitFor.aio app test or npx jest --coverage and report results.references/checklist.md before marking done.test/ matching the action directory structuretest/web-src/components/ for UI componentsbeforeEach(() => jest.clearAllMocks())--coverage flag)<Provider theme={defaultTheme}> — Spectrum renders nothing without itreferences/testing-patterns.md for unit, integration, and contract test patterns with annotated examples.references/component-testing-patterns.md for React Spectrum component testing with Provider wrapping, ARIA selectors, and async patterns.references/mock-catalog.md for mock helpers covering all Adobe SDKs (State, Files, Events, Logger, Database, Shell, UIX Guest).references/checklist.md for pre-deployment test verification.assets/unit-test-template.js for Jest unit test boilerplate (CommonJS).assets/integration-test-template.js for integration test against deployed actions.assets/component-test-template.js for React Spectrum component test boilerplate with renderWithSpectrum() helper.assets/shell-mock-helper.js for ExC Shell context mock (@adobe/exc-app).assets/uix-guest-mock-helper.js for AEM UIX Guest mock (@adobe/uix-guest).assets/mock-state-sdk.js, assets/mock-files-sdk.js, assets/mock-events-sdk.js, and assets/mock-database-sdk.js for ready-to-use SDK mock setups.require() matches the actual file location. App Builder actions are typically at src/dx-excshell-1/actions/<name>/index.js.jest.mock() calls must appear before require() of the module under test. Jest hoists mock declarations but order still matters for manual mocks.aio app run (not aio app dev) for integration tests that need real SDK access.init() failures, and timeout scenarios.aio app test** vs npx jest:** aio app test is a thin wrapper around Jest. Use npx jest --coverage directly for more control over flags and reporters.<Provider theme={defaultTheme}> wrapper. Use renderWithSpectrum() helper from assets/component-test-template.js.references/component-testing-patterns.md section g for the role reference table.appbuilder-action-scaffolder (test actions after implementation)appbuilder-ui-scaffolder (test UI components after scaffolding)appbuilder-cicd-pipeline (automated test execution in CI)706f94d
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.