@@ -52,7 +52,7 @@ export class ExtendedQuery {
52
52
this . updateTestCase ( envelope . testCase )
53
53
}
54
54
if ( envelope . testCaseStarted ) {
55
- this . updateTestCaseStarted ( envelope . testCaseStarted )
55
+ this . testCaseStarted . push ( envelope . testCaseStarted )
56
56
}
57
57
if ( envelope . testStepFinished ) {
58
58
this . updateTestStepFinished ( envelope . testStepFinished )
@@ -147,16 +147,6 @@ export class ExtendedQuery {
147
147
testCase . testSteps . forEach ( ( testStep ) => this . testStepById . set ( testStep . id , testStep ) )
148
148
}
149
149
150
- private updateTestCaseStarted ( testCaseStarted : TestCaseStarted ) {
151
- // ensure this replaces any previous attempt for the same test case
152
- this . testCaseStarted = [
153
- ...this . testCaseStarted . filter (
154
- ( existing ) => existing . testCaseId !== testCaseStarted . testCaseId
155
- ) ,
156
- testCaseStarted ,
157
- ]
158
- }
159
-
160
150
private updateTestStepFinished ( testStepFinished : TestStepFinished ) {
161
151
this . testStepFinishedByTestCaseStartedId . put (
162
152
testStepFinished . testCaseStartedId ,
@@ -200,7 +190,10 @@ export class ExtendedQuery {
200
190
}
201
191
202
192
findAllTestCaseStarted ( ) : ReadonlyArray < TestCaseStarted > {
203
- return [ ...this . testCaseStarted ]
193
+ return this . testCaseStarted . filter ( ( testCaseStarted ) => {
194
+ const testCaseFinished = this . testCaseFinishedByTestCaseStartedId . get ( testCaseStarted . id )
195
+ return ! testCaseFinished ?. willBeRetried
196
+ } )
204
197
}
205
198
206
199
findTestCaseBy ( testCaseStarted : TestCaseStarted ) {
0 commit comments