@@ -5,6 +5,7 @@ import { buildUrlWithMockAdapter, defaultMockCallAdapterState, defaultMockRemote
55import { expect } from '@playwright/test' ;
66import { dataUiId , stableScreenshot , waitForSelector } from '../../common/utils' ;
77import { IDS } from '../../common/constants' ;
8+ import type { CallCompositeOptions } from '../../../../src' ;
89
910test . describe ( 'CallControls tests' , async ( ) => {
1011 test ( 'CallControls when number of mics drops to zero' , async ( { page, serverUrl } ) => {
@@ -31,3 +32,29 @@ test.describe('Call composite custom button injection tests', () => {
3132 expect ( await stableScreenshot ( page ) ) . toMatchSnapshot ( `custom-buttons.png` ) ;
3233 } ) ;
3334} ) ;
35+
36+ test . describe ( 'Call composite custom call control options tests' , ( ) => {
37+ test ( 'Control bar buttons correctly show as compact with camera disabled and end call button hidden' , async ( {
38+ page,
39+ serverUrl
40+ } ) => {
41+ const initialState = defaultMockCallAdapterState ( [ defaultMockRemoteParticipant ( 'Paul Bridges' ) ] ) ;
42+ const testOptions : CallCompositeOptions = {
43+ callControls : {
44+ displayType : 'compact' ,
45+ cameraButton : {
46+ disabled : true
47+ } ,
48+ microphoneButton : true ,
49+ endCallButton : false ,
50+ devicesButton : undefined
51+ }
52+ } ;
53+ await page . goto (
54+ buildUrlWithMockAdapter ( serverUrl , initialState , {
55+ customCallCompositeOptions : JSON . stringify ( testOptions )
56+ } )
57+ ) ;
58+ expect ( await stableScreenshot ( page ) ) . toMatchSnapshot ( `user-set-control-bar-button-options.png` ) ;
59+ } ) ;
60+ } ) ;
0 commit comments