/aem-edge-delivery-services:testing-blocksfrom aem-edge-delivery-services
Guides writing unit and Playwright E2E tests for AEM Edge Delivery Services blocks, covering element location conventions, analytics assertions, and browser validation workflows.
Ships in aem-edge-delivery-services. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Validate code changes and write maintainable tests in AEM Edge Delivery Services projects.
aem up (ports in git worktrees, serving ./content/, cleaning up stale ./content/ files that shadow remote .aem.page updates)Exercise the block in a real browser on the test content URL(s): every variant, mobile, tablet and desktop widths (e.g. 375px, 768px, 1200px), and every interaction. Use whatever tooling you have: browser/Playwright MCP tools, a throwaway Playwright script (delete it afterwards), or a manual browser.
Committed tests guard functional behavior so it doesn't silently regress. Write a test only when a wrong answer is plausible and costly to miss. 100% coverage is not the goal, and neither is a test per variant or per branch; a block with static decoration and no behavior may need no tests at all.
Use the project's test tools. Find them in package.json scripts, test config and existing tests, and follow their file locations and naming. Don't add a second framework. aem-boilerplate ships without one; if the project has no test setup, ask the user before adding one.
Browser (E2E) tests assert the block's functional behavior. Rules for E2E specs:
./content/drafts/).decorate() adds, or hardcoded authored copy; when you need a label, read it from the page at runtime. The block root class (.{block}) comes from aem.js and is stable.toHaveCSS, getComputedStyle), geometry (boundingBox), or screenshot comparisons (toHaveScreenshot).If package.json defines test scripts (the boilerplate has none), run them, including any new tests. E2E suites usually need the dev server (aem up) running.
aem up is running and check the port it logged (in a git worktree aem up uses a branch-hashed port, not 3000; see aem-cli)../content/ (e.g. content/drafts/my-block.html served at /drafts/my-block with no --html-folder flag). If testing a remote .aem.page update, make sure a stale file in ./content/ isn't shadowing that path.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub adobe/skills --plugin aem-edge-delivery-services26 skills in this plugin
/aem-block-libraryUse when a new or changed AEM Edge Delivery Services block needs an entry in the block library that authors use to find and insert it: the Experience Workspace (formerly DA, Document Authoring) library or the Sidekick Library for Word and Google Docs projects. Covers finding the project's library, the block page, variants, the sheet row, library metadata and the steps that happen outside the repo. For tests that run against the library page use testing-blocks./aem-cliUse this when running or troubleshooting the local Edge Delivery dev server or the Adobe AEM CLI (@adobe/aem-cli, formerly helix-cli; `aem up`, `aem content`, `aem import`). Covers starting `aem up` and its port (git worktrees, a port already in use), serving local test pages from `./content/`, cloning da.live content locally with `aem content clone` to preview, inspect or edit it and pushing edits back, `aem up` failures (cert errors, proxy 404s, local pages not found), .env / AEM_* configuration, HTTPS, installing or upgrading the CLI, and the importer server. For da.live content-format rules or the DA Source API use da-content; for writing EDS block code use content-driven-development./aem-layout-viewUse when block or site code of an AEM Edge Delivery Services project authored in Experience Workspace (EW, formerly DA, Document Authoring) must stay editable in layout view, the WYSIWYG page editor that renders the page with the site's own code: authors can't edit a block's text or images, blocks duplicate or misbehave after edits, a request fails only in layout view, or a branch needs testing there. Not for the Universal Editor (ue-component-model) or projects authored in Word or Google Docs./authoring-analysisUse this when the page-import pipeline needs to determine the authoring approach (default content vs blocks) for scraped content before generating import HTML for AEM Edge Delivery Services. Covers validating block selection and section styling for import/migration. Do not invoke directly — called by page-import as a pipeline step./block-collection-and-partyUse this when you are starting AEM Edge Delivery Services (EDS, Franklin, Helix) development and want an existing reference to build from, such as a block, build tool, code snippet, integration pattern, or plugin. Searches the Block Collection and Block Party repositories, matches candidates against the need, and returns a suitable starting point to clone or adapt./brand-setupUse when a fresh AEM Edge Delivery Services boilerplate project should take on the brand basics of an existing website being migrated to EDS — colors, body and heading fonts, font sizes, header height, favicon and logo. Triggers include "set up the brand from <site>", "match the source site's look", "apply the client's fonts and colors", "use their favicon and logo". Not for projects whose styles were already customized, and not for full design-system extraction (spacing scales, components, motifs).Other plugins' skills for the same job