Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

735 B
Raw Blame
import { describe, expect, test } from "vitest";

import { getNotebookDisplay } from "./display";

describe("Notebook advanced disclosure", () => {
  test("shows the complete toolbar and document stats regardless of compact preferences", () => {
    expect(
      getNotebookDisplay({ height: 100, isAdvanced: true, isEditing: true, isSaving: false, showToolbar: false }),
    ).toEqual({ showToolbar: true, toolbarMaxHeight: undefined, showDocumentStats: true });
  });

  test("does not expose editing controls outside an active editable session", () => {
    expect(
      getNotebookDisplay({ height: 300, isAdvanced: true, isEditing: false, isSaving: false, showToolbar: true })
        .showToolbar,
    ).toBe(false);
  });
});