Room list: improve custom sections in Spaces (#33523)

* feat: display empty custom sections in the space where they were created

* test: update tests

* fix: room can't be drag in to a section if a section is created before

* fix: re-render issue when section is created
This commit is contained in:
Florian Duros
2026-05-27 09:43:59 +00:00
committed by GitHub
parent 1f305f1e10
commit abe383d996
7 changed files with 174 additions and 19 deletions
@@ -9,7 +9,7 @@ import { type Page } from "@playwright/test";
import { rejectToast } from "@element-hq/element-web-playwright-common";
import { expect, test } from "../../../element-web-test";
import { assertRoomInSection, getRoomList, getRoomListHeader, getSectionHeader } from "./utils";
import { assertRoomInSection, dragRoomToSection, getRoomList, getRoomListHeader, getSectionHeader } from "./utils";
test.describe("Room list custom sections", () => {
test.use({
@@ -330,6 +330,22 @@ test.describe("Room list custom sections", () => {
},
);
test("should accept drag and drop into a section created after another section exists", async ({
page,
app,
}) => {
await app.client.createRoom({ name: "room A" });
await app.client.createRoom({ name: "room B" });
await createCustomSection(page, "Work");
await createCustomSection(page, "Personal");
await dragRoomToSection(page, "room A", "Personal");
await assertRoomInSection(page, "Personal", "room A");
await dragRoomToSection(page, "room B", "Work");
await assertRoomInSection(page, "Work", "room B");
});
test("should remove a room from a custom section when toggling the same section", async ({ page, app }) => {
await app.client.createRoom({ name: "my room" });
await createCustomSection(page, "Work");