Open History to see the last commit
1import "../index.css";
2
3import { describe, expect, it } from "vite-plus/test";
4import { render } from "vitest-browser-react";
5
6import { DiffPanelShell } from "./DiffPanelShell";
7
8describe("DiffPanelShell", () => {
9 it("uses the shared compact surface subheader in embedded mode", async () => {
10 const screen = await render(
11 <DiffPanelShell mode="embedded" header={<span>Diff controls</span>}>
12 <div>Diff content</div>
13 </DiffPanelShell>,
14 );
15 const subheader = screen.container.querySelector<HTMLElement>("[data-surface-subheader]");
16
17 expect(subheader).not.toBeNull();
18 expect(subheader?.getBoundingClientRect().height).toBe(40);
19 expect(window.getComputedStyle(subheader!).borderTopWidth).toBe("0px");
20 expect(window.getComputedStyle(subheader!).borderBottomWidth).toBe("1px");
21 });
22});