@@ -4,6 +4,7 @@ import { SagaHistory } from "@/resources/SagaHistory";
44import makeRouter from "@/router" ;
55import { createTestingPinia } from "@pinia/testing" ;
66import { MessageStore } from "@/stores/MessageStore" ;
7+ import { MessageStatus } from "@/resources/Message" ;
78
89//Defines a domain-specific language (DSL) for interacting with the system under test (sut)
910interface componentDSL {
@@ -38,7 +39,7 @@ describe("Feature: Message not involved in Saga", () => {
3839 const componentDriver = rendercomponent ( {
3940 initialState : {
4041 MessageStore : messageStore ,
41- sagaHistory : undefined , // Lets pass undefined to simulate no saga data available
42+ SagaDiagramStore : undefined , // Lets pass undefined to simulate no saga data available
4243 } ,
4344 } ) ;
4445
@@ -63,7 +64,7 @@ describe("Feature: Detecting no Audited Saga Data Available", () => {
6364 const componentDriver = rendercomponent ( {
6465 initialState : {
6566 MessageStore : messageStore ,
66- sagaHistory : undefined , // Lets pass undefined to simulate no saga data available
67+ SagaDiagramStore : undefined , // Lets pass undefined to simulate no saga data available
6768 } ,
6869 } ) ;
6970
@@ -97,7 +98,7 @@ describe("Feature: Navigation and Contextual Information", () => {
9798 const componentDriver = rendercomponent ( {
9899 initialState : {
99100 MessageStore : messageStore ,
100- sagaHistory : { sagaHistory : sampleSagaHistory } ,
101+ SagaDiagramStore : { sagaHistory : sampleSagaHistory } ,
101102 } ,
102103 } ) ;
103104
@@ -120,7 +121,7 @@ describe("Feature: Navigation and Contextual Information", () => {
120121 const componentDriver = rendercomponent ( {
121122 initialState : {
122123 MessageStore : messageStore ,
123- sagaHistory : { sagaHistory : sampleSagaHistory } ,
124+ SagaDiagramStore : { sagaHistory : sampleSagaHistory } ,
124125 } ,
125126 } ) ;
126127
@@ -181,7 +182,7 @@ describe("Feature: 3 Visual Representation of Saga Timeline", () => {
181182 const componentDriver = rendercomponent ( {
182183 initialState : {
183184 MessageStore : messageStore ,
184- sagaHistory : { sagaHistory : sampleSagaHistory } ,
185+ SagaDiagramStore : { sagaHistory : sampleSagaHistory } ,
185186 } ,
186187 } ) ;
187188
@@ -247,7 +248,7 @@ describe("Feature: 3 Visual Representation of Saga Timeline", () => {
247248 const componentDriver = rendercomponent ( {
248249 initialState : {
249250 MessageStore : messageStore ,
250- sagaHistory : { sagaHistory : sampleSagaHistory } ,
251+ SagaDiagramStore : { sagaHistory : sampleSagaHistory } ,
251252 } ,
252253 } ) ;
253254
@@ -271,7 +272,7 @@ describe("Feature: 3 Visual Representation of Saga Timeline", () => {
271272 } ) ;
272273} ) ;
273274
274- function rendercomponent ( { initialState = { } } : { initialState ?: { MessageStore ?: MessageStore ; sagaHistory ?: { sagaHistory : SagaHistory } } } ) : componentDSL {
275+ function rendercomponent ( { initialState = { } } : { initialState ?: { MessageStore ?: MessageStore ; SagaDiagramStore ?: { sagaHistory : SagaHistory } } } ) : componentDSL {
275276 const router = makeRouter ( ) ;
276277
277278 // Render with createTestingPinia
@@ -380,6 +381,8 @@ const sampleSagaHistory: SagaHistory = {
380381 time_sent : new Date ( "2025-03-28T03:04:06.321561Z" ) ,
381382 message_type : "ServiceControl.SmokeTest.MyCustomTimeout" ,
382383 intent : "Send" ,
384+ body_url : "body_url" ,
385+ message_status : MessageStatus . Successful ,
383386 } ,
384387 outgoing_messages : [ ] ,
385388 endpoint : "Endpoint1" ,
@@ -397,6 +400,8 @@ const sampleSagaHistory: SagaHistory = {
397400 time_sent : new Date ( "2025-03-28T03:04:05.37723Z" ) ,
398401 message_type : "ServiceControl.SmokeTest.MyCustomTimeout" ,
399402 intent : "Send" ,
403+ body_url : "body_url" ,
404+ message_status : MessageStatus . Successful ,
400405 } ,
401406 outgoing_messages : [ ] ,
402407 endpoint : "Endpoint1" ,
@@ -414,6 +419,8 @@ const sampleSagaHistory: SagaHistory = {
414419 time_sent : new Date ( "2025-03-28T03:04:06.293765Z" ) ,
415420 message_type : "ServiceControl.SmokeTest.SagaMessage2" ,
416421 intent : "Send" ,
422+ body_url : "body_url" ,
423+ message_status : MessageStatus . Successful ,
417424 } ,
418425 outgoing_messages : [
419426 {
@@ -423,6 +430,12 @@ const sampleSagaHistory: SagaHistory = {
423430 time_sent : new Date ( "2025-03-28T03:04:06.3214397Z" ) ,
424431 message_type : "ServiceControl.SmokeTest.MyCustomTimeout" ,
425432 intent : "Send" ,
433+ deliver_at : new Date ( "2025-03-28T03:04:06.293765Z" ) ,
434+ is_saga_timeout_message : false ,
435+ originating_endpoint : "Sender" ,
436+ originating_machine : "mobvm2" ,
437+ body_url : "body_url" ,
438+ message_status : MessageStatus . Successful ,
426439 } ,
427440 ] ,
428441 endpoint : "Endpoint1" ,
@@ -440,6 +453,8 @@ const sampleSagaHistory: SagaHistory = {
440453 time_sent : new Date ( "2025-03-28T03:04:05.235534Z" ) ,
441454 message_type : "ServiceControl.SmokeTest.SagaMessage1" ,
442455 intent : "Send" ,
456+ body_url : "body_url" ,
457+ message_status : MessageStatus . Successful ,
443458 } ,
444459 outgoing_messages : [
445460 {
@@ -449,6 +464,12 @@ const sampleSagaHistory: SagaHistory = {
449464 time_sent : new Date ( "2025-03-28T03:04:05.3715034Z" ) ,
450465 message_type : "ServiceControl.SmokeTest.MyCustomTimeout" ,
451466 intent : "Send" ,
467+ deliver_at : new Date ( "2025-03-28T03:04:06.293765Z" ) ,
468+ is_saga_timeout_message : false ,
469+ originating_endpoint : "Sender" ,
470+ originating_machine : "mobvm2" ,
471+ body_url : "body_url" ,
472+ message_status : MessageStatus . Successful ,
452473 } ,
453474 ] ,
454475 endpoint : "Endpoint1" ,
0 commit comments