@@ -23,6 +23,7 @@ import type { EventType } from "matrix-js-sdk/src/@types/event";
23
23
import type { MatrixClient } from "matrix-js-sdk/src/client" ;
24
24
import { SynapseInstance } from "../../plugins/synapsedocker" ;
25
25
import { SettingLevel } from "../../../src/settings/SettingLevel" ;
26
+ import { Layout } from "../../../src/settings/enums/Layout" ;
26
27
import Chainable = Cypress . Chainable ;
27
28
28
29
// The avatar size used in the timeline
@@ -141,5 +142,22 @@ describe("Timeline", () => {
141
142
expectAvatar ( e , newAvatarUrl ) ;
142
143
} ) ;
143
144
} ) ;
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
+ } ) ;
144
162
} ) ;
145
163
} ) ;
0 commit comments