From e3bce4c2372801956a27f0215b37168f6b2358e8 Mon Sep 17 00:00:00 2001 From: vanessa Date: Tue, 10 Sep 2024 15:42:52 +0200 Subject: [PATCH] Add unit tests --- .../src/components/asset/StartStopButton.tsx | 2 +- .../unit/components/asset/AssetBoard.test.tsx | 58 +++++ .../unit/components/asset/AssetCard.test.tsx | 53 ++++ .../unit/components/asset/LogButton.test.tsx | 39 +++ .../components/asset/StartStopButton.test.tsx | 172 +++++++++++++ .../digitaltwins/DigitalTwinsPreview.test.tsx | 104 ++++++++ .../digitaltwins/ExecutionFunctions.test.ts | 170 +++++++++++++ .../routes/digitaltwins/LogDialog.test.tsx | 80 ++++++ .../routes/digitaltwins/Snackbar.test.tsx | 74 ++++++ client/test/unit/unit.testUtil.tsx | 45 +++- client/test/unitTests/Util/gitlab.test.ts | 151 ++++++++--- .../unitTests/Util/gitlabDigitalTwin.test.ts | 234 ++++++++++-------- 12 files changed, 1035 insertions(+), 147 deletions(-) create mode 100644 client/test/unit/components/asset/AssetBoard.test.tsx create mode 100644 client/test/unit/components/asset/AssetCard.test.tsx create mode 100644 client/test/unit/components/asset/LogButton.test.tsx create mode 100644 client/test/unit/components/asset/StartStopButton.test.tsx create mode 100644 client/test/unit/routes/digitaltwins/DigitalTwinsPreview.test.tsx create mode 100644 client/test/unit/routes/digitaltwins/ExecutionFunctions.test.ts create mode 100644 client/test/unit/routes/digitaltwins/LogDialog.test.tsx create mode 100644 client/test/unit/routes/digitaltwins/Snackbar.test.tsx diff --git a/client/src/components/asset/StartStopButton.tsx b/client/src/components/asset/StartStopButton.tsx index b8abbbe12..8055886c1 100644 --- a/client/src/components/asset/StartStopButton.tsx +++ b/client/src/components/asset/StartStopButton.tsx @@ -33,7 +33,7 @@ function StartStopButton({ return ( <> {digitalTwin?.pipelineLoading ? ( - + ) : null}{' '}