@@ -427,7 +427,7 @@ QUnit.module('Chat', () => {
427427 assert . strictEqual ( this . $textArea . hasClass ( FOCUSED_STATE_CLASS ) , true , 'input is focused' ) ;
428428 } ) ;
429429
430- QUnit . skip ( 'Input focused after context menu is hidden' , function ( assert ) {
430+ QUnit . testInActiveWindow ( 'Input not focused after context menu is hidden by outside click ' , function ( assert ) {
431431 if ( ! isDesktopDevice ( ) ) {
432432 assert . ok ( true , 'Test is not applicable for mobile devices' ) ;
433433 return ;
@@ -454,7 +454,7 @@ QUnit.module('Chat', () => {
454454 pointerMock ( $bubbles . eq ( 0 ) ) . click ( ) ;
455455
456456 assert . strictEqual ( this . getContextMenu ( ) . option ( 'visible' ) , false , 'context menu is hidden' ) ;
457- assert . strictEqual ( this . $textArea . hasClass ( FOCUSED_STATE_CLASS ) , true , 'input is focused' ) ;
457+ assert . strictEqual ( this . $textArea . hasClass ( FOCUSED_STATE_CLASS ) , false , 'input is focused' ) ;
458458 } ) ;
459459
460460 QUnit . testInActiveWindow ( 'Input should be blurred after context menu is shown' , function ( assert ) {
@@ -935,7 +935,7 @@ QUnit.module('Chat', () => {
935935 } ) ;
936936 } ) ;
937937
938- QUnit . skip ( 'editing preview should be shown after the Edit button is clicked if cancel promise rejected' , function ( assert ) {
938+ QUnit . testInActiveWindow ( 'editing preview should be shown after the Edit button is clicked if cancel promise rejected' , function ( assert ) {
939939 if ( ! isDesktopDevice ( ) ) {
940940 assert . ok ( true , 'Test is not applicable for mobile devices' ) ;
941941 return ;
@@ -1082,7 +1082,7 @@ QUnit.module('Chat', () => {
10821082 } , ANIMATION_TIMEOUT ) ;
10831083 } ) ;
10841084
1085- QUnit . skip ( 'message box should have editing message text and focus after the Edit button is clicked and not cancelled' , function ( assert ) {
1085+ QUnit . testInActiveWindow ( 'message box should have editing message text and focus after the Edit button is clicked and not cancelled' , function ( assert ) {
10861086 if ( ! isDesktopDevice ( ) ) {
10871087 assert . ok ( true , 'Test is not applicable for mobile devices' ) ;
10881088 return ;
@@ -1111,6 +1111,37 @@ QUnit.module('Chat', () => {
11111111 assert . strictEqual ( this . textArea . option ( 'value' ) , 'b' , 'input contains editing message text' ) ;
11121112 assert . strictEqual ( this . $textArea . hasClass ( FOCUSED_STATE_CLASS ) , true , 'input is focused' ) ;
11131113 } ) ;
1114+
1115+ QUnit . testInActiveWindow ( 'message box should have editing message text and focus after the Edit was triggered from keyboard' , function ( assert ) {
1116+ if ( ! isDesktopDevice ( ) ) {
1117+ assert . ok ( true , 'Test is not applicable for mobile devices' ) ;
1118+ return ;
1119+ }
1120+
1121+ const items = [
1122+ { text : 'a' , author : userFirst } ,
1123+ { text : 'b' , author : userSecond } ,
1124+ ] ;
1125+
1126+ this . reinit ( {
1127+ focusStateEnabled : true ,
1128+ user : userSecond ,
1129+ editing : {
1130+ allowUpdating : true
1131+ } ,
1132+ items,
1133+ } ) ;
1134+
1135+ const $bubbles = this . getBubbles ( ) ;
1136+ $bubbles . eq ( 1 ) . trigger ( 'dxcontextmenu' ) ;
1137+
1138+ keyboardMock ( this . getContextMenu ( ) . itemsContainer ( ) )
1139+ . press ( 'down' )
1140+ . press ( 'enter' ) ;
1141+
1142+ assert . strictEqual ( this . textArea . option ( 'value' ) , 'b' , 'input contains editing message text' ) ;
1143+ assert . strictEqual ( this . $textArea . hasClass ( FOCUSED_STATE_CLASS ) , true , 'input is focused' ) ;
1144+ } ) ;
11141145 } ) ;
11151146
11161147 QUnit . module ( 'Events' , ( ) => {
0 commit comments