perform front-end unit test from "view/Group" - #1879

This commit is contained in:
Laurent GAY
2025-10-20 18:22:25 +02:00
committed by setop
parent 5d449d3f19
commit 67a5591f3e

View File

@@ -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,
});
});
});