@@ -1148,8 +1148,9 @@ describe('handleEnterInlineEntity', () => {
11481148 format : { } ,
11491149 } ;
11501150
1151- DelimiterFile . handleEnterInlineEntity ( model , < any > { } ) ;
1151+ const result = DelimiterFile . handleEnterInlineEntity ( model , < any > { } ) ;
11521152
1153+ expect ( result ) . toBeTrue ( ) ;
11531154 expect ( model ) . toEqual ( {
11541155 blockGroupType : 'Document' ,
11551156 blocks : [
@@ -1195,6 +1196,123 @@ describe('handleEnterInlineEntity', () => {
11951196 } ) ;
11961197 } ) ;
11971198
1199+ it ( 'handle after entity under list item' , ( ) => {
1200+ const model : ContentModelDocument = {
1201+ blockGroupType : 'Document' ,
1202+ blocks : [
1203+ {
1204+ blockType : 'BlockGroup' ,
1205+ blockGroupType : 'ListItem' ,
1206+ format : { } ,
1207+ formatHolder : {
1208+ format : { } ,
1209+ segmentType : 'SelectionMarker' ,
1210+ } ,
1211+ levels : [
1212+ {
1213+ dataset : { } ,
1214+ listType : 'UL' ,
1215+ format : { } ,
1216+ } ,
1217+ ] ,
1218+ blocks : [
1219+ {
1220+ blockType : 'Paragraph' ,
1221+ segments : [
1222+ {
1223+ segmentType : 'Text' ,
1224+ text : '_' ,
1225+ format : { } ,
1226+ } ,
1227+ {
1228+ segmentType : 'Entity' ,
1229+ blockType : 'Entity' ,
1230+ format : { } ,
1231+ entityFormat : {
1232+ entityType : '' ,
1233+ isReadonly : true ,
1234+ } ,
1235+ wrapper : < any > { } ,
1236+ } ,
1237+ {
1238+ segmentType : 'SelectionMarker' ,
1239+ isSelected : true ,
1240+ format : { } ,
1241+ } ,
1242+ {
1243+ segmentType : 'Text' ,
1244+ text : '_' ,
1245+ format : { } ,
1246+ } ,
1247+ ] ,
1248+ format : { } ,
1249+ } ,
1250+ ] ,
1251+ } ,
1252+ ] ,
1253+ format : { } ,
1254+ } ;
1255+
1256+ const result = DelimiterFile . handleEnterInlineEntity ( model , < any > { } ) ;
1257+
1258+ expect ( result ) . toBeFalse ( ) ;
1259+ expect ( model ) . toEqual ( {
1260+ blockGroupType : 'Document' ,
1261+ blocks : [
1262+ {
1263+ blockType : 'BlockGroup' ,
1264+ blockGroupType : 'ListItem' ,
1265+ format : { } ,
1266+ formatHolder : {
1267+ format : { } ,
1268+ segmentType : 'SelectionMarker' ,
1269+ } ,
1270+ levels : [
1271+ {
1272+ dataset : { } ,
1273+ listType : 'UL' ,
1274+ format : { } ,
1275+ } ,
1276+ ] ,
1277+ blocks : [
1278+ {
1279+ blockType : 'Paragraph' ,
1280+ segments : [
1281+ {
1282+ segmentType : 'Text' ,
1283+ text : '_' ,
1284+ format : { } ,
1285+ } ,
1286+ {
1287+ segmentType : 'Entity' ,
1288+ blockType : 'Entity' ,
1289+ format : { } ,
1290+ entityFormat : {
1291+ entityType : '' ,
1292+ isReadonly : true ,
1293+ } ,
1294+ wrapper : < any > { } ,
1295+ } ,
1296+ {
1297+ segmentType : 'SelectionMarker' ,
1298+ isSelected : true ,
1299+ format : { } ,
1300+ } ,
1301+ {
1302+ segmentType : 'Text' ,
1303+ text : '_' ,
1304+ format : { } ,
1305+ } ,
1306+ ] ,
1307+ format : { } ,
1308+ } ,
1309+ ] ,
1310+ } ,
1311+ ] ,
1312+ format : { } ,
1313+ } ) ;
1314+ } ) ;
1315+
11981316 it ( 'handle before entity' , ( ) => {
11991317 const model : ContentModelDocument = {
12001318 blockGroupType : 'Document' ,
@@ -1234,8 +1352,9 @@ describe('handleEnterInlineEntity', () => {
12341352 format : { } ,
12351353 } ;
12361354
1237- DelimiterFile . handleEnterInlineEntity ( model , < any > { } ) ;
1355+ const result = DelimiterFile . handleEnterInlineEntity ( model , < any > { } ) ;
12381356
1357+ expect ( result ) . toBeTrue ( ) ;
12391358 expect ( model ) . toEqual ( {
12401359 blockGroupType : 'Document' ,
12411360 blocks : [
@@ -1315,8 +1434,9 @@ describe('handleEnterInlineEntity', () => {
13151434 format : { } ,
13161435 } ;
13171436
1318- DelimiterFile . handleEnterInlineEntity ( model , < any > { } ) ;
1437+ const result = DelimiterFile . handleEnterInlineEntity ( model , < any > { } ) ;
13191438
1439+ expect ( result ) . toBeTrue ( ) ;
13201440 expect ( model ) . toEqual ( {
13211441 blockGroupType : 'Document' ,
13221442 blocks : [
@@ -1394,8 +1514,9 @@ describe('handleEnterInlineEntity', () => {
13941514 format : { } ,
13951515 } ;
13961516
1397- DelimiterFile . handleEnterInlineEntity ( model , < any > { } ) ;
1517+ const result = DelimiterFile . handleEnterInlineEntity ( model , < any > { } ) ;
13981518
1519+ expect ( result ) . toBeTrue ( ) ;
13991520 expect ( model ) . toEqual ( {
14001521 blockGroupType : 'Document' ,
14011522 blocks : [
0 commit comments