@@ -23,6 +23,7 @@ import type { EventType } from "matrix-js-sdk/src/@types/event";
2323import type { MatrixClient } from "matrix-js-sdk/src/client" ;
2424import { SynapseInstance } from "../../plugins/synapsedocker" ;
2525import { SettingLevel } from "../../../src/settings/SettingLevel" ;
26+ import { Layout } from "../../../src/settings/enums/Layout" ;
2627import Chainable = Cypress . Chainable ;
2728
2829// The avatar size used in the timeline
@@ -141,5 +142,22 @@ describe("Timeline", () => {
141142 expectAvatar ( e , newAvatarUrl ) ;
142143 } ) ;
143144 } ) ;
145+
146+ it ( "should click 'collapse' link button on the first hovered info event line on bubble layout" , ( ) => {
147+ cy . visit ( "/#/room/" + roomId ) ;
148+ cy . setSettingValue ( "layout" , null , SettingLevel . DEVICE , Layout . Bubble ) ;
149+ cy . contains ( ".mx_RoomView_body .mx_GenericEventListSummary[data-layout=bubble] " +
150+ ".mx_GenericEventListSummary_summary" , "created and configured the room." ) ;
151+
152+ // Click "expand" link button
153+ cy . get ( ".mx_GenericEventListSummary_toggle[aria-expanded=false]" ) . click ( ) ;
154+
155+ // Click "collapse" link button on the first hovered info event line
156+ cy . get ( ".mx_GenericEventListSummary_unstyledList .mx_EventTile_info:first-of-type" ) . realHover ( )
157+ . get ( ".mx_GenericEventListSummary_toggle[aria-expanded=true]" ) . click ( { force : false } ) ;
158+
159+ // Make sure "collapse" link button worked
160+ cy . get ( ".mx_GenericEventListSummary_toggle[aria-expanded=false]" ) ;
161+ } ) ;
144162 } ) ;
145163} ) ;
0 commit comments