From d32a546994009f43289fdf9c13692efacf5f2fd4 Mon Sep 17 00:00:00 2001
From: jojohoch <joachim.hoch@iqb.hu-berlin.de>
Date: Wed, 8 Dec 2021 10:03:54 +0100
Subject: [PATCH] [player] Add logs to console to test the player in TestCenter

---
 projects/player/src/app/app.component.ts                | 2 ++
 projects/player/src/app/services/verona-post.service.ts | 2 ++
 projects/player/src/main.ts                             | 6 +++---
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/projects/player/src/app/app.component.ts b/projects/player/src/app/app.component.ts
index 6215c291c..b2ef82c2b 100644
--- a/projects/player/src/app/app.component.ts
+++ b/projects/player/src/app/app.component.ts
@@ -68,6 +68,8 @@ export class AppComponent implements OnInit {
           this.pages = unitDefinition.pages;
           this.unitStateService.unitStateElementCodes = message.unitState?.dataParts?.elementCodes ?
             JSON.parse(message.unitState.dataParts.elementCodes) : [];
+          // eslint-disable-next-line no-console
+          console.log('player: unitStateElementCodes', this.unitStateService.unitStateElementCodes);
         } else {
           this.dialog.open(AlertDialogComponent, {
             data: {
diff --git a/projects/player/src/app/services/verona-post.service.ts b/projects/player/src/app/services/verona-post.service.ts
index 651783d63..d4706ae6c 100644
--- a/projects/player/src/app/services/verona-post.service.ts
+++ b/projects/player/src/app/services/verona-post.service.ts
@@ -71,6 +71,8 @@ export class VeronaPostService {
 
   sendVopReadyNotification(playerMetadata: VopMetaData): void {
     if (playerMetadata) {
+      // eslint-disable-next-line no-console
+      console.log('player: sendVopReadyNotification', playerMetadata);
       this.send({
         type: 'vopReadyNotification',
         ...playerMetadata
diff --git a/projects/player/src/main.ts b/projects/player/src/main.ts
index 286e1b640..b6773a6f2 100644
--- a/projects/player/src/main.ts
+++ b/projects/player/src/main.ts
@@ -6,9 +6,9 @@ import { environment } from './environments/environment';
 
 if (environment.production) {
   enableProdMode();
-  if (window) {
-    window.console.log = () => {};
-  }
+  // if (window) {
+  //   window.console.log = () => {};
+  // }
 }
 
 platformBrowserDynamic().bootstrapModule(AppModule)
-- 
GitLab