mirror of
https://github.com/hanzoai/dev-desktop.git
synced 2026-11-20 01:07:23 +00:00
25 lines
815 B
TypeScript
25 lines
815 B
TypeScript
import { expect } from "e2e";
|
|
|
|
import { test, WEB } from "./hanzo.ts";
|
|
|
|
test(
|
|
"An expanded command shows the JSON line it printed, keys and all",
|
|
WEB,
|
|
async ({ hanzo, app, screen }) => {
|
|
const project = await hanzo.project("demo");
|
|
const thread = await hanzo.thread({
|
|
project,
|
|
title: "JSON output",
|
|
messages: ["Print the JSON"],
|
|
model: "command-output",
|
|
});
|
|
await hanzo.open(thread);
|
|
|
|
await expect(screen.getByText("The command printed one JSON line.")).toBeVisible();
|
|
await screen.getByRole("button", "Worked for", { exact: false }).tap();
|
|
await screen.getByRole("button", "node -e", { exact: false }).first().tap();
|
|
await app.screenshot("expanded");
|
|
await expect(screen.getByText('"requestId":"keep-me"', { exact: false })).toBeVisible();
|
|
},
|
|
);
|