test(#268): assert the hover card's pointer-events:none (F1)

Lock the feature's central invariant — the tooltip must never intercept the
comment-mark's click (which opens the side panel). pointer-events:none is the
single property guaranteeing that, and it was unasserted: a regression dropping
it from the style object would let a lingering card swallow the click with no
test failing. Assert it in the "shows after delay" test.
This commit is contained in:
claude code agent 227
2026-07-01 01:57:40 +03:00
parent a848003db2
commit d58fe967a4

View File

@@ -182,6 +182,10 @@ describe("CommentHoverPreview — hover behaviour", () => {
});
const card = screen.getByTestId("comment-hover-preview");
expect(card.textContent).toBe("Hello world");
// The card MUST NOT intercept the mark's click (which opens the side panel):
// pointer-events:none is the single property guaranteeing that — lock it so
// a regression dropping it from the style object fails here.
expect(card.style.pointerEvents).toBe("none");
});
it("hides on mouseout", () => {