@@ -1236,6 +1236,73 @@ describe("Rooms view settings", function () {
12361236 ) ;
12371237 } ) ;
12381238
1239+ it ( "change settings with GL3 access code" , function ( ) {
1240+ cy . fixture ( "roomSettings.json" ) . then ( ( roomSettings ) => {
1241+ roomSettings . data . access_code = "fck4fd" ;
1242+ cy . intercept ( "GET" , "api/v1/rooms/abc-def-123/settings" , {
1243+ statusCode : 200 ,
1244+ body : roomSettings ,
1245+ } ) . as ( "roomSettingsRequest" ) ;
1246+ } ) ;
1247+
1248+ cy . visit ( "/rooms/abc-def-123#tab=settings" ) ;
1249+ cy . wait ( "@roomSettingsRequest" ) ;
1250+
1251+ cy . get ( "#room-setting-access_code" )
1252+ . should ( "have.value" , "fck4fd" )
1253+ . and ( "not.be.disabled" ) ;
1254+
1255+ // Change settings
1256+ cy . get ( "#room-setting-name" ) . clear ( ) ;
1257+ cy . get ( "#room-setting-name" ) . type ( "Meeting Two" ) ;
1258+
1259+ // Save settings
1260+ cy . fixture ( "roomTypesWithSettings.json" ) . then ( ( ) => {
1261+ cy . fixture ( "roomSettings.json" ) . then ( ( roomSettings ) => {
1262+ roomSettings . data . name = "Meeting Two" ;
1263+ roomSettings . data . access_code = "fck4fd" ;
1264+
1265+ cy . intercept ( "PUT" , "api/v1/rooms/abc-def-123" , {
1266+ statusCode : 200 ,
1267+ body : roomSettings ,
1268+ } ) . as ( "roomSettingsSaveRequest" ) ;
1269+
1270+ cy . get ( '[data-test="room-settings-save-button"]' ) . click ( ) ;
1271+ } ) ;
1272+ } ) ;
1273+
1274+ cy . wait ( "@roomSettingsSaveRequest" ) . then ( ( interception ) => {
1275+ expect ( interception . request . body ) . to . eql ( {
1276+ name : "Meeting Two" ,
1277+ expert_mode : true ,
1278+ welcome : "Welcome message" ,
1279+ short_description : "Short description" ,
1280+ access_code : "fck4fd" ,
1281+ room_type : 2 ,
1282+ mute_on_start : true ,
1283+ lock_settings_disable_cam : false ,
1284+ webcams_only_for_moderator : true ,
1285+ lock_settings_disable_mic : false ,
1286+ lock_settings_disable_private_chat : false ,
1287+ lock_settings_disable_public_chat : true ,
1288+ lock_settings_disable_note : true ,
1289+ lock_settings_hide_user_list : true ,
1290+ everyone_can_start : false ,
1291+ allow_membership : false ,
1292+ allow_guests : true ,
1293+ default_role : 1 ,
1294+ lobby : 2 ,
1295+ visibility : 1 ,
1296+ record_attendance : false ,
1297+ record : false ,
1298+ auto_start_recording : false ,
1299+ } ) ;
1300+ } ) ;
1301+
1302+ // Check that settings are shown correctly
1303+ cy . get ( "#room-setting-name" ) . should ( "have.value" , "Meeting Two" ) ;
1304+ } ) ;
1305+
12391306 it ( "change settings errors" , function ( ) {
12401307 cy . fixture ( "roomTypesWithSettings.json" ) . then ( ( roomTypes ) => {
12411308 cy . fixture ( "roomSettings.json" ) . then ( ( roomSettings ) => {
0 commit comments