From 57e3884c7298878713be6a7e8b9e5a4807ca1115 Mon Sep 17 00:00:00 2001 From: Pavel Strunkin Date: Sat, 10 Apr 2021 17:43:45 +0300 Subject: [PATCH] TestRun create event could go later than delete event #221 closes https://github.com/Visual-Regression-Tracker/Visual-Regression-Tracker/issues/221 --- src/shared/events/events.gateway.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shared/events/events.gateway.ts b/src/shared/events/events.gateway.ts index 5d94e8b8..afc38dd5 100644 --- a/src/shared/events/events.gateway.ts +++ b/src/shared/events/events.gateway.ts @@ -41,6 +41,8 @@ export class EventsGateway { } testRunDeleted(testRun: TestRun): void { + this.testRunsCreatedQueued = this.testRunsCreatedQueued.filter((tr) => tr.id !== testRun.id); + this.testRunsUpdatedQueued = this.testRunsUpdatedQueued.filter((tr) => tr.id !== testRun.id); this.testRunsDeletedQueued.push(testRun); this.testRunDeletedDebounced(); this.buildUpdated(testRun.buildId);