From 5a4b752252a6de58b371cd01e3798bc2fee27699 Mon Sep 17 00:00:00 2001 From: Miguel <141239860+Miguel7373@users.noreply.github.com> Date: Fri, 8 Nov 2024 13:03:41 +0100 Subject: [PATCH] Bug/845-chf-label (#1106) * jar is now debuggable * rename intelij config and change log level of spring to debug in staging config * Fix bug with double label in check in history * delete unused pipe and edit the CHF output * edit e2e and frontend tests to work with the new format * remove lable pipe in dialog * add second pipe back in and edit to suffix * fix tests and refactor value pipe * fix spec tests for pipes * fix e2e tests * remove space before percent * fix unit-lable spec and e2e tests * fix spaceing of percent in tests * add testId --------- Co-authored-by: Yanick Minder Co-authored-by: Lias Kleisa --- frontend/cypress/e2e/checkIn.cy.ts | 2 +- .../check-in-history-dialog.component.html | 5 ++--- .../check-in-form-metric/check-in-form-metric.component.html | 2 +- frontend/src/app/shared/shared.module.ts | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/cypress/e2e/checkIn.cy.ts b/frontend/cypress/e2e/checkIn.cy.ts index 3b4b749edc..6024396ae2 100644 --- a/frontend/cypress/e2e/checkIn.cy.ts +++ b/frontend/cypress/e2e/checkIn.cy.ts @@ -374,7 +374,7 @@ describe('OKR Check-in e2e tests', () => { cy.wait('@getKeyResultsAfterSave'); cy.getByTestId('add-check-in').first().click(); - cy.contains('Letzter Wert').siblings('div').contains('10 %'); + cy.contains('Letzter Wert').siblings('div').contains('10%'); }); }); }); diff --git a/frontend/src/app/components/check-in-history-dialog/check-in-history-dialog.component.html b/frontend/src/app/components/check-in-history-dialog/check-in-history-dialog.component.html index 56a6727b9b..7204f756a4 100644 --- a/frontend/src/app/components/check-in-history-dialog/check-in-history-dialog.component.html +++ b/frontend/src/app/components/check-in-history-dialog/check-in-history-dialog.component.html @@ -22,8 +22,7 @@

Wert:

- {{ getMetricKeyResult().unit | unitLabelTransformation }} - {{ +checkIn.value! | unitValueTransformation: getMetricKeyResult().unit }} + {{ +checkIn.value! | unitValueTransformation }}{{ getMetricKeyResult().unit | unitLabelTransformation }} {{ checkIn.value }} @@ -49,7 +48,7 @@

Massnahmen:

- +
diff --git a/frontend/src/app/components/checkin/check-in-form-metric/check-in-form-metric.component.html b/frontend/src/app/components/checkin/check-in-form-metric/check-in-form-metric.component.html index 3c796f384f..f66dfb6ea5 100644 --- a/frontend/src/app/components/checkin/check-in-form-metric/check-in-form-metric.component.html +++ b/frontend/src/app/components/checkin/check-in-form-metric/check-in-form-metric.component.html @@ -27,7 +27,7 @@

Letzter Wert

-
{{ checkIn.value }} {{ generateUnitLabel() }}
+
{{ checkIn.value }}{{ generateUnitLabel() }}
diff --git a/frontend/src/app/shared/shared.module.ts b/frontend/src/app/shared/shared.module.ts index 1ed7295b52..783ed85b71 100644 --- a/frontend/src/app/shared/shared.module.ts +++ b/frontend/src/app/shared/shared.module.ts @@ -25,6 +25,7 @@ import { SpinnerComponent } from './custom/spinner/spinner.component'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { DialogTemplateCoreComponent } from './custom/dialog-template-core/dialog-template-core.component'; import { MatDividerModule } from '@angular/material/divider'; +import { UnitLabelTransformationPipe } from './pipes/unit-label-transformation/unit-label-transformation.pipe'; @NgModule({ declarations: [