@@ -337,6 +337,40 @@ describe('Settings: Change personal information', { testIsolation: true }, () =>
337337 cy . get ( 'a[href="tel:+498972101099701"]' ) . should ( 'be.visible' )
338338 } )
339339
340+ it ( 'Can set phone number with phone region' , ( ) => {
341+ cy . contains ( 'label' , 'Phone number' ) . scrollIntoView ( )
342+ inputForLabel ( 'Phone number' ) . type ( '{selectAll}0 40 428990' )
343+ inputForLabel ( 'Phone number' ) . should ( 'have.attr' , 'class' ) . and ( 'contain' , '--error' )
344+
345+ cy . runOccCommand ( 'config:system:set default_phone_region --value DE' )
346+ cy . reload ( )
347+
348+ cy . contains ( 'label' , 'Phone number' ) . scrollIntoView ( )
349+ inputForLabel ( 'Phone number' ) . type ( '{selectAll}0 40 428990' )
350+ handlePasswordConfirmation ( user . password )
351+
352+ cy . wait ( '@submitSetting' )
353+ cy . reload ( )
354+ inputForLabel ( 'Phone number' ) . should ( 'have.value' , '+4940428990' )
355+ } )
356+
357+ it ( 'Can reset phone number' , ( ) => {
358+ cy . contains ( 'label' , 'Phone number' ) . scrollIntoView ( )
359+ inputForLabel ( 'Phone number' ) . type ( '{selectAll}+49 40 428990' )
360+ handlePasswordConfirmation ( user . password )
361+
362+ cy . wait ( '@submitSetting' )
363+ cy . reload ( )
364+ inputForLabel ( 'Phone number' ) . should ( 'have.value' , '+4940428990' )
365+
366+ inputForLabel ( 'Phone number' ) . clear ( )
367+ handlePasswordConfirmation ( user . password )
368+
369+ cy . wait ( '@submitSetting' )
370+ cy . reload ( )
371+ inputForLabel ( 'Phone number' ) . should ( 'have.value' , '' )
372+ } )
373+
340374 it ( 'Can set Website and change its visibility' , ( ) => {
341375 cy . contains ( 'label' , 'Website' ) . scrollIntoView ( )
342376 // Check invalid input
0 commit comments