docs: record presentation visual follow-up pass
This commit is contained in:
@@ -80,17 +80,15 @@ describe("DiscussionPanel", () => {
|
||||
expect(screen.getByText("Where is the AI agent in this thesis?")).toBeDefined();
|
||||
expect(screen.getByText(/workflow substrate that external agents operate/i)).toBeDefined();
|
||||
expect(screen.getByText(/not a new planning algorithm/i)).toBeDefined();
|
||||
expect(screen.getByText(/Answer directly first/i)).toBeDefined();
|
||||
expect(screen.queryByText(/Answer directly first/i)).not.toBeInTheDocument();
|
||||
expect(screen.getByLabelText("defense question")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("renders speaker hints as presenter notes instead of answer content", () => {
|
||||
it("keeps speaker hints out of the audience-facing discussion panel", () => {
|
||||
render(<DiscussionPanel branchId="where-is-ai-agent" onClose={onClose} />);
|
||||
|
||||
const note = screen.getByLabelText("presenter note");
|
||||
expect(note).toHaveTextContent(/Answer directly first/i);
|
||||
expect(note).toHaveTextContent(/Presenter note/i);
|
||||
expect(note).toHaveClass("discussion-panel__presenter-note");
|
||||
expect(screen.queryByLabelText("presenter note")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText(/Answer directly first/i)).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("separates Q&A answer, provenance, and presenter note regions", () => {
|
||||
@@ -101,7 +99,7 @@ describe("DiscussionPanel", () => {
|
||||
expect(screen.getByLabelText("short defense answer")).toHaveTextContent(/workflow substrate/i);
|
||||
expect(screen.getByLabelText("answer expansion")).toHaveTextContent(/planning algorithm/i);
|
||||
expect(screen.getByLabelText("answer provenance")).toHaveTextContent(/Abstract/i);
|
||||
expect(screen.getByLabelText("presenter note")).toHaveTextContent(/Answer directly first/i);
|
||||
expect(screen.queryByLabelText("presenter note")).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("uses context layout for non-Q&A discussion branches", () => {
|
||||
|
||||
@@ -111,6 +111,33 @@ describe("PresentationRoute", () => {
|
||||
15000,
|
||||
);
|
||||
|
||||
const visualRouteContracts = [
|
||||
{ hash: "#scene/thesis/title", heading: "Design and Implementation of lda.chat", primary: "thesis opening" },
|
||||
{ hash: "#scene/lifecycle/draft", heading: "Workflow Lifecycle", primary: "workflow lifecycle rail" },
|
||||
{ hash: "#scene/authoring/diagnose", heading: "Author, Validate, Repair", primary: "agent authoring loop" },
|
||||
{ hash: "#scene/prepared-lifecycle/validate", heading: "Prepared Workflow Lifecycle", primary: "prepared workflow authoring lifecycle" },
|
||||
{ hash: "#scene/run-from-deployment/graph", heading: "Run From Deployment", primary: "workflow graph" },
|
||||
{ hash: "#scene/evaluation/findings", heading: "Evaluation", primary: "evaluation evidence board" },
|
||||
{ hash: "#scene/conclusion/conclusion", heading: "Limits and Conclusion", primary: "thesis contribution boundary" },
|
||||
] as const;
|
||||
|
||||
it.each(visualRouteContracts)(
|
||||
"keeps the primary visual contract for $hash",
|
||||
async ({ hash, heading, primary }) => {
|
||||
window.location.hash = hash;
|
||||
const { PresentationRoute } = await import("./PresentationRoute.js");
|
||||
render(<PresentationRoute />);
|
||||
|
||||
await waitFor(
|
||||
() => expect(screen.getAllByRole("heading", { name: heading })).toHaveLength(1),
|
||||
{ timeout: 12000 },
|
||||
);
|
||||
expect(screen.getByLabelText(primary, { exact: true })).toBeInTheDocument();
|
||||
expect(document.documentElement.scrollHeight).toBeLessThanOrEqual(window.innerHeight);
|
||||
},
|
||||
15000,
|
||||
);
|
||||
|
||||
it.each([
|
||||
"#scene/thesis/title",
|
||||
"#scene/problem/direct-actions",
|
||||
|
||||
@@ -62,7 +62,7 @@ describe("presentation.css", () => {
|
||||
)?.groups?.body;
|
||||
|
||||
expect(sceneBlock).toContain("grid-template-columns:");
|
||||
expect(sceneBlock).toMatch(/minmax\(15rem, 0\.35fr\).*minmax\(0, 0\.65fr\)/);
|
||||
expect(sceneBlock).toMatch(/minmax\(12rem, 0\.26fr\).*minmax\(0, 0\.74fr\)/);
|
||||
expect(sceneBlock).toContain("min-height: 0");
|
||||
expect(sceneBlock).toContain("overflow: hidden");
|
||||
expect(sceneBlock).not.toContain("grid-template-rows:");
|
||||
@@ -75,7 +75,7 @@ describe("presentation.css", () => {
|
||||
|
||||
expect(scene9Rules.filter((rule) => rule.includes("grid-template-columns:")).length).toBeGreaterThan(0);
|
||||
expect(scene9Rules.join("\n")).not.toContain("1.65fr");
|
||||
expect(scene9Rules.join("\n")).toMatch(/minmax\(15rem, 0\.35fr\)\s+minmax\(0, 0\.65fr\)/);
|
||||
expect(scene9Rules.join("\n")).toMatch(/minmax\(12rem, 0\.26fr\)\s+minmax\(0, 0\.74fr\)/);
|
||||
});
|
||||
|
||||
it("bounds Scene 9 conversation scrolling and recenters Scene 8 at compact stage widths", () => {
|
||||
|
||||
Reference in New Issue
Block a user