@@ -30,12 +30,12 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
3030
3131 olderAlertEvent = createAlertEvent ( {
3232 group_hash : 'test-group-hash' ,
33- episode_id : 'episode-1' ,
33+ episode : { id : 'episode-1' , status : 'active' } ,
3434 '@timestamp' : '2024-01-01T00:00:00.000Z' ,
3535 } ) ;
3636 alertEvent = createAlertEvent ( {
3737 group_hash : 'test-group-hash' ,
38- episode_id : 'episode-2' ,
38+ episode : { id : 'episode-2' , status : 'active' } ,
3939 '@timestamp' : '2024-01-02T00:00:00.000Z' ,
4040 } ) ;
4141
@@ -104,7 +104,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
104104 expect ( action ) . to . be . ok ( ) ;
105105 expect ( action ! . group_hash ) . to . be ( 'test-group-hash' ) ;
106106 expect ( action ! . action_type ) . to . be ( 'ack' ) ;
107- expect ( action ! . episode_id ) . to . be ( alertEvent . episode_id ) ;
107+ expect ( action ! . episode_id ) . to . be ( alertEvent . episode ?. id ) ;
108108 expect ( action ! . rule_id ) . to . be ( alertEvent . rule . id ) ;
109109 expect ( action ! . last_series_event_timestamp ) . to . be ( alertEvent [ '@timestamp' ] ) ;
110110 } ) ;
@@ -122,7 +122,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
122122 expect ( action ) . to . be . ok ( ) ;
123123 expect ( action ! . group_hash ) . to . be ( 'test-group-hash' ) ;
124124 expect ( action ! . action_type ) . to . be ( 'unack' ) ;
125- expect ( action ! . episode_id ) . to . be ( alertEvent . episode_id ) ;
125+ expect ( action ! . episode_id ) . to . be ( alertEvent . episode ?. id ) ;
126126 } ) ;
127127
128128 it ( 'should return 204 for tag action with tags and write action document' , async ( ) => {
@@ -272,7 +272,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
272272 expect ( action ) . to . be . ok ( ) ;
273273 expect ( action ! . group_hash ) . to . be ( 'test-group-hash' ) ;
274274 expect ( action ! . action_type ) . to . be ( 'ack' ) ;
275- expect ( action ! . episode_id ) . to . be ( olderAlertEvent . episode_id ) ;
275+ expect ( action ! . episode_id ) . to . be ( olderAlertEvent . episode ?. id ) ;
276276 expect ( action ! . last_series_event_timestamp ) . to . be ( olderAlertEvent [ '@timestamp' ] ) ;
277277 } ) ;
278278 } ) ;
0 commit comments