@@ -1364,11 +1364,10 @@ describe('MessageInputComponent', () => {
13641364 const channel = mockActiveChannel$ . getValue ( ) ;
13651365 fixture . detectChanges ( ) ;
13661366 component . loadDraft ( {
1367- channel : { cid : `not${ channel . cid } ` } as any as ChannelResponse ,
13681367 message : {
13691368 text : 'Hello, world!' ,
13701369 } as any as DraftMessage ,
1371- channel_cid : 'messaging:123' ,
1370+ channel_cid : `not ${ channel . cid } ` ,
13721371 created_at : new Date ( ) . toISOString ( ) ,
13731372 } ) ;
13741373 fixture . detectChanges ( ) ;
@@ -1382,12 +1381,11 @@ describe('MessageInputComponent', () => {
13821381 mockActiveParentMessageId$ . next ( parentMessageId ) ;
13831382 fixture . detectChanges ( ) ;
13841383 component . loadDraft ( {
1385- channel : { cid : `not${ channel . cid } ` } as any as ChannelResponse ,
13861384 message : {
13871385 text : 'Hello, world!' ,
13881386 parent_id : 'not' + parentMessageId ,
13891387 } as any as DraftMessage ,
1390- channel_cid : 'messaging:123' ,
1388+ channel_cid : `not ${ channel . cid } ` ,
13911389 created_at : new Date ( ) . toISOString ( ) ,
13921390 } ) ;
13931391 fixture . detectChanges ( ) ;
@@ -1403,11 +1401,10 @@ describe('MessageInputComponent', () => {
14031401 component . ngOnChanges ( { message : { } as any as SimpleChange } ) ;
14041402 fixture . detectChanges ( ) ;
14051403 component . loadDraft ( {
1406- channel : { cid : channel . cid } as any as ChannelResponse ,
14071404 message : {
14081405 text : 'Hello, world!' ,
14091406 } as any as DraftMessage ,
1410- channel_cid : 'messaging:123' ,
1407+ channel_cid : channel . cid ,
14111408 created_at : new Date ( ) . toISOString ( ) ,
14121409 } ) ;
14131410 fixture . detectChanges ( ) ;
@@ -1422,11 +1419,10 @@ describe('MessageInputComponent', () => {
14221419 selectMessageToQuoteSpy . calls . reset ( ) ;
14231420
14241421 component . loadDraft ( {
1425- channel : { cid : channel . cid } as any as ChannelResponse ,
14261422 message : {
14271423 text : 'Hello, world!' ,
14281424 } as any as DraftMessage ,
1429- channel_cid : 'messaging:123' ,
1425+ channel_cid : channel . cid ,
14301426 created_at : new Date ( ) . toISOString ( ) ,
14311427 quoted_message : mockQuotedMessage as any as MessageResponse ,
14321428 } ) ;
@@ -1442,11 +1438,10 @@ describe('MessageInputComponent', () => {
14421438 const channel = mockActiveChannel$ . getValue ( ) ;
14431439
14441440 component . loadDraft ( {
1445- channel : { cid : channel . cid } as any as ChannelResponse ,
14461441 message : {
14471442 text : 'Hello, world!' ,
14481443 } as any as DraftMessage ,
1449- channel_cid : 'messaging:123' ,
1444+ channel_cid : channel . cid ,
14501445 created_at : new Date ( ) . toISOString ( ) ,
14511446 quoted_message : undefined ,
14521447 } ) ;
@@ -1458,14 +1453,13 @@ describe('MessageInputComponent', () => {
14581453 it ( `should set all fields from draft` , ( ) => {
14591454 const channel = mockActiveChannel$ . getValue ( ) ;
14601455 const draft = {
1461- channel : { cid : channel . cid } as any as ChannelResponse ,
14621456 message : {
14631457 text : 'Hello, world!' ,
14641458 mentioned_users : [ 'user1' , 'user2' ] ,
14651459 poll_id : 'poll1' ,
14661460 attachments : [ { type : 'file' , url : 'url' } ] ,
14671461 } as any as DraftMessage ,
1468- channel_cid : 'messaging:123' ,
1462+ channel_cid : channel . cid ,
14691463 created_at : new Date ( ) . toISOString ( ) ,
14701464 } ;
14711465 attachmentService . createFromAttachments . calls . reset ( ) ;
@@ -1497,14 +1491,13 @@ describe('MessageInputComponent', () => {
14971491 ] ) ;
14981492 } ) ;
14991493 const draft = {
1500- channel : { cid : channel . cid } as any as ChannelResponse ,
15011494 message : {
15021495 text : 'Hello, world!' ,
15031496 mentioned_users : [ 'user1' , 'user2' ] ,
15041497 poll_id : 'poll1' ,
15051498 attachments : [ { type : 'file' , url : 'url' } ] ,
15061499 } as any as DraftMessage ,
1507- channel_cid : 'messaging:123' ,
1500+ channel_cid : channel . cid ,
15081501 created_at : new Date ( ) . toISOString ( ) ,
15091502 } ;
15101503 const spy = jasmine . createSpy ( ) ;
0 commit comments