From 53da798260173af6d44c84a93c8a59d31a114edb Mon Sep 17 00:00:00 2001 From: Tom Evans Date: Thu, 7 Nov 2024 14:07:52 +0000 Subject: [PATCH 1/4] feat(cb2-14690): version number --- .../components/header/__tests__/header.component.spec.ts | 5 +++++ src/app/core/components/header/header.component.html | 1 + src/app/core/components/header/header.component.ts | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/src/app/core/components/header/__tests__/header.component.spec.ts b/src/app/core/components/header/__tests__/header.component.spec.ts index 6fc6881152..1e03c4dc4e 100644 --- a/src/app/core/components/header/__tests__/header.component.spec.ts +++ b/src/app/core/components/header/__tests__/header.component.spec.ts @@ -1,6 +1,7 @@ import { DebugElement } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; +import packageInfo from '../../../../../../package.json'; import { HeaderComponent } from '../header.component'; describe('HeaderComponent', () => { @@ -42,4 +43,8 @@ describe('HeaderComponent', () => { logOutButton.triggerEventHandler('click', null); }); + it('getAppVersion returns correct version', () => { + const version = component.getAppVersion(); + expect(version).toBe(packageInfo.version); + }); }); diff --git a/src/app/core/components/header/header.component.html b/src/app/core/components/header/header.component.html index cb0d928bbf..5fa0c4e267 100644 --- a/src/app/core/components/header/header.component.html +++ b/src/app/core/components/header/header.component.html @@ -5,6 +5,7 @@
Vehicle testing management + {{ getAppVersion() }}
{{ username }} diff --git a/src/app/core/components/header/header.component.ts b/src/app/core/components/header/header.component.ts index a918db42a6..4e4ee8c0f9 100644 --- a/src/app/core/components/header/header.component.ts +++ b/src/app/core/components/header/header.component.ts @@ -1,4 +1,5 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; +import packageInfo from '../../../../../package.json'; @Component({ selector: 'app-header', @@ -12,4 +13,8 @@ export class HeaderComponent { logout() { this.logOutEvent.emit(); } + + getAppVersion() { + return packageInfo.version; + } } From a375cff5f81d3a34fbf174e342344b592a31ce77 Mon Sep 17 00:00:00 2001 From: Tom Evans Date: Thu, 7 Nov 2024 20:10:52 +0000 Subject: [PATCH 2/4] feat(cb2-14690): version number comments addressed --- .../components/header/__tests__/header.component.spec.ts | 5 ----- src/app/core/components/header/header.component.html | 2 +- src/app/core/components/header/header.component.ts | 5 +---- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/app/core/components/header/__tests__/header.component.spec.ts b/src/app/core/components/header/__tests__/header.component.spec.ts index 1e03c4dc4e..6fc6881152 100644 --- a/src/app/core/components/header/__tests__/header.component.spec.ts +++ b/src/app/core/components/header/__tests__/header.component.spec.ts @@ -1,7 +1,6 @@ import { DebugElement } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; -import packageInfo from '../../../../../../package.json'; import { HeaderComponent } from '../header.component'; describe('HeaderComponent', () => { @@ -43,8 +42,4 @@ describe('HeaderComponent', () => { logOutButton.triggerEventHandler('click', null); }); - it('getAppVersion returns correct version', () => { - const version = component.getAppVersion(); - expect(version).toBe(packageInfo.version); - }); }); diff --git a/src/app/core/components/header/header.component.html b/src/app/core/components/header/header.component.html index 5fa0c4e267..225e56132f 100644 --- a/src/app/core/components/header/header.component.html +++ b/src/app/core/components/header/header.component.html @@ -5,7 +5,7 @@
Vehicle testing management - {{ getAppVersion() }} + {{ version}}
{{ username }} diff --git a/src/app/core/components/header/header.component.ts b/src/app/core/components/header/header.component.ts index 4e4ee8c0f9..d64bc1befc 100644 --- a/src/app/core/components/header/header.component.ts +++ b/src/app/core/components/header/header.component.ts @@ -9,12 +9,9 @@ import packageInfo from '../../../../../package.json'; export class HeaderComponent { @Output() logOutEvent = new EventEmitter(); @Input() username: string | null = ''; + protected readonly version = packageInfo.version; logout() { this.logOutEvent.emit(); } - - getAppVersion() { - return packageInfo.version; - } } From 2c6bad2bd9afcb33e6bcbe5d4144efe3a4a5d0e1 Mon Sep 17 00:00:00 2001 From: Tom Evans Date: Thu, 7 Nov 2024 20:11:47 +0000 Subject: [PATCH 3/4] feat(cb2-14690): version number comments addresseds --- src/app/core/components/header/header.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/core/components/header/header.component.html b/src/app/core/components/header/header.component.html index 225e56132f..0d006c9a3a 100644 --- a/src/app/core/components/header/header.component.html +++ b/src/app/core/components/header/header.component.html @@ -5,7 +5,7 @@
Vehicle testing management - {{ version}} + {{ version }}
{{ username }} From 859780909dffef5840aa0faca75c28b8e69d554d Mon Sep 17 00:00:00 2001 From: Tom Evans Date: Thu, 7 Nov 2024 20:14:49 +0000 Subject: [PATCH 4/4] feat(cb2-14690): version number comments address --- src/app/core/components/header/header.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/core/components/header/header.component.html b/src/app/core/components/header/header.component.html index 0d006c9a3a..a960a4068c 100644 --- a/src/app/core/components/header/header.component.html +++ b/src/app/core/components/header/header.component.html @@ -5,7 +5,7 @@
Vehicle testing management - {{ version }} + v{{ version }}
{{ username }}