diff --git a/cypress/e2e/create-room.spec.ts b/cypress/e2e/create-room.spec.ts index ea02e9e962..1a4077e884 100644 --- a/cypress/e2e/create-room.spec.ts +++ b/cypress/e2e/create-room.spec.ts @@ -54,7 +54,7 @@ describe("Create Room", () => { // http://localhost:8080/#/room/!kshfkshfkKSHJ:dev01.tchap.incubateur.net const roomUrlRegex = new RegExp("/#/room/![A-z0-9]+:" + homeserverShortname); cy.url().should("match", roomUrlRegex); - cy.get(".mx_LegacyRoomHeader_nametext").contains(name); + cy.get(".mx_RoomHeader_heading").contains(name); cy.get(".tc_RoomHeader_external").should("not.exist"); }); @@ -76,7 +76,7 @@ describe("Create Room", () => { // http://localhost:8080/#/room/!kshfkshfkKSHJ:dev01.tchap.incubateur.net const roomUrlRegex = new RegExp("/#/room/![A-z0-9]+:" + homeserverShortname); cy.url().should("match", roomUrlRegex); - cy.get(".mx_LegacyRoomHeader_nametext").contains(name); + cy.get(".mx_RoomHeader_heading").contains(name); cy.get(".tc_RoomHeader_external").should("exist"); }); @@ -97,7 +97,7 @@ describe("Create Room", () => { // http://localhost:8080/#/room/!kshfkshfkKSHJ:dev01.tchap.incubateur.net const roomUrlRegex = new RegExp("/#/room/![A-z0-9]+:" + homeserverShortname); cy.url().should("match", roomUrlRegex); - cy.get(".mx_LegacyRoomHeader_nametext").contains(name); + cy.get(".mx_RoomHeader_heading").contains(name); }); // Note : DM creation is not tested here, because Tchap has no custom implementation for DMs. (2023-01-30) diff --git a/cypress/e2e/tchap-external-room-style.spec.ts b/cypress/e2e/tchap-external-room-style.spec.ts index 4ad48e917e..af1b0f4b1b 100644 --- a/cypress/e2e/tchap-external-room-style.spec.ts +++ b/cypress/e2e/tchap-external-room-style.spec.ts @@ -20,7 +20,7 @@ describe("Style of external rooms", () => { //open room cy.get('[aria-label="' + roomName + '"]').click(); - cy.get(".mx_LegacyRoomHeader").within(() => { + cy.get(".mx_RoomHeader").within(() => { cy.get(".tc_RoomHeader_external"); // "ouvert aux externes" cy.get(".mx_DecoratedRoomAvatar_icon_external"); // lock icon on room avatar }); diff --git a/cypress/utils/room-utils.ts b/cypress/utils/room-utils.ts index e8c5a90bcf..35978139a0 100644 --- a/cypress/utils/room-utils.ts +++ b/cypress/utils/room-utils.ts @@ -8,14 +8,13 @@ export default class RoomUtils { return cy.get('.mx_RoomList .mx_RoomSublist [aria-label="' + roomName + '"]').click(); } public static openRoomAccessSettings(roomName: string): Chainable> { - cy.get('[aria-label="' + roomName + '"]').click(); //open room - cy.get(".mx_LegacyRoomHeader_chevron").click(); - cy.get('[aria-label="Paramètres"] > .mx_IconizedContextMenu_label').click(); + this.openRoomInformation(roomName); + cy.get(".mx_RoomSummaryCard_Button.mx_RoomSummaryCard_icon_settings").click(); return cy.get('[data-testid="settings-tab-ROOM_SECURITY_TAB"] > .mx_TabbedView_tabLabel_text').click(); } public static openRoomInformation(roomName: string): Chainable> { cy.get('[aria-label="' + roomName + '"]').click(); //open room - return cy.get('[aria-label="Information du salon"]').click(); + return cy.get('.mx_RoomHeader_info [title="' + roomName + '"]').click(); } public static openPeopleMenu(roomName: string): Chainable> { this.openRoomInformation(roomName); diff --git a/patches/customize-room-header-bar/matrix-react-sdk+3.81.0.patch b/patches/customize-room-header-bar/matrix-react-sdk+3.81.0.patch index ed44e37e81..00e9c640a5 100644 --- a/patches/customize-room-header-bar/matrix-react-sdk+3.81.0.patch +++ b/patches/customize-room-header-bar/matrix-react-sdk+3.81.0.patch @@ -21,30 +21,33 @@ index 2614e17..79fe37e 100644 + display: -webkit-box; +} diff --git a/node_modules/matrix-react-sdk/src/components/views/rooms/RoomHeader.tsx b/node_modules/matrix-react-sdk/src/components/views/rooms/RoomHeader.tsx -index bb8dd49..df46713 100644 +index bb8dd49..13ba615 100644 --- a/node_modules/matrix-react-sdk/src/components/views/rooms/RoomHeader.tsx +++ b/node_modules/matrix-react-sdk/src/components/views/rooms/RoomHeader.tsx -@@ -48,6 +48,9 @@ import RoomAvatar from "../avatars/RoomAvatar"; +@@ -48,6 +48,10 @@ import RoomAvatar from "../avatars/RoomAvatar"; import { formatCount } from "../../../utils/FormattingUtils"; import RightPanelStore from "../../../stores/right-panel/RightPanelStore"; +import TchapUIFeature from "../../../../../../src/tchap/util/TchapUIFeature"; +import TchapExternalRoomHeader from "../../../../../../src/tchap/components/views/rooms/TchapExternalRoomHeader"; ++import DecoratedRoomAvatar from "../avatars/DecoratedRoomAvatar"; // :TCHAP: + /** * A helper to transform a notification color to the what the Compound Icon Button * expects -@@ -111,6 +114,9 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element { +@@ -110,7 +114,10 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element { + RightPanelStore.instance.showOrHidePanel(RightPanelPhases.RoomSummary); }} > - +- ++ + {/* :tchap: Add external caption when room is open to external */} + + {/* :tchap: end */} {roomName} @@ -54,7 +57,7 @@ index bb8dd49..df46713 100644 )} @@ -64,7 +67,7 @@ index bb8dd49..df46713 100644 )} @@ -74,7 +77,7 @@ index bb8dd49..df46713 100644 @@ -86,7 +89,7 @@ index bb8dd49..df46713 100644 )} @@ -97,7 +100,7 @@ index bb8dd49..df46713 100644