@@ -151,6 +151,28 @@ describe("Timeline", () => {
151151 cy . percySnapshot ( "Configured room on IRC layout" ) ;
152152 } ) ;
153153
154+ it ( "should click top left of view source event toggle" , ( ) => {
155+ sendEvent ( roomId ) ;
156+ cy . visit ( "/#/room/" + roomId ) ;
157+ cy . setSettingValue ( "showHiddenEventsInTimeline" , null , SettingLevel . DEVICE , true ) ;
158+ cy . contains ( ".mx_RoomView_body .mx_GenericEventListSummary " +
159+ ".mx_GenericEventListSummary_summary" , "created and configured the room." ) ;
160+
161+ // Edit message
162+ cy . get ( ".mx_RoomView_body .mx_EventTile" ) . contains ( ".mx_EventTile_line" , "Message" ) . within ( ( ) => {
163+ cy . get ( '[aria-label="Edit"]' ) . click ( { force : true } ) ; // Cypress has no ability to hover
164+ cy . get ( ".mx_BasicMessageComposer_input" ) . type ( "Edit{enter}" ) ;
165+ } ) ;
166+ cy . get ( ".mx_RoomView_body .mx_EventTile" ) . contains ( ".mx_EventTile[data-scroll-tokens]" , "MessageEdit" ) ;
167+
168+ // Click top left of the event toggle, which should not be covered by MessageActionBar's safe area
169+ cy . get ( ".mx_EventTile .mx_ViewSourceEvent" ) . realHover ( )
170+ . get ( ".mx_EventTile .mx_ViewSourceEvent .mx_ViewSourceEvent_toggle" ) . click ( 'topLeft' , { force : false } ) ;
171+
172+ // Make sure the expand toggle worked
173+ cy . get ( ".mx_EventTile .mx_ViewSourceEvent_expanded .mx_ViewSourceEvent_toggle" ) . should ( "be.visible" ) ;
174+ } ) ;
175+
154176 it ( "should click 'collapse' link button on the first hovered info event line on bubble layout" , ( ) => {
155177 cy . visit ( "/#/room/" + roomId ) ;
156178 cy . setSettingValue ( "layout" , null , SettingLevel . DEVICE , Layout . Bubble ) ;
0 commit comments