From 62f697609f7112739c7423bb9cd81f258a763518 Mon Sep 17 00:00:00 2001
From: Xiao Gui <xgui3783@gmail.com>
Date: Wed, 7 Oct 2020 14:40:14 +0200
Subject: [PATCH] fix aot build

---
 .../landmarkUnit.component.spec.ts            | 29 ++++++++++---------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/src/ui/nehubaContainer/landmarkUnit/landmarkUnit.component.spec.ts b/src/ui/nehubaContainer/landmarkUnit/landmarkUnit.component.spec.ts
index 219da54f6..582f3f183 100644
--- a/src/ui/nehubaContainer/landmarkUnit/landmarkUnit.component.spec.ts
+++ b/src/ui/nehubaContainer/landmarkUnit/landmarkUnit.component.spec.ts
@@ -1,6 +1,5 @@
 import { Component, ViewChild } from "@angular/core"
 import { async, TestBed } from "@angular/core/testing"
-import { By } from "@angular/platform-browser"
 import { SafeStylePipe } from "src/util/pipes/safeStyle.pipe"
 import { HOVER_COLOR, LandmarkUnit, NORMAL_COLOR } from "./landmarkUnit.component"
 
@@ -10,18 +9,7 @@ import { HOVER_COLOR, LandmarkUnit, NORMAL_COLOR } from "./landmarkUnit.componen
  * see https://github.com/angular/angular/issues/35614
  */
 @Component({
-  template: `
-  <nehuba-2dlandmark-unit
-    [positionX]="positionX"
-    [positionY]="positionY"
-    [positionZ]="positionZ"
-    [color]="color"
-    [highlight]="highlight"
-    [flatProjection]="flatProjection"
-    [fasClass]="fasClass" 
-    >
-  </nehuba-2dlandmark-unit>
-  `
+  template: ``
 })
 class DummyCmp{
   @ViewChild(LandmarkUnit) public landmarkUnit: LandmarkUnit
@@ -44,6 +32,21 @@ describe('> landmarkUnit.component.ts', () => {
           LandmarkUnit,
           SafeStylePipe
         ]
+      }).overrideComponent(DummyCmp, {
+        set: {
+          template: `
+          <nehuba-2dlandmark-unit
+            [positionX]="positionX"
+            [positionY]="positionY"
+            [positionZ]="positionZ"
+            [color]="color"
+            [highlight]="highlight"
+            [flatProjection]="flatProjection"
+            [fasClass]="fasClass" 
+            >
+          </nehuba-2dlandmark-unit>
+          `
+        }
       }).compileComponents()
     }))
 
-- 
GitLab