Loading...
Loading...
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.
npx skill4agent add adobe/skills appbuilder-testingassets/unit-test-template.js| 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 | — |
assets/unit-test-template.jsassets/mock-state-sdk.jsassets/integration-test-template.jsnpx jest --coverageaio app testassets/component-test-template.jsassets/shell-mock-helper.jsassets/uix-guest-mock-helper.jsassets/component-test-template.jstest/test/actions/<action-name>/index.test.jspackage.jsonjest.config.jsaio app testnpx jest --coveragejest.mock(){ statusCode, body }require()module.exportstest/web-src/components/<ComponentName>.test.jstest/components/<Provider theme={defaultTheme}>getByRole()references/component-testing-patterns.mdfindBy*queryBy*waitFortest/jest.config.jspackage.jsonsrc/web-src/ext.config.yamlapp.config.yamlweb-src/src/components/assets/unit-test-template.jsreferences/mock-catalog.mdassets/component-test-template.js<Provider theme={defaultTheme}>assets/shell-mock-helper.jsassets/uix-guest-mock-helper.jsfindBy*waitForaio app testnpx jest --coveragereferences/checklist.mdtest/test/web-src/components/beforeEach(() => jest.clearAllMocks())--coverage<Provider theme={defaultTheme}>references/testing-patterns.mdreferences/component-testing-patterns.mdreferences/mock-catalog.mdreferences/checklist.mdassets/unit-test-template.jsassets/integration-test-template.jsassets/component-test-template.jsrenderWithSpectrum()assets/shell-mock-helper.js@adobe/exc-appassets/uix-guest-mock-helper.js@adobe/uix-guestassets/mock-state-sdk.jsassets/mock-files-sdk.jsassets/mock-events-sdk.jsassets/mock-database-sdk.jsrequire()src/dx-excshell-1/actions/<name>/index.jsjest.mock()require()aio app runaio app devinit()aio app testnpx jestaio app testnpx jest --coverage<Provider theme={defaultTheme}>renderWithSpectrum()assets/component-test-template.jsreferences/component-testing-patterns.mdappbuilder-action-scaffolderappbuilder-ui-scaffolderappbuilder-cicd-pipeline