Frontend Docs Screenshots
SkillWeb & browsingLets your agent write and run Playwright tests that capture screenshots for docs.camunda.io pages.
Then ask your AI: use the Frontend Docs Screenshots skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Add it as a step in a pipeline you build on Ahel, or connect Ahel to Claude, ChatGPT, Cursor, Claude Code or Codex and ask your AI to use it.
About this skill
Use when you add, change, or run the Playwright tests that make the docs.camunda.io images for the orchestration cluster webapp (webapp/client/apps/orchestration-cluster-webapp/test/docs-screenshots/). Use also for the callout helpers, getScreenshotPath, and the test:docs-screenshots script.
What this skill tells your AI
The instructions your AI receives, as published by camunda/camunda in .agents/skills/frontend-docs-screenshots/SKILL.md and read by Ahel’s review.
Purpose
These tests make the images for docs.camunda.io pages. They do not find regressions.
- They write PNG files with
page.screenshot({path}). - They do not use
toHaveScreenshot(). - There is no CI job. Run the tests manually when a docs page needs new images.
All rules in the frontend-integration-test skill also apply here. Read that skill for page
objects, fixtures, endpoint mocks, and selectors.
Files and folders
All paths are relative to webapp/client/apps/orchestration-cluster-webapp/.
| Path | Content |
|---|---|
test/docs-screenshots/<app>/<page-slug>.test.ts | The tests for one docs page |
test/docs-screenshots/<app>/<page-slug>/<image>.png | The images for that docs page |
test/docs-screenshots/screenshot-path.ts | getScreenshotPath helper |
test/docs-screenshots/callouts.ts | Helpers for callouts, zoom, and isolation |
shared-test-modules/api-mocks/ | Response factories for the endpoint mocks |
shared-test-modules/mock-handlers.ts | Endpoint mocks |
test/pages/ | Page objects |
<app> is the docs area, for example tasklist. <page-slug> is the last part of the docs page
URL.
Procedure: add the images for a docs page
- Open the docs page. Find the names of all images on the page.
- Make the file
test/docs-screenshots/<app>/<page-slug>.test.ts. - Put a JSDoc at the start of the file. Write the link to the docs page in it.
- In the JSDoc, write the images that other test files make. Write the images that the file does not make, and give the reason.
- Add the endpoint mocks in
test.beforeEach. Usenetwork.use(). - Set a fixed time with
page.clock.setFixedTime(). - Set the localStorage flags that stop first-time popups. Use the
seed*methods of the page objects, for exampleseedHasCompletedTask(). - Write one
test()for each image. Give the test the same name as the image. - Before each screenshot, wait for all visible content with
expect(...).toBeVisible(). - Write the screenshot with
getScreenshotPath. Use the image name from the docs page.
Example
/**
* Makes the images for the Tasklist "Some page" docs page:
* https://docs.camunda.io/docs/next/components/tasklist/userguide/some-page/
*/
import {test, expect} from '#/pw-modules/test-extend';
import {getScreenshotPath} from '../screenshot-path';
const NOW = new Date('2024-09-05T13:32:00.000Z');
test.beforeEach(async ({network, page, tasklistIndexPage}) => {
network.use(/* endpoint mocks */);
await page.clock.setFixedTime(NOW);
await tasklistIndexPage.seedHasCompletedTask();
});
test('some-image', async ({page, tasklistIndexPage}) => {
await tasklistIndexPage.goto();
await expect(tasklistIndexPage.tasksPanel).toBeVisible();
await page.screenshot({
path: getScreenshotPath({baseUrl: import.meta.url, folder: 'some-page', fileName: 'some-image.png'}),
});
});
Rules
- Use fixed data in all mocks. Do not use random values or the current date.
- Put new response factories in the correct file in
shared-test-modules/api-mocks/. Do not put them in the test file. - Put new endpoint mocks in
shared-test-modules/mock-handlers.ts. - Add new locators to the page objects. Do not use
page.locator()in the test file when a page object can supply the locator. - Use the light theme and the Full HD viewport. The
docs-screenshotsproject sets these values. - Do not add assertions that do not help the screenshot. These tests do not test behavior.
Helpers
getScreenshotPath
getScreenshotPath({baseUrl, folder, fileName}) gives the absolute path of an image.
baseUrl: alwaysimport.meta.url.folder: the folder of the image, relative to the test file. Usually this is<page-slug>.fileName: the image name from the docs page.
callouts.ts
| Helper | Function |
|---|---|
addCallouts(page, callouts) | Draws labels and lines to elements. Returns the box of all callouts. |
frameApp(page, {scale}) | Makes the application smaller and puts it in the center. |
transformApp(page, {scale, x, y}) | Makes the application smaller and moves it to x and y. |
isolateElements(page, locators) | Hides all elements, but not the given elements. |
getBox(locator, {fitText}) | Returns the box of an element or of its text. |
padBox(page, box, padding) | Adds space around a box. Use the result as the clip value. |
Each callout has these properties:
label: the text of the callout.target: one locator or a list of locators.side:top,bottom,left, orright.distance,offset: optional. These move the label.outline: optional. Draws a line around the target.fitText: optional. Uses the box of the text, not the box of the element.
To show only a part of the page, use the box from addCallouts with padBox. Then give the
result as clip to page.screenshot().
Procedure: make the images
- Make sure that Docker operates.
- Go to
webapp/client/apps/orchestration-cluster-webapp/. - Build the application with
npm run build. - Run
npm run test:docs-screenshots. - To run one file, add the file path. For example:
npm run test:docs-screenshots -- tasklist/using-tasklist.test.ts. - Examine each changed PNG with
git statusand an image viewer.
The script runs the browser in the mcr.microsoft.com/playwright Docker image. Thus, the
images do not change between computers. The first run can take 3 minutes because Docker
downloads the image.
Procedure: do the checks
- Go to
webapp/client/. - Run
npm run prettier:format. - Run
npm run lint. - Go to
apps/orchestration-cluster-webapp/. - Run
npm run typecheck.
Do not run npx prettier or npx tsc directly.
References
test/docs-screenshots/tasklist/using-tasklist.test.ts: example with callouts, zoom, and clip.test/docs-screenshots/tasklist/managing-tasks.test.ts: example with a flow of screenshots.playwright.config.ts: thedocs-screenshotsproject.docs/monorepo-docs/frontend/testing.md: the testing guide.
Signals
- GitHub stars
- 4k
- Forks
- 830
- Last commit
- Oct 2026
Advanced
- Item type
- skill
- Key
frontend-docs-screenshots- Source
- github.com/camunda/camunda
Related picks
Skill · mattpocock
The pick for TypeScripttypescript-providers
Skill · composiohq
The pick for TypeScriptdocker-agent-run
Skill · docker
The pick for Dockerendly-docker
Skill · viant
The pick for Dockere2e-testing
Skill · thedaviddias
The pick for End-to-end testinge2e-environment-preflight
Skill · sno-ai
The pick for End-to-end testing