@@ -137,14 +137,24 @@ describe("Feature: 3 Visual Representation of Saga Timeline", () => {
137
137
// but set them again explicitly here
138
138
//so that the reader of this test can see the preconditions at play
139
139
//and understand the test better without having to jump around
140
- sampleSagaHistory . changes [ 0 ] . start_time = new Date ( "2025-03-28T03:04:08.3819211Z" ) ; // A
141
- sampleSagaHistory . changes [ 0 ] . finish_time = new Date ( "2025-03-28T03:04:08.3836Z" ) ; // A1
142
- sampleSagaHistory . changes [ 1 ] . start_time = new Date ( "2025-03-28T03:04:07.5416262Z" ) ; // B
143
- sampleSagaHistory . changes [ 1 ] . finish_time = new Date ( "2025-03-28T03:04:07.5509712Z" ) ; //B1
144
- sampleSagaHistory . changes [ 2 ] . start_time = new Date ( "2025-03-28T03:04:06.3088353Z" ) ; //C
145
- sampleSagaHistory . changes [ 2 ] . finish_time = new Date ( "2025-03-28T03:04:06.3218175Z" ) ; //C1
146
- sampleSagaHistory . changes [ 3 ] . start_time = new Date ( "2025-03-28T03:04:05.3332078Z" ) ; //D
147
- sampleSagaHistory . changes [ 3 ] . finish_time = new Date ( "2025-03-28T03:04:05.3799483Z" ) ; //D1
140
+
141
+ const startTimeA = new Date ( "2025-03-28T03:04:08.3819211Z" ) ;
142
+ const finishTimeA1 = new Date ( "2025-03-28T03:04:08.3836Z" ) ;
143
+ const startTimeB = new Date ( "2025-03-28T03:04:07.5416262Z" ) ;
144
+ const finishTimeB1 = new Date ( "2025-03-28T03:04:07.5509712Z" ) ;
145
+ const startTimeC = new Date ( "2025-03-28T03:04:06.3088353Z" ) ;
146
+ const finishTimeC1 = new Date ( "2025-03-28T03:04:06.3218175Z" ) ;
147
+ const startTimeD = new Date ( "2025-03-28T03:04:05.3332078Z" ) ;
148
+ const finishTimeD1 = new Date ( "2025-03-28T03:04:05.3799483Z" ) ;
149
+
150
+ sampleSagaHistory . changes [ 0 ] . start_time = startTimeA ;
151
+ sampleSagaHistory . changes [ 0 ] . finish_time = finishTimeA1 ;
152
+ sampleSagaHistory . changes [ 1 ] . start_time = startTimeB ;
153
+ sampleSagaHistory . changes [ 1 ] . finish_time = finishTimeB1 ;
154
+ sampleSagaHistory . changes [ 2 ] . start_time = startTimeC ;
155
+ sampleSagaHistory . changes [ 2 ] . finish_time = finishTimeC1 ;
156
+ sampleSagaHistory . changes [ 3 ] . start_time = startTimeD ;
157
+ sampleSagaHistory . changes [ 3 ] . finish_time = finishTimeD1 ;
148
158
sampleSagaHistory . changes [ 3 ] . status = "new" ;
149
159
150
160
//B(1), C(2), A(0), D(3)
@@ -161,16 +171,16 @@ describe("Feature: 3 Visual Representation of Saga Timeline", () => {
161
171
//assert
162
172
componentDriver . assert . thereAreTheFollowingSagaChangesInThisOrder ( [
163
173
{
164
- expectedRenderedLocalTime : toLocalDateTimeString ( sampleSagaHistory . changes [ 3 ] . start_time ) , // D
174
+ expectedRenderedLocalTime : toLocalDateTimeString ( startTimeD ) ,
165
175
} ,
166
176
{
167
- expectedRenderedLocalTime : toLocalDateTimeString ( sampleSagaHistory . changes [ 2 ] . start_time ) , // C
177
+ expectedRenderedLocalTime : toLocalDateTimeString ( startTimeC ) ,
168
178
} ,
169
179
{
170
- expectedRenderedLocalTime : toLocalDateTimeString ( sampleSagaHistory . changes [ 1 ] . start_time ) , // B
180
+ expectedRenderedLocalTime : toLocalDateTimeString ( startTimeB ) ,
171
181
} ,
172
182
{
173
- expectedRenderedLocalTime : toLocalDateTimeString ( sampleSagaHistory . changes [ 0 ] . start_time ) , // A
183
+ expectedRenderedLocalTime : toLocalDateTimeString ( startTimeA ) ,
174
184
} ,
175
185
] ) ;
176
186
} ) ;
@@ -202,14 +212,23 @@ describe("Feature: 3 Visual Representation of Saga Timeline", () => {
202
212
// but set them again explicitly here
203
213
//so that the reader of this test can see the preconditions at play
204
214
//and understand the test better without having to jump around
205
- sampleSagaHistory . changes [ 0 ] . start_time = new Date ( "2025-03-28T03:04:08.3819211Z" ) ; // A
206
- sampleSagaHistory . changes [ 0 ] . finish_time = new Date ( "2025-03-28T03:04:08.3836Z" ) ; // A1
207
- sampleSagaHistory . changes [ 1 ] . start_time = new Date ( "2025-03-28T03:04:07.5416262Z" ) ; // B
208
- sampleSagaHistory . changes [ 1 ] . finish_time = new Date ( "2025-03-28T03:04:07.5509712Z" ) ; //B1
209
- sampleSagaHistory . changes [ 2 ] . start_time = new Date ( "2025-03-28T03:04:06.3088353Z" ) ; //C
210
- sampleSagaHistory . changes [ 2 ] . finish_time = new Date ( "2025-03-28T03:04:06.3218175Z" ) ; //C1
211
- sampleSagaHistory . changes [ 3 ] . start_time = new Date ( "2025-03-28T03:04:05.3332078Z" ) ; //D
212
- sampleSagaHistory . changes [ 3 ] . finish_time = new Date ( "2025-03-28T03:04:05.3799483Z" ) ; //D1
215
+ const startTimeA = new Date ( "2025-03-28T03:04:08.3819211Z" ) ;
216
+ const finishTimeA1 = new Date ( "2025-03-28T03:04:08.3836Z" ) ;
217
+ const startTimeB = new Date ( "2025-03-28T03:04:07.5416262Z" ) ;
218
+ const finishTimeB1 = new Date ( "2025-03-28T03:04:07.5509712Z" ) ;
219
+ const startTimeC = new Date ( "2025-03-28T03:04:06.3088353Z" ) ;
220
+ const finishTimeC1 = new Date ( "2025-03-28T03:04:06.3218175Z" ) ;
221
+ const startTimeD = new Date ( "2025-03-28T03:04:05.3332078Z" ) ;
222
+ const finishTimeD1 = new Date ( "2025-03-28T03:04:05.3799483Z" ) ;
223
+
224
+ sampleSagaHistory . changes [ 0 ] . start_time = startTimeA ;
225
+ sampleSagaHistory . changes [ 0 ] . finish_time = finishTimeA1 ;
226
+ sampleSagaHistory . changes [ 1 ] . start_time = startTimeB ;
227
+ sampleSagaHistory . changes [ 1 ] . finish_time = finishTimeB1 ;
228
+ sampleSagaHistory . changes [ 2 ] . start_time = startTimeC ;
229
+ sampleSagaHistory . changes [ 2 ] . finish_time = finishTimeC1 ;
230
+ sampleSagaHistory . changes [ 3 ] . start_time = startTimeD ;
231
+ sampleSagaHistory . changes [ 3 ] . finish_time = finishTimeD1 ;
213
232
sampleSagaHistory . changes [ 3 ] . status = "new" ;
214
233
215
234
// Set up the store with sample saga history
@@ -224,16 +243,16 @@ describe("Feature: 3 Visual Representation of Saga Timeline", () => {
224
243
225
244
componentDriver . assert . thereAreTheFollowingSagaChangesInThisOrder ( [
226
245
{
227
- expectedRenderedLocalTime : toLocalDateTimeString ( sampleSagaHistory . changes [ 3 ] . start_time ) , // D
246
+ expectedRenderedLocalTime : toLocalDateTimeString ( startTimeD ) ,
228
247
} ,
229
248
{
230
- expectedRenderedLocalTime : toLocalDateTimeString ( sampleSagaHistory . changes [ 2 ] . start_time ) , // C
249
+ expectedRenderedLocalTime : toLocalDateTimeString ( startTimeC ) ,
231
250
} ,
232
251
{
233
- expectedRenderedLocalTime : toLocalDateTimeString ( sampleSagaHistory . changes [ 1 ] . start_time ) , // B
252
+ expectedRenderedLocalTime : toLocalDateTimeString ( startTimeB ) ,
234
253
} ,
235
254
{
236
- expectedRenderedLocalTime : toLocalDateTimeString ( sampleSagaHistory . changes [ 0 ] . start_time ) , // A
255
+ expectedRenderedLocalTime : toLocalDateTimeString ( startTimeA ) ,
237
256
} ,
238
257
] ) ;
239
258
} ) ;
0 commit comments