
Control UI E2E
FreeStreamline your Control UI testing with Vitest and Playwright.
Free · Opens the source repo
What Control UI E2E does
Control UI E2E is designed for developers working on the OpenClaw Control UI, providing a robust framework for end-to-end testing using Vitest and Playwright. This skill allows you to conduct thorough testing of the Control UI's graphical interface, ensuring that all user interactions are validated against mocked Gateway WebSocket flows. By utilizing deterministic data, you can avoid the unpredictability of live environments, making your tests more reliable and repeatable.
The skill includes specific commands to run targeted end-to-end tests or to execute a full suite of tests within a local environment. With a focus on maintaining deterministic scenarios, it prevents the use of live provider keys and real credentials unless explicitly required. This approach not only enhances security but also allows for focused testing of UI routing, application startup, and visible behavior, ensuring that all aspects of the user experience are thoroughly validated.
Visual proof is a key feature of this skill, automatically generating screenshots and videos during tests to provide clear evidence of the UI's state at various interaction points. This is particularly useful for validating user-facing features, as it captures the entire flow from initial view to final state. The skill also emphasizes the importance of addressing any discrepancies in recorded behavior, encouraging developers to fix issues before finalizing their tests.
Overall, Control UI E2E is an essential tool for developers looking to enhance their testing processes for the OpenClaw Control UI. It combines the power of Vitest and Playwright to deliver a comprehensive testing solution that ensures high-quality user experiences.
When to use it
Use this skill when you need to validate changes to the Control UI with automated tests that simulate real user interactions.
When not to use it
This skill may not be suitable for simple unit tests or scenarios where live data is required for testing.
What you can build with it
Testing New Features
When implementing new features in the Control UI, use this skill to ensure that all user interactions work as expected.
Validating Bug Fixes
After fixing bugs in the Control UI, run end-to-end tests to confirm that the issues are resolved without introducing new problems.
Demonstrating UI Changes
Use the visual proof capabilities to create recordings that demonstrate UI changes for stakeholders or team reviews.
How to install Control UI E2E
View source1. Install with the skills CLI
npx skills add openclaw/openclaw/control-ui-e2e --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by openclawControl UI E2E
Use this for Control UI changes that need a real browser flow with deterministic Gateway data.
Test Shape
- Use
ui/src/**/*.e2e.test.tsfor full GUI flows. - Use
ui/src/test-helpers/control-ui-e2e.tsto start the Vite Control UI and install a mocked Gateway WebSocket. - Keep scenarios deterministic. Do not use live provider keys, real channel credentials, or a real Gateway unless the user explicitly asks for live proof.
- Prefer existing
.browser.test.tsor unit tests for narrow rendering logic; use this E2E lane when the proof should cover routing, app boot, Gateway handshake, requests, and visible UI behavior together.
Commands
- Target one E2E test in a Codex worktree:
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-flow.messaging.e2e.test.ts
- Run the whole local lane in a normal checkout:
pnpm test:ui:e2e
If dependencies are missing in a Codex worktree, install once with pnpm install; for broad GUI proof or dependency-heavy checks, use Testbox/Crabbox instead of running a wide local pnpm lane.
Visual Proof Default
When running mocked Control UI/dashboard validation for a user-facing feature, produce visual proof by default unless the user explicitly opts out.
- Keep the Vitest E2E assertions deterministic; do not commit generated screenshots or videos.
- After or alongside the focused E2E test, run the mocked Control UI app when available, for example
pnpm dev:ui:mock -- --port <port>. - Drive Chromium with Playwright against the local mock URL and capture a video plus screenshots for each meaningful state: initial view, interaction input, result state, and final/paginated/selected state.
- Use
browser.newContext({ recordVideo: { dir, size }, viewport }),page.screenshot({ path }), and close the context before reporting the video path. - Put artifacts under
.artifacts/control-ui-e2e/<short-feature-name>/or another clearly named local temp directory, and report the absolute paths in the final answer. - Treat recording as validation, not only demo capture. If the recorder fails or shows surprising behavior, stop, fix the behavior, add or update a regression test, then rerecord.
- If visual proof is blocked, state the exact blocker and still report the textual E2E evidence.
Mock Pattern
Start the app server, install the mock before page.goto, then assert both Gateway traffic and visible UI:
const server = await startControlUiE2eServer();
const page = await context.newPage();
const gateway = await installMockGateway(page, {
historyMessages: [{ role: "assistant", content: [{ type: "text", text: "Ready." }] }],
});
await page.goto(`${server.baseUrl}chat`);
await page.locator(".agent-chat__composer-combobox textarea").fill("hello");
await page.getByRole("button", { name: "Send message" }).click();
const request = await gateway.waitForRequest("chat.send");
await gateway.emitChatFinal({ runId: String(request.params.idempotencyKey), text: "Done." });
await page.getByText("Done.").waitFor();
Extend installMockGateway with typed scenario options or method responses when a new flow needs more Gateway surface.
Standalone Recording
When recording an already-running mocked Control UI URL, use a temporary Playwright script or playwright test spec and keep the recording flow focused:
- Open the mock URL, interact through stable
data-*selectors or user-facing role selectors, and wait on asserted states instead of relying on fixed sleeps. - Assert both visible UI state and mocked Gateway traffic for request-driven flows. For example, verify the expected count/row is visible and that
sessions.listwas called with the expectedsearch,offset, andlimit. - Use short sleeps only after assertions to make the captured video readable.
- Store the generated video under
.artifacts/control-ui-e2e/<feature>/; do not commit it.
Frequently asked questions about Control UI E2E
Similar skills
Playwright Component Testing
Test React and Vue components in isolation with Playwright.
Fluent UI Blazor
Integrate Fluent UI components in Blazor applications effortlessly.
Build MCP App
Create interactive UI widgets for MCP servers.
Web Design Reviewer
Identify and fix design issues in websites efficiently.
Markstream Install
Seamlessly integrate Markstream for Markdown rendering.
GSAP & Framer Scroll Animation
Create advanced scroll animations effortlessly.
