Room list: edit or remove custom sections (#33283)

* feat(sc): add section menu to section header

* feat(rls): add edit and remove sections

* feat(dialog): add editing mode to CreateSectionDialog

* feat(dialog): add remove section dialog

* feat(vm): wire up vm and stores

* test: update existing snapshots

* test(e2e): add playwright tests to edit and remove a section

* chore: fix remove section i18n key

* fix: able to send empty sections

* chore: update create section editing docs

* chore: remove useless fallback

* chore: add logs when section is unknown

* feat: use different wording when removing an empty section

* fix: only animate the chevron icon in the section header

* fix: change dialog subtitle weight to medium
This commit is contained in:
Florian Duros
2026-04-28 10:16:34 +00:00
committed by GitHub
parent 1dd5748d6f
commit c363d2eb82
22 changed files with 1090 additions and 160 deletions
@@ -56,4 +56,38 @@ describe("CreateSectionDialog", () => {
await userEvent.keyboard("{Enter}");
expect(onFinished).toHaveBeenCalledWith(true, "My section");
});
describe("editing mode", () => {
function renderEditComponent(): void {
render(<CreateSectionDialog onFinished={onFinished} sectionToEdit="Existing Section" />);
}
it("pre-fills the input with the existing section name", () => {
renderEditComponent();
const input = screen.getByRole("textbox");
expect(input).toHaveValue("Existing Section");
});
it("shows the edit section button instead of create section", () => {
renderEditComponent();
expect(screen.getByRole("button", { name: "Edit section" })).toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Create section" })).not.toBeInTheDocument();
});
it("calls onFinished with the updated name when edit section is clicked", async () => {
renderEditComponent();
const input = screen.getByRole("textbox");
await userEvent.clear(input);
await userEvent.type(input, "Updated Section");
await userEvent.click(screen.getByRole("button", { name: "Edit section" }));
expect(onFinished).toHaveBeenCalledWith(true, "Updated Section");
});
it("has the edit section button disabled when the input is empty", async () => {
renderEditComponent();
const input = screen.getByRole("textbox");
await userEvent.clear(input);
expect(screen.getByRole("button", { name: "Edit section" })).toBeDisabled();
});
});
});
@@ -0,0 +1,48 @@
/*
* Copyright 2026 Element Creations Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
import { render, screen } from "jest-matrix-react";
import userEvent from "@testing-library/user-event";
import React from "react";
import { RemoveSectionDialog } from "../../../../../src/components/views/dialogs/RemoveSectionDialog";
describe("RemoveSectionDialog", () => {
const onFinished: jest.Mock = jest.fn();
beforeEach(() => {
jest.resetAllMocks();
});
it("renders the dialog when section is not empty", () => {
const { container } = render(<RemoveSectionDialog onFinished={onFinished} isEmpty={false} />);
expect(container).toMatchSnapshot();
expect(
screen.getByText("The chats in this section will still be available in your chats list."),
).toBeInTheDocument();
});
it("renders the dialog when section is empty", () => {
const { container } = render(<RemoveSectionDialog onFinished={onFinished} isEmpty={true} />);
expect(container).toMatchSnapshot();
expect(
screen.queryByText("The chats in this section will still be available in your chats list."),
).not.toBeInTheDocument();
});
it("calls onFinished with true when remove section is clicked", async () => {
render(<RemoveSectionDialog onFinished={onFinished} isEmpty={false} />);
await userEvent.click(screen.getByRole("button", { name: "Remove section" }));
expect(onFinished).toHaveBeenCalledWith(true);
});
it("calls onFinished with false when the dialog is cancelled", async () => {
render(<RemoveSectionDialog onFinished={onFinished} isEmpty={false} />);
await userEvent.click(screen.getByRole("button", { name: "Cancel" }));
expect(onFinished).toHaveBeenCalledWith(false);
});
});
@@ -29,7 +29,7 @@ exports[`CreateSectionDialog renders the dialog 1`] = `
style="--mx-flex-display: flex; --mx-flex-direction: column; --mx-flex-align: start; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-6x); --mx-flex-wrap: nowrap;"
>
<span
class="_typography_6v6n8_153 _font-body-md-semibold_6v6n8_55"
class="_typography_6v6n8_153 _font-body-md-medium_6v6n8_60"
>
Sections are only for you
</span>
@@ -52,6 +52,7 @@ exports[`CreateSectionDialog renders the dialog 1`] = `
name="sectionName"
required=""
title=""
value=""
/>
</div>
</form>
@@ -0,0 +1,161 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`RemoveSectionDialog renders the dialog when section is empty 1`] = `
<div>
<div
data-focus-guard="true"
style="width: 1px; height: 0px; padding: 0px; overflow: hidden; position: fixed; top: 1px; left: 1px;"
tabindex="0"
/>
<div
aria-labelledby="mx_BaseDialog_title"
class="mx_RemoveSectionDialog mx_Dialog_fixedWidth"
data-focus-lock-disabled="false"
role="dialog"
tabindex="-1"
>
<div
class="mx_Dialog_header"
>
<h1
class="mx_Heading_h3 mx_Dialog_title"
id="mx_BaseDialog_title"
>
Remove section?
</h1>
</div>
<span
class="_typography_6v6n8_153 _font-body-md-regular_6v6n8_50"
>
Are you sure you want to remove this section?
</span>
<div
class="mx_Dialog_buttons"
>
<span
class="mx_Dialog_buttons_row"
>
<button
data-testid="dialog-cancel-button"
type="button"
>
Cancel
</button>
<button
class="mx_Dialog_primary"
data-testid="dialog-primary-button"
type="button"
>
Remove section
</button>
</span>
</div>
<div
aria-label="Close dialog"
class="mx_AccessibleButton mx_Dialog_cancelButton"
role="button"
tabindex="0"
>
<svg
fill="currentColor"
height="1em"
viewBox="0 0 24 24"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M6.293 6.293a1 1 0 0 1 1.414 0L12 10.586l4.293-4.293a1 1 0 1 1 1.414 1.414L13.414 12l4.293 4.293a1 1 0 0 1-1.414 1.414L12 13.414l-4.293 4.293a1 1 0 0 1-1.414-1.414L10.586 12 6.293 7.707a1 1 0 0 1 0-1.414"
/>
</svg>
</div>
</div>
<div
data-focus-guard="true"
style="width: 1px; height: 0px; padding: 0px; overflow: hidden; position: fixed; top: 1px; left: 1px;"
tabindex="0"
/>
</div>
`;
exports[`RemoveSectionDialog renders the dialog when section is not empty 1`] = `
<div>
<div
data-focus-guard="true"
style="width: 1px; height: 0px; padding: 0px; overflow: hidden; position: fixed; top: 1px; left: 1px;"
tabindex="0"
/>
<div
aria-labelledby="mx_BaseDialog_title"
class="mx_RemoveSectionDialog mx_Dialog_fixedWidth"
data-focus-lock-disabled="false"
role="dialog"
tabindex="-1"
>
<div
class="mx_Dialog_header"
>
<h1
class="mx_Heading_h3 mx_Dialog_title"
id="mx_BaseDialog_title"
>
Remove section?
</h1>
</div>
<span
class="_typography_6v6n8_153 _font-body-md-regular_6v6n8_50"
>
Are you sure you want to remove this section?
</span>
<br />
<span
class="_typography_6v6n8_153 _font-body-md-regular_6v6n8_50"
>
The chats in this section will still be available in your chats list.
</span>
<div
class="mx_Dialog_buttons"
>
<span
class="mx_Dialog_buttons_row"
>
<button
data-testid="dialog-cancel-button"
type="button"
>
Cancel
</button>
<button
class="mx_Dialog_primary"
data-testid="dialog-primary-button"
type="button"
>
Remove section
</button>
</span>
</div>
<div
aria-label="Close dialog"
class="mx_AccessibleButton mx_Dialog_cancelButton"
role="button"
tabindex="0"
>
<svg
fill="currentColor"
height="1em"
viewBox="0 0 24 24"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M6.293 6.293a1 1 0 0 1 1.414 0L12 10.586l4.293-4.293a1 1 0 1 1 1.414 1.414L13.414 12l4.293 4.293a1 1 0 0 1-1.414 1.414L12 13.414l-4.293 4.293a1 1 0 0 1-1.414-1.414L10.586 12 6.293 7.707a1 1 0 0 1 0-1.414"
/>
</svg>
</div>
</div>
<div
data-focus-guard="true"
style="width: 1px; height: 0px; padding: 0px; overflow: hidden; position: fixed; top: 1px; left: 1px;"
tabindex="0"
/>
</div>
`;
@@ -1046,6 +1046,38 @@ describe("RoomListStoreV3", () => {
});
});
describe("editSection", () => {
it("delegates to the section module", async () => {
enableSections();
getClientAndRooms();
const editSectionSpy = jest.spyOn(sectionModule, "editSection").mockResolvedValue(undefined);
const store = new RoomListStoreV3Class(dispatcher);
await store.start();
await store.editSection("element.io.section.test-tag");
expect(editSectionSpy).toHaveBeenCalledWith("element.io.section.test-tag");
});
});
describe("removeSection", () => {
it("delegates to the section module and emits LISTS_UPDATE_EVENT", async () => {
enableSections();
getClientAndRooms();
jest.spyOn(sectionModule, "deleteSection").mockResolvedValue(undefined);
const store = new RoomListStoreV3Class(dispatcher);
await store.start();
const listsUpdateListener = jest.fn();
store.on(LISTS_UPDATE_EVENT, listsUpdateListener);
await store.removeSection("element.io.section.test-tag", false);
expect(sectionModule.deleteSection).toHaveBeenCalledWith("element.io.section.test-tag", false);
expect(listsUpdateListener).toHaveBeenCalled();
});
});
it("updates sections when RoomList.OrderedCustomSections setting changes", async () => {
enableSections();
const { rooms } = getClientAndRooms();
@@ -7,75 +7,200 @@
import Modal from "../../../../src/Modal";
import SettingsStore from "../../../../src/settings/SettingsStore";
import { createSection } from "../../../../src/stores/room-list-v3/section";
import { createSection, editSection, deleteSection } from "../../../../src/stores/room-list-v3/section";
import { CreateSectionDialog } from "../../../../src/components/views/dialogs/CreateSectionDialog";
import { RemoveSectionDialog } from "../../../../src/components/views/dialogs/RemoveSectionDialog";
describe("createSection", () => {
beforeEach(() => {
jest.spyOn(SettingsStore, "getValue").mockReturnValue(null);
jest.spyOn(SettingsStore, "setValue").mockResolvedValue(undefined);
});
describe("section", () => {
afterEach(() => {
jest.restoreAllMocks();
});
it.each([
[false, "", undefined],
[true, "", undefined],
[true, "My Section", expect.stringMatching(/^element\.io\.section\./)],
])("returns %s when shouldCreate=%s and name='%s'", async (shouldCreate, name, expected) => {
jest.spyOn(Modal, "createDialog").mockReturnValue({
finished: Promise.resolve([shouldCreate, name]),
close: jest.fn(),
} as any);
const result = await createSection();
expect(result).toEqual(expected);
});
it("returns the new tag when section is created", async () => {
jest.spyOn(Modal, "createDialog").mockReturnValue({
finished: Promise.resolve([true, "My Section"]),
close: jest.fn(),
} as any);
const result = await createSection();
expect(result).toMatch(/^element\.io\.section\./);
});
it("opens the CreateSectionDialog", async () => {
const createDialogSpy = jest.spyOn(Modal, "createDialog").mockReturnValue({
finished: Promise.resolve([false, ""]),
close: jest.fn(),
} as any);
await createSection();
expect(createDialogSpy).toHaveBeenCalledWith(CreateSectionDialog);
});
it("saves section data and ordered sections at ACCOUNT level when confirmed", async () => {
const existingTag = "element.io.section.existing";
jest.spyOn(SettingsStore, "getValue").mockImplementation((setting) => {
if (setting === "RoomList.OrderedCustomSections") return [existingTag];
return null;
describe("createSection", () => {
beforeEach(() => {
jest.spyOn(SettingsStore, "getValue").mockReturnValue(null);
jest.spyOn(SettingsStore, "setValue").mockResolvedValue(undefined);
});
jest.spyOn(Modal, "createDialog").mockReturnValue({
finished: Promise.resolve([true, "My Section"]),
close: jest.fn(),
} as any);
const setValueSpy = jest.spyOn(SettingsStore, "setValue").mockResolvedValue(undefined);
await createSection();
it.each([
[false, "", undefined],
[true, "", undefined],
[true, "My Section", expect.stringMatching(/^element\.io\.section\./)],
])("returns %s when shouldCreate=%s and name='%s'", async (shouldCreate, name, expected) => {
jest.spyOn(Modal, "createDialog").mockReturnValue({
finished: Promise.resolve([shouldCreate, name]),
close: jest.fn(),
} as any);
const customDataCall = setValueSpy.mock.calls.find(([name]) => name === "RoomList.CustomSectionData");
const savedSection = Object.values(customDataCall![3] as Record<string, { tag: string; name: string }>)[0];
expect(savedSection.name).toBe("My Section");
expect(savedSection.tag).toMatch(/^element\.io\.section\./);
const result = await createSection();
expect(result).toEqual(expected);
});
const orderedCall = setValueSpy.mock.calls.find(([name]) => name === "RoomList.OrderedCustomSections");
const savedOrder = orderedCall![3] as string[];
expect(savedOrder[0]).toBe(existingTag);
expect(savedOrder[1]).toMatch(/^element\.io\.section\./);
it("returns the new tag when section is created", async () => {
jest.spyOn(Modal, "createDialog").mockReturnValue({
finished: Promise.resolve([true, "My Section"]),
close: jest.fn(),
} as any);
const result = await createSection();
expect(result).toMatch(/^element\.io\.section\./);
});
it("opens the CreateSectionDialog", async () => {
const createDialogSpy = jest.spyOn(Modal, "createDialog").mockReturnValue({
finished: Promise.resolve([false, ""]),
close: jest.fn(),
} as any);
await createSection();
expect(createDialogSpy).toHaveBeenCalledWith(CreateSectionDialog);
});
it("saves section data and ordered sections at ACCOUNT level when confirmed", async () => {
const existingTag = "element.io.section.existing";
jest.spyOn(SettingsStore, "getValue").mockImplementation((setting) => {
if (setting === "RoomList.OrderedCustomSections") return [existingTag];
return null;
});
jest.spyOn(Modal, "createDialog").mockReturnValue({
finished: Promise.resolve([true, "My Section"]),
close: jest.fn(),
} as any);
const setValueSpy = jest.spyOn(SettingsStore, "setValue").mockResolvedValue(undefined);
await createSection();
const customDataCall = setValueSpy.mock.calls.find(([name]) => name === "RoomList.CustomSectionData");
const savedSection = Object.values(customDataCall![3] as Record<string, { tag: string; name: string }>)[0];
expect(savedSection.name).toBe("My Section");
expect(savedSection.tag).toMatch(/^element\.io\.section\./);
const orderedCall = setValueSpy.mock.calls.find(([name]) => name === "RoomList.OrderedCustomSections");
const savedOrder = orderedCall![3] as string[];
expect(savedOrder[0]).toBe(existingTag);
expect(savedOrder[1]).toMatch(/^element\.io\.section\./);
});
});
describe("editSection", () => {
const tag = "element.io.section.abc";
const existingSectionData = { [tag]: { tag, name: "Old Name" } };
beforeEach(() => {
jest.spyOn(SettingsStore, "getValue").mockReturnValue(existingSectionData);
jest.spyOn(SettingsStore, "setValue").mockResolvedValue(undefined);
});
it("does nothing if the section does not exist", async () => {
jest.spyOn(SettingsStore, "getValue").mockReturnValue({});
const createDialogSpy = jest.spyOn(Modal, "createDialog");
await editSection(tag);
expect(createDialogSpy).not.toHaveBeenCalled();
});
it("opens the CreateSectionDialog with the current section name", async () => {
const createDialogSpy = jest.spyOn(Modal, "createDialog").mockReturnValue({
finished: Promise.resolve([false, ""]),
close: jest.fn(),
} as any);
await editSection(tag);
expect(createDialogSpy).toHaveBeenCalledWith(CreateSectionDialog, { sectionToEdit: "Old Name" });
});
it.each([
[false, "New Name"],
[true, ""],
[true, "Old Name"],
])("does not save when shouldEdit=%s and name='%s'", async (shouldEdit, name) => {
jest.spyOn(Modal, "createDialog").mockReturnValue({
finished: Promise.resolve([shouldEdit, name]),
close: jest.fn(),
} as any);
const setValueSpy = jest.spyOn(SettingsStore, "setValue").mockResolvedValue(undefined);
await editSection(tag);
expect(setValueSpy).not.toHaveBeenCalled();
});
it("saves the new name when confirmed with a different name", async () => {
jest.spyOn(Modal, "createDialog").mockReturnValue({
finished: Promise.resolve([true, "New Name"]),
close: jest.fn(),
} as any);
const setValueSpy = jest.spyOn(SettingsStore, "setValue").mockResolvedValue(undefined);
await editSection(tag);
expect(setValueSpy).toHaveBeenCalledWith(
"RoomList.CustomSectionData",
null,
expect.anything(),
expect.objectContaining({ [tag]: { tag, name: "New Name" } }),
);
});
});
describe("deleteSection", () => {
const tag = "element.io.section.abc";
const otherTag = "element.io.section.other";
beforeEach(() => {
jest.spyOn(SettingsStore, "getValue").mockImplementation((setting) => {
if (setting === "RoomList.CustomSectionData") return { [tag]: { tag, name: "My Section" } };
if (setting === "RoomList.OrderedCustomSections") return [otherTag, tag];
return null;
});
jest.spyOn(SettingsStore, "setValue").mockResolvedValue(undefined);
});
it("does nothing if the section does not exist", async () => {
jest.spyOn(SettingsStore, "getValue").mockReturnValue({});
const createDialogSpy = jest.spyOn(Modal, "createDialog");
await deleteSection(tag, false);
expect(createDialogSpy).not.toHaveBeenCalled();
});
it.each([
[true, "empty"],
[false, "non-empty"],
])("opens the RemoveSectionDialog with isEmpty=%s for %s section", async (isEmpty) => {
const createDialogSpy = jest.spyOn(Modal, "createDialog").mockReturnValue({
finished: Promise.resolve([false]),
close: jest.fn(),
} as any);
await deleteSection(tag, isEmpty);
expect(createDialogSpy).toHaveBeenCalledWith(RemoveSectionDialog, { isEmpty });
});
it("does not save when user cancels", async () => {
jest.spyOn(Modal, "createDialog").mockReturnValue({
finished: Promise.resolve([false]),
close: jest.fn(),
} as any);
const setValueSpy = jest.spyOn(SettingsStore, "setValue").mockResolvedValue(undefined);
await deleteSection(tag, false);
expect(setValueSpy).not.toHaveBeenCalled();
});
it("removes the section from ordered list and section data when confirmed", async () => {
jest.spyOn(Modal, "createDialog").mockReturnValue({
finished: Promise.resolve([true]),
close: jest.fn(),
} as any);
const setValueSpy = jest.spyOn(SettingsStore, "setValue").mockResolvedValue(undefined);
await deleteSection(tag, false);
const orderedCall = setValueSpy.mock.calls.find(([name]) => name === "RoomList.OrderedCustomSections");
expect(orderedCall![3]).toEqual([otherTag]);
const customDataCall = setValueSpy.mock.calls.find(([name]) => name === "RoomList.CustomSectionData");
expect(customDataCall![3]).not.toHaveProperty(tag);
});
});
});
@@ -12,6 +12,9 @@ import { RoomNotificationState } from "../../../src/stores/notifications/RoomNot
import { RoomNotificationStateStore } from "../../../src/stores/notifications/RoomNotificationStateStore";
import { NotificationStateEvents } from "../../../src/stores/notifications/NotificationState";
import { createTestClient, mkRoom } from "../../test-utils";
import SettingsStore from "../../../src/settings/SettingsStore";
import RoomListStoreV3, { CHATS_TAG } from "../../../src/stores/room-list-v3/RoomListStoreV3";
import { DefaultTagID } from "../../../src/stores/room-list-v3/skip-list/tag";
describe("RoomListSectionHeaderViewModel", () => {
let onToggleExpanded: jest.Mock;
@@ -20,6 +23,12 @@ describe("RoomListSectionHeaderViewModel", () => {
beforeEach(() => {
onToggleExpanded = jest.fn();
matrixClient = createTestClient();
jest.spyOn(SettingsStore, "watchSetting").mockReturnValue("watcher-id");
jest.spyOn(SettingsStore, "unwatchSetting").mockReturnValue(undefined);
jest.spyOn(SettingsStore, "getValue").mockImplementation((setting) => {
if (setting === "RoomList.OrderedCustomSections") return [];
return null;
});
});
afterEach(() => {
@@ -87,6 +96,121 @@ describe("RoomListSectionHeaderViewModel", () => {
expect(vm.isExpanded).toBe(false);
});
describe("displaySectionMenu", () => {
it.each([
[DefaultTagID.Favourite, false],
[DefaultTagID.LowPriority, false],
[CHATS_TAG, false],
["element.io.section.custom", true],
])("should be %s for tag %s", (tag, expected) => {
const vm = new RoomListSectionHeaderViewModel({
tag,
title: "Section",
spaceId: "!space:server",
onToggleExpanded,
});
expect(vm.getSnapshot().displaySectionMenu).toBe(expected);
});
});
describe("onCustomSectionDataChange", () => {
let watchCallback: () => void;
beforeEach(() => {
jest.spyOn(SettingsStore, "watchSetting").mockImplementation((settingName, _roomId, callback) => {
if (settingName === "RoomList.CustomSectionData") watchCallback = callback as () => void;
return "watcher-id";
});
});
it("should update title when custom section data changes", () => {
const tag = "element.io.section.custom";
const vm = new RoomListSectionHeaderViewModel({
tag,
title: "Old Title",
spaceId: "!space:server",
onToggleExpanded,
});
expect(vm.getSnapshot().title).toBe("Old Title");
jest.spyOn(SettingsStore, "getValue").mockReturnValue({ [tag]: { tag, name: "New Title" } });
watchCallback();
expect(vm.getSnapshot().title).toBe("New Title");
});
it("should not update title when section data is missing", () => {
const tag = "element.io.section.custom";
const vm = new RoomListSectionHeaderViewModel({
tag,
title: "My Section",
spaceId: "!space:server",
onToggleExpanded,
});
jest.spyOn(SettingsStore, "getValue").mockReturnValue({});
watchCallback();
expect(vm.getSnapshot().title).toBe("My Section");
});
});
describe("editSection", () => {
it("should delegate to RoomListStoreV3.instance.editSection", async () => {
const editSectionSpy = jest.spyOn(RoomListStoreV3.instance, "editSection").mockResolvedValue(undefined);
const tag = "element.io.section.custom";
const vm = new RoomListSectionHeaderViewModel({
tag,
title: "Section",
spaceId: "!space:server",
onToggleExpanded,
});
await vm.editSection();
expect(editSectionSpy).toHaveBeenCalledWith(tag);
});
});
describe("removeSection", () => {
beforeEach(() => {
const mockState = {
on: jest.fn(),
off: jest.fn(),
hasAnyNotificationOrActivity: false,
} as unknown as RoomNotificationState;
jest.spyOn(RoomNotificationStateStore.instance, "getRoomState").mockReturnValue(mockState);
});
it("should delegate to RoomListStoreV3.instance.removeSection with isEmpty=true when no rooms", async () => {
const removeSectionSpy = jest.spyOn(RoomListStoreV3.instance, "removeSection").mockResolvedValue(undefined);
const tag = "element.io.section.custom";
const vm = new RoomListSectionHeaderViewModel({
tag,
title: "Section",
spaceId: "!space:server",
onToggleExpanded,
});
await vm.removeSection();
expect(removeSectionSpy).toHaveBeenCalledWith(tag, true);
});
it("should delegate to RoomListStoreV3.instance.removeSection with isEmpty=false when rooms exist", async () => {
const removeSectionSpy = jest.spyOn(RoomListStoreV3.instance, "removeSection").mockResolvedValue(undefined);
const tag = "element.io.section.custom";
const vm = new RoomListSectionHeaderViewModel({
tag,
title: "Section",
spaceId: "!space:server",
onToggleExpanded,
});
vm.setRooms([mkRoom(matrixClient, "!room:server")]);
await vm.removeSection();
expect(removeSectionSpy).toHaveBeenCalledWith(tag, false);
});
});
describe("unread status", () => {
let room: Room;
let notificationState: RoomNotificationState;