Remove dead code on favourite and people metaspaces (#34187)

* Remove unused Favourites and People metaspaces

* Update existing tests

* Update snapshots

* Update i18n lang
This commit is contained in:
Florian Duros
2026-07-08 14:20:09 +00:00
committed by GitHub
parent 67a20c57a3
commit d041669031
14 changed files with 32 additions and 762 deletions
@@ -706,24 +706,19 @@ describe("Spotlight Dialog", () => {
beforeEach(() => {
jest.spyOn(SpaceStore.instance, "enabledMetaSpaces", "get").mockReturnValue([
MetaSpace.Home,
MetaSpace.Favourites,
MetaSpace.People,
MetaSpace.Orphans,
]);
});
it.each([MetaSpace.Home, MetaSpace.Favourites, MetaSpace.People])(
"should show metaspace %s",
async (metaSpace) => {
const onFinished = jest.fn();
const { asFragment, container } = render(
<SpotlightDialog initialText={metaSpace.split("-")[0]} onFinished={onFinished} />,
);
await waitFor(() =>
expect(container.querySelector(".mx_SpotlightDialog_metaspaceResult")).toBeInTheDocument(),
);
expect(asFragment()).toMatchSnapshot();
},
);
it("should show Home metaspace", async () => {
const onFinished = jest.fn();
const { asFragment, container } = render(
<SpotlightDialog initialText={MetaSpace.Home.split("-")[0]} onFinished={onFinished} />,
);
await waitFor(() =>
expect(container.querySelector(".mx_SpotlightDialog_metaspaceResult")).toBeInTheDocument(),
);
expect(asFragment()).toMatchSnapshot();
});
});
});