@@ -1335,6 +1335,24 @@ describe("Keyboard handling", () => {
13351335 cy . get ( "[ui5-multi-input]" )
13361336 . should ( "have.attr" , "value-state" , "None" ) ;
13371337 } ) ;
1338+
1339+ it ( "should trigger change event on enter with no suggestions" , ( ) => {
1340+ const changeSpy = cy . stub ( ) . as ( "changeSpy" ) ;
1341+ cy . mount (
1342+ < MultiInput onChange = { changeSpy } > </ MultiInput >
1343+ ) ;
1344+
1345+ cy . get ( "[ui5-multi-input]" )
1346+ . shadow ( )
1347+ . find ( "input" )
1348+ . realClick ( ) ;
1349+
1350+ cy . realType ( "asd" ) ;
1351+ cy . realPress ( "Enter" ) ;
1352+
1353+ cy . get ( "@changeSpy" )
1354+ . should ( "have.been.calledOnce" ) ;
1355+ } ) ;
13381356} ) ;
13391357
13401358describe ( "MultiInput Composition" , ( ) => {
@@ -1371,7 +1389,7 @@ describe("MultiInput Composition", () => {
13711389 cy . get ( "@multiinput" ) . should ( "have.prop" , "_isComposing" , true ) ;
13721390
13731391 cy . get ( "@nativeInput" ) . trigger ( "compositionend" , { data : "사랑" } ) ;
1374-
1392+
13751393 cy . get ( "@nativeInput" )
13761394 . invoke ( "val" , "사랑" )
13771395 . trigger ( "input" , { inputType : "insertCompositionText" } ) ;
@@ -1425,7 +1443,7 @@ describe("MultiInput Composition", () => {
14251443 cy . get ( "@multiinput" ) . should ( "have.prop" , "_isComposing" , true ) ;
14261444
14271445 cy . get ( "@nativeInput" ) . trigger ( "compositionend" , { data : "ありがとう" } ) ;
1428-
1446+
14291447 cy . get ( "@nativeInput" )
14301448 . invoke ( "val" , "ありがとう" )
14311449 . trigger ( "input" , { inputType : "insertCompositionText" } ) ;
@@ -1479,7 +1497,7 @@ describe("MultiInput Composition", () => {
14791497 cy . get ( "@multiinput" ) . should ( "have.prop" , "_isComposing" , true ) ;
14801498
14811499 cy . get ( "@nativeInput" ) . trigger ( "compositionend" , { data : "谢谢" } ) ;
1482-
1500+
14831501 cy . get ( "@nativeInput" )
14841502 . invoke ( "val" , "谢谢" )
14851503 . trigger ( "input" , { inputType : "insertCompositionText" } ) ;
0 commit comments