From 9103d4df989edd693ace7f8ab71e33a44525ddbb Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Fri, 3 Mar 2023 09:33:46 -0500 Subject: [PATCH] Update test and then fix it Signed-off-by: Sebastian Malton --- packages/core/src/features/catalog/entity-running.test.tsx | 2 ++ packages/core/src/renderer/api/catalog/entity/registry.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/core/src/features/catalog/entity-running.test.tsx b/packages/core/src/features/catalog/entity-running.test.tsx index 36947a7d60..e3a4438da5 100644 --- a/packages/core/src/features/catalog/entity-running.test.tsx +++ b/packages/core/src/features/catalog/entity-running.test.tsx @@ -166,6 +166,8 @@ describe("entity running technical tests", () => { rendered.getByTestId("detail-panel-hot-bar-icon").click(); + await flushPromises(); + expect(onRun).not.toHaveBeenCalled(); }); diff --git a/packages/core/src/renderer/api/catalog/entity/registry.ts b/packages/core/src/renderer/api/catalog/entity/registry.ts index 5a04359e28..ad23b2aa94 100644 --- a/packages/core/src/renderer/api/catalog/entity/registry.ts +++ b/packages/core/src/renderer/api/catalog/entity/registry.ts @@ -249,6 +249,8 @@ export class CatalogEntityRegistry { if (!doOnRun) { this.dependencies.logger.debug(`onBeforeRun for ${entity.getId()} returned false`); + + return; } await entity.onRun?.({