[SI-735] + [SI-871] Several changes to show the application version (FE / BE / DB); Implement unittests
- Changed as code review comments
Signed-off-by: dtheinert <dietmar.theinert@pta.de>
diff --git a/projects/grid-failure-information-app/src/app/shared/components/version-info/version-info-api-client.ts b/projects/grid-failure-information-app/src/app/shared/components/version-info/version-info-api-client.ts
index a81bc8d..60e6157 100644
--- a/projects/grid-failure-information-app/src/app/shared/components/version-info/version-info-api-client.ts
+++ b/projects/grid-failure-information-app/src/app/shared/components/version-info/version-info-api-client.ts
@@ -18,11 +18,6 @@
/**
* Api methods to communicate with settings and version APIs
- *
- * @author Dietmar Theinert <dietmar.theinert@pta.de>
- * @export
- * @class AppVersionClientApi
- * @extends {HttpService}
*/
@Injectable()
@DefaultHeaders({
@@ -35,11 +30,7 @@
/**
* Http-GET to get the version information of the backend service the database.
* The Version adapter adds the frontend version information from the globals-settings file.
- *
- * @author Dietmar Theinert <dietmar.theinert@pta.de>
- * @returns {Observable<AppVersion>}
- * @memberof VersionInfoApiClient
- */
+ * */
@GET('/version')
@Adapter(GridFailureService.versionAdapter)
public getAppVersion() : Observable<AppVersion> {
diff --git a/projects/grid-failure-information-app/src/app/shared/components/version-info/version-info.component.ts b/projects/grid-failure-information-app/src/app/shared/components/version-info/version-info.component.ts
index a11e195..d9db281 100644
--- a/projects/grid-failure-information-app/src/app/shared/components/version-info/version-info.component.ts
+++ b/projects/grid-failure-information-app/src/app/shared/components/version-info/version-info.component.ts
@@ -24,12 +24,8 @@
/**
* The Version Info from sandbox
- *
- * @author Dietmar Theinert <dietmar.theinert@pta.de>
- * @memberof VersionInfo
*/
ngOnInit() {
- //this.sandbox.currVersion$.subscribe(version =>console.log(version)); // DEBUG
this.sandbox.setupAppVersion();
}
}
diff --git a/projects/grid-failure-information-app/src/app/shared/components/version-info/version-info.sandbox.spec.ts b/projects/grid-failure-information-app/src/app/shared/components/version-info/version-info.sandbox.spec.ts
index a75da7b..4338320 100644
--- a/projects/grid-failure-information-app/src/app/shared/components/version-info/version-info.sandbox.spec.ts
+++ b/projects/grid-failure-information-app/src/app/shared/components/version-info/version-info.sandbox.spec.ts
@@ -28,15 +28,13 @@
appState = {
dispatch: () => {},
pipe: () => of(true),
- select: () => of(true)
+ select: () => of(true),
} as any;
actionSubject = {
pipe: () => of(true),
- map: () => ({})
+ map: () => ({}),
} as any;
- dispatchSpy = spyOn(appState, 'dispatch').and.callFake(() => {
- console.log('dispatch faked!');
- });
+ dispatchSpy = spyOn(appState, 'dispatch').and.callFake(() => {});
sandbox = new VersionInfoSandbox(appState, actionSubject);
});
diff --git a/projects/grid-failure-information-app/src/app/shared/store/effects/settings.effects.ts b/projects/grid-failure-information-app/src/app/shared/store/effects/settings.effects.ts
index fe80a83..ec2ea19 100644
--- a/projects/grid-failure-information-app/src/app/shared/store/effects/settings.effects.ts
+++ b/projects/grid-failure-information-app/src/app/shared/store/effects/settings.effects.ts
@@ -19,18 +19,12 @@
/**
* NgRx-Effects for handling the async dependencies.
- *
- * @author Dietmar Theinert <dietmar.theinert@pta.de>
- * @export
- * @class SettingsEffects
*/
@Injectable()
export class SettingsEffects {
/**
* Gets the application version information.
- *
- * @memberof SettingsEffects
*/
getAppVersion$ = createEffect(() => {
return this.actions$.pipe(