Default the room header to on (#12803)

* Default the room header to on

* Refactor code into helper method

Add a method to open/close the room info panel and use it everywhere.

* Fix broken tests, update snapshots and screenshots

* Update room header tests to make sense with the new header
This commit is contained in:
R Midhun Suresh 2024-07-23 16:26:25 +05:30 committed by GitHub
parent 25fcd6a65f
commit bb1b7f1fd0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
59 changed files with 595 additions and 397 deletions

View file

@ -784,7 +784,7 @@ test.describe("Timeline", () => {
await sendEvent(app.client, room.roomId, true);
await page.goto(`/#/room/${room.roomId}`);
await page.locator(".mx_LegacyRoomHeader").getByRole("button", { name: "Search" }).click();
await app.toggleRoomInfoPanel();
await page.locator(".mx_RoomSummaryCard_search").getByRole("searchbox").fill("Message");
await page.locator(".mx_RoomSummaryCard_search").getByRole("searchbox").press("Enter");
@ -809,7 +809,7 @@ test.describe("Timeline", () => {
await page.goto(`/#/room/${room.roomId}`);
// Open a room setting dialog
await page.getByRole("button", { name: "Room options" }).click();
await app.toggleRoomInfoPanel();
await page.getByRole("menuitem", { name: "Settings" }).click();
// Set a room topic to render a TextualEvent
@ -823,9 +823,6 @@ test.describe("Timeline", () => {
page.getByText(`${OLD_NAME} changed the topic to "This is a room for ${stringToSearch}.".`),
).toHaveClass(/mx_TextualEvent/);
// Display the room search bar
await page.locator(".mx_LegacyRoomHeader").getByRole("button", { name: "Search" }).click();
// Search the string to display both the message and TextualEvent on search results panel
await page.locator(".mx_RoomSummaryCard_search").getByRole("searchbox").fill(stringToSearch);
await page.locator(".mx_RoomSummaryCard_search").getByRole("searchbox").press("Enter");