Describe exactly what the viewer should see
Tell Democraft which app to open and which user actions to perform. Each scene becomes a readable, version-controlled part of the demo.
Read the guideimport { byTestId, defineDemo } from "@democraft/core";
export default defineDemo({
id: "publish-release",
title: "Publish a release",
source: { baseUrl: "http://localhost:3000" },
targets: {
release: byTestId("release-name"),
publish: byTestId("publish-release"),
},
async run({ demo }) {
await demo.scene("publish", async (scene) => {
await scene.goto("/releases/new");
await scene.fill("release", "Summer launch");
await scene.click("publish");
await scene.focus("publish");
await scene.caption("The release is live.");
});
},
});