From 67a5591f3ec9f14f6240702804cea9e0e0ef1faa Mon Sep 17 00:00:00 2001 From: Laurent GAY Date: Mon, 20 Oct 2025 18:22:25 +0200 Subject: [PATCH] perform front-end unit test from "view/Group" - #1879 --- .../unit/specs/components/Group/TimelineView.spec.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/unit/specs/components/Group/TimelineView.spec.ts b/tests/unit/specs/components/Group/TimelineView.spec.ts index 047a18aa4..87557c700 100644 --- a/tests/unit/specs/components/Group/TimelineView.spec.ts +++ b/tests/unit/specs/components/Group/TimelineView.spec.ts @@ -28,7 +28,9 @@ const generateWrapper = () => { global_data.provide.dateFnsLocale = enUS; global_data.plugins = [router]; return mount(TimelineView, { - props: {}, + props: { + preferredUsername: "my-group", + }, global: { ...global_data, stubs: { @@ -45,5 +47,12 @@ describe("TimelineView", () => { await flushPromises(); expect(htmlRemoveId(wrapper.html())).toMatchSnapshot(); expect(requestHandlers.handle_0).toHaveBeenCalledTimes(1); + expect(requestHandlers.handle_0).toHaveBeenCalledWith({ + author: undefined, + limit: 25, + page: 1, + preferredUsername: "my-group", + type: undefined, + }); }); });