appbuilder-testing
БесплатноЗапускает вложенные скриптыНе проверенGenerate and run tests for Adobe App Builder actions and UI components. Scaffolds Jest unit tests, integration tests against deployed actions, contract tests…
от adobe★ 342 звезды на GitHubОб этом скилле
App Builder Testing
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.
Pattern Quick-Reference
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 | — |
Fast Path (for clear requests)
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:
- "Write tests for my action" → Read the action source, use
assets/unit-test-template.js, generate immediately - "Help me mock State SDK" → Use
assets/mock-state-sdk.js, inject into test file - "Add integration tests" → Use
assets/integration-test-template.js, configure for deployed action - "Run tests with coverage" → Execute
npx jest --coverageoraio app test - "Test my component/page/form/table" → Read the component source, use
assets/component-test-template.js, wrap in Provider - "Mock shell context" → Use
assets/shell-mock-helper.js, inject into test file - "Test my AEM extension component" → Use
assets/uix-guest-mock-helper.js+assets/component-test-template.js
If 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.
Quick Reference
- Test directory: Place test files in
test/mirroring the action path, e.g.,test/actions/<action-name>/index.test.js. - Jest configuration: App Builder projects use Jest by default. Config lives in
package.jsonorjest.config.js. - Test command:
aio app test(wrapper) ornpx jest --coverage(direct). - Mock pattern: Use
jest.mock()at the top of test files to mock Adobe SDK dependencies before importing the action. - Response shape: All actions return
{ statusCode, body }— assert both in every test. - Error paths: Always test 200 (success), 400 (bad input), and 500 (SDK failure) scenarios.
- CommonJS: Action test files use
require()andmodule.exports(not ES imports). - Component test directory:
test/web-src/components/<ComponentName>.test.js(ortest/components/). - Provider wrapper: Always wrap in
<Provider theme={defaultTheme}>— Spectrum renders nothing without it. - ARIA selectors: Use
getByRole(), not CSS classes — seereferences/component-testing-patterns.mdselector table. - Async testing: Use
findBy*for data that appears async,queryBy*for absence,waitForfor state changes.
Full Workflow (for ambiguous or complex requests)
- Scan project structure — Check for existing
test/directory,jest.config.js, and test scripts inpackage.json. Scan bothsrc/for actions ANDweb-src/for UI components. - Identify targets to test — Parse
ext.config.yaml(orapp.config.yaml) for declared actions and their source paths. Checkweb-src/src/components/for React components. - Determine test types needed — Unit tests for logic, integration tests for deployed actions, contract tests for API interactions.
- **For each action:**a. Read the action source to identify SDK dependencies (State, Files, Events, Logger, etc.).b. Generate unit test using
assets/unit-test-template.jsas the base.c. Inject appropriate mocks fromreferences/mock-catalog.mdbased on detected dependencies.d. Add error scenario tests (missing params, auth failures, SDK errors). - **For each UI component:**a. Read the component source to identify dependencies (shell context,
Установить appbuilder-testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(aio:*)Bash(npm:*)Bash(node:*)Bash(npx:*)ReadWriteEditВложенные файлы
FAQ
Что делает скилл appbuilder-testing?
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.
Как установить скилл appbuilder-testing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл appbuilder-testing запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic