@@ -4,6 +4,7 @@ import { SagaHistory } from "@/resources/SagaHistory";
4
4
import makeRouter from "@/router" ;
5
5
import { createTestingPinia } from "@pinia/testing" ;
6
6
import { MessageStore } from "@/stores/MessageStore" ;
7
+ import { MessageStatus } from "@/resources/Message" ;
7
8
8
9
//Defines a domain-specific language (DSL) for interacting with the system under test (sut)
9
10
interface componentDSL {
@@ -38,7 +39,7 @@ describe("Feature: Message not involved in Saga", () => {
38
39
const componentDriver = rendercomponent ( {
39
40
initialState : {
40
41
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
42
43
} ,
43
44
} ) ;
44
45
@@ -63,7 +64,7 @@ describe("Feature: Detecting no Audited Saga Data Available", () => {
63
64
const componentDriver = rendercomponent ( {
64
65
initialState : {
65
66
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
67
68
} ,
68
69
} ) ;
69
70
@@ -97,7 +98,7 @@ describe("Feature: Navigation and Contextual Information", () => {
97
98
const componentDriver = rendercomponent ( {
98
99
initialState : {
99
100
MessageStore : messageStore ,
100
- sagaHistory : { sagaHistory : sampleSagaHistory } ,
101
+ SagaDiagramStore : { sagaHistory : sampleSagaHistory } ,
101
102
} ,
102
103
} ) ;
103
104
@@ -120,7 +121,7 @@ describe("Feature: Navigation and Contextual Information", () => {
120
121
const componentDriver = rendercomponent ( {
121
122
initialState : {
122
123
MessageStore : messageStore ,
123
- sagaHistory : { sagaHistory : sampleSagaHistory } ,
124
+ SagaDiagramStore : { sagaHistory : sampleSagaHistory } ,
124
125
} ,
125
126
} ) ;
126
127
@@ -181,7 +182,7 @@ describe("Feature: 3 Visual Representation of Saga Timeline", () => {
181
182
const componentDriver = rendercomponent ( {
182
183
initialState : {
183
184
MessageStore : messageStore ,
184
- sagaHistory : { sagaHistory : sampleSagaHistory } ,
185
+ SagaDiagramStore : { sagaHistory : sampleSagaHistory } ,
185
186
} ,
186
187
} ) ;
187
188
@@ -247,7 +248,7 @@ describe("Feature: 3 Visual Representation of Saga Timeline", () => {
247
248
const componentDriver = rendercomponent ( {
248
249
initialState : {
249
250
MessageStore : messageStore ,
250
- sagaHistory : { sagaHistory : sampleSagaHistory } ,
251
+ SagaDiagramStore : { sagaHistory : sampleSagaHistory } ,
251
252
} ,
252
253
} ) ;
253
254
@@ -271,7 +272,7 @@ describe("Feature: 3 Visual Representation of Saga Timeline", () => {
271
272
} ) ;
272
273
} ) ;
273
274
274
- function rendercomponent ( { initialState = { } } : { initialState ?: { MessageStore ?: MessageStore ; sagaHistory ?: { sagaHistory : SagaHistory } } } ) : componentDSL {
275
+ function rendercomponent ( { initialState = { } } : { initialState ?: { MessageStore ?: MessageStore ; SagaDiagramStore ?: { sagaHistory : SagaHistory } } } ) : componentDSL {
275
276
const router = makeRouter ( ) ;
276
277
277
278
// Render with createTestingPinia
@@ -380,6 +381,8 @@ const sampleSagaHistory: SagaHistory = {
380
381
time_sent : new Date ( "2025-03-28T03:04:06.321561Z" ) ,
381
382
message_type : "ServiceControl.SmokeTest.MyCustomTimeout" ,
382
383
intent : "Send" ,
384
+ body_url : "body_url" ,
385
+ message_status : MessageStatus . Successful ,
383
386
} ,
384
387
outgoing_messages : [ ] ,
385
388
endpoint : "Endpoint1" ,
@@ -397,6 +400,8 @@ const sampleSagaHistory: SagaHistory = {
397
400
time_sent : new Date ( "2025-03-28T03:04:05.37723Z" ) ,
398
401
message_type : "ServiceControl.SmokeTest.MyCustomTimeout" ,
399
402
intent : "Send" ,
403
+ body_url : "body_url" ,
404
+ message_status : MessageStatus . Successful ,
400
405
} ,
401
406
outgoing_messages : [ ] ,
402
407
endpoint : "Endpoint1" ,
@@ -414,6 +419,8 @@ const sampleSagaHistory: SagaHistory = {
414
419
time_sent : new Date ( "2025-03-28T03:04:06.293765Z" ) ,
415
420
message_type : "ServiceControl.SmokeTest.SagaMessage2" ,
416
421
intent : "Send" ,
422
+ body_url : "body_url" ,
423
+ message_status : MessageStatus . Successful ,
417
424
} ,
418
425
outgoing_messages : [
419
426
{
@@ -423,6 +430,12 @@ const sampleSagaHistory: SagaHistory = {
423
430
time_sent : new Date ( "2025-03-28T03:04:06.3214397Z" ) ,
424
431
message_type : "ServiceControl.SmokeTest.MyCustomTimeout" ,
425
432
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 ,
426
439
} ,
427
440
] ,
428
441
endpoint : "Endpoint1" ,
@@ -440,6 +453,8 @@ const sampleSagaHistory: SagaHistory = {
440
453
time_sent : new Date ( "2025-03-28T03:04:05.235534Z" ) ,
441
454
message_type : "ServiceControl.SmokeTest.SagaMessage1" ,
442
455
intent : "Send" ,
456
+ body_url : "body_url" ,
457
+ message_status : MessageStatus . Successful ,
443
458
} ,
444
459
outgoing_messages : [
445
460
{
@@ -449,6 +464,12 @@ const sampleSagaHistory: SagaHistory = {
449
464
time_sent : new Date ( "2025-03-28T03:04:05.3715034Z" ) ,
450
465
message_type : "ServiceControl.SmokeTest.MyCustomTimeout" ,
451
466
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 ,
452
473
} ,
453
474
] ,
454
475
endpoint : "Endpoint1" ,
0 commit comments