File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ .conversejs {
2
+ .chatbox {
3
+ .chat-head {
4
+ .button-color {
5
+ color : var (--chat-head-text-color ) !important ;
6
+ }
7
+ }
8
+ }
9
+ }
Original file line number Diff line number Diff line change
1
+ /* global mock */
2
+
3
+ describe ( "A Call Button" , function ( ) {
4
+
5
+ it ( "has been shown in the toolbar" ,
6
+ mock . initConverse ( [ 'chatBoxesFetched' ] , { } , async function ( _converse ) {
7
+
8
+ await mock . waitForRoster ( _converse , 'current' ) ;
9
+ await mock . openControlBox ( _converse ) ;
10
+ const contact_jid = mock . cur_names [ 2 ] . replace ( / / g, '.' ) . toLowerCase ( ) + '@montague.lit' ;
11
+ spyOn ( _converse . api , "trigger" ) . and . callThrough ( ) ;
12
+ // First check that the button does show
13
+ await mock . openChatBoxFor ( _converse , contact_jid ) ;
14
+ const view = _converse . chatboxviews . get ( contact_jid ) ;
15
+ const toolbar = view . querySelector ( '.chat-toolbar' ) ;
16
+ const call_button = toolbar . querySelector ( 'converse-jingle-toolbar-button' ) ;
17
+ // Now check that the state changes
18
+ // toggleJingleCallStatus
19
+ const chatbox = view . model ;
20
+ call_button . click ( ) ;
21
+ expect ( chatbox . get ( 'jingle_status' ) === _converse . JINGLE_CALL_STATUS . PENDING ) ;
22
+ call_button . click ( ) ;
23
+ } ) ) ;
24
+ } ) ;
You can’t perform that action at this time.
0 commit comments