Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

Commit 15e4e87

Browse files
authored
style(sessions): format artifact preview test
Generated-By: PostHog Code Task-Id: ac25b9a6-5db4-4592-ad52-be66ce043db0
1 parent 467cc83 commit 15e4e87

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

packages/ui/src/features/sessions/components/ArtifactPreview.test.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
22
import { beforeEach, describe, expect, it, vi } from "vitest";
33
import { ArtifactPreview } from "./ArtifactPreview";
4-
import { artifactHtmlDocument, artifactPreviewBlob } from "./artifactPreviewDocument";
4+
import {
5+
artifactHtmlDocument,
6+
artifactPreviewBlob,
7+
} from "./artifactPreviewDocument";
58

69
const previewBlob = new Blob(["<h1>Artifact content</h1>"], {
710
type: "text/html",
@@ -235,13 +238,17 @@ describe("ArtifactPreview", () => {
235238

236239
expect(screen.getByRole("heading", { name: "Report" })).toBeInTheDocument();
237240
expect(screen.getByRole("table")).toBeInTheDocument();
238-
expect(container.querySelector(".plan-markdown.mx-auto")).toBeInTheDocument();
241+
expect(
242+
container.querySelector(".plan-markdown.mx-auto"),
243+
).toBeInTheDocument();
239244
expect(screen.getByText("report.md")).toBeInTheDocument();
240245

241246
fireEvent.click(screen.getByRole("button", { name: "View source" }));
242247

243248
expect(screen.getByTestId("source-view")).toHaveTextContent("# Report");
244-
expect(screen.getByRole("button", { name: "View preview" })).toBeInTheDocument();
249+
expect(
250+
screen.getByRole("button", { name: "View preview" }),
251+
).toBeInTheDocument();
245252
});
246253

247254
it("blocks network subresources in HTML artifacts", () => {

0 commit comments

Comments
 (0)