Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit f6e9190

Browse files
authored
Fix E2E icon display in room header (#12545)
* Fix E2E icon display * Add e2e test
1 parent 1bb70c5 commit f6e9190

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

playwright/e2e/room/room-header.spec.ts

+22
Original file line numberDiff line numberDiff line change
@@ -276,4 +276,26 @@ test.describe("Room Header", () => {
276276
await expect(header).toMatchScreenshot("room-header-with-apps-button-not-highlighted.png");
277277
});
278278
});
279+
280+
test.describe("with encryption", () => {
281+
test("should render the E2E icon and the buttons", async ({ page, app, user }) => {
282+
// Create an encrypted room
283+
await app.client.createRoom({
284+
name: "Test Encrypted Room",
285+
initial_state: [
286+
{
287+
type: "m.room.encryption",
288+
state_key: "",
289+
content: {
290+
algorithm: "m.megolm.v1.aes-sha2",
291+
},
292+
},
293+
],
294+
});
295+
await app.viewRoomByName("Test Encrypted Room");
296+
297+
const header = page.locator(".mx_LegacyRoomHeader");
298+
await expect(header).toMatchScreenshot("encrypted-room-header.png");
299+
});
300+
});
279301
});
Loading

res/css/views/rooms/_LegacyRoomHeader.pcss

+5
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ limitations under the License.
6565
.mx_BetaCard_betaPill {
6666
margin-right: $spacing-8;
6767
}
68+
69+
/* The container of E2EIcon in the legacy header needs to have its height set */
70+
& > span {
71+
height: 100%;
72+
}
6873
}
6974

7075
.mx_LegacyRoomHeader_name {

0 commit comments

Comments
 (0)