Skip to content

Build your personal knowledge base with Trilium Notes

test(client): drop the scroll anchor search test that passes without the fix

Elian Doranf54ce80509f1
diff --git a/apps/client/src/widgets/containers/scrolling_container.spec.ts b/apps/client/src/widgets/containers/scrolling_container.spec.ts
index 885394a3c3..e34b9439a7 100644
--- a/apps/client/src/widgets/containers/scrolling_container.spec.ts
+++ b/apps/client/src/widgets/containers/scrolling_container.spec.ts
@@ -63,21 +63,6 @@ describe("ScrollingContainer", () => {
expect(scrollTo).not.toHaveBeenCalled();
});
- it("searches from the last anchor on the next scroll", () => {
- const { container } = render();
- const first = document.createElement("p");
- const second = document.createElement("p");
- container.prepend(first, second);
- const firstRect = vi.spyOn(first, "getBoundingClientRect")
- .mockReturnValue(new DOMRect(0, -150, 500, 50));
- vi.spyOn(second, "getBoundingClientRect").mockReturnValue(new DOMRect(0, -100, 500, 50));
-
- paragraphTop = -20;
- scrollAndWaitForFrame(container, 1020);
-
- expect(firstRect).not.toHaveBeenCalled();
- });
-
it("stops observing and listening to scrolls on cleanup", () => {
const { scrollingContainer, container, observer } = render();
const cancelAnimationFrame = vi.fn();