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:
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user