From ba87f4ee2480654e37765710f3140b823f369b71 Mon Sep 17 00:00:00 2001 From: agent_coder Date: Thu, 2 Jul 2026 02:02:13 +0300 Subject: [PATCH] test(editor): cover read-only code-block branch; drop dead justify prop (#275 review F1/F2) F1: add code-block-view.test.tsx (mirrors the footnote structure harness) asserting the language selector renders only when editor.isEditable, and the copy button is present in both modes. F2: remove the now-dead justify=flex-end on the absolutely-positioned menu Group. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../code-block/code-block-view.test.tsx | 68 +++++++++++++++++++ .../components/code-block/code-block-view.tsx | 6 +- 2 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 apps/client/src/features/editor/components/code-block/code-block-view.test.tsx diff --git a/apps/client/src/features/editor/components/code-block/code-block-view.test.tsx b/apps/client/src/features/editor/components/code-block/code-block-view.test.tsx new file mode 100644 index 00000000..0048b45c --- /dev/null +++ b/apps/client/src/features/editor/components/code-block/code-block-view.test.tsx @@ -0,0 +1,68 @@ +import { describe, it, expect, vi } from "vitest"; +import { render } from "@testing-library/react"; + +// Covers the read-only render branch (PR #278): the language