From a7e58b783e9c7bb3540172d189ddf89ecb1868b3 Mon Sep 17 00:00:00 2001 From: Xiao Gui <xgui3783@gmail.com> Date: Tue, 13 Jun 2023 13:18:37 +0200 Subject: [PATCH] fix tests --- src/share/saneUrl/saneUrl.component.spec.ts | 5 +++-- src/util/side-panel/side-panel.component.spec.ts | 8 +++++++- src/viewerModule/viewerCmp/viewerCmp.component.ts | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/share/saneUrl/saneUrl.component.spec.ts b/src/share/saneUrl/saneUrl.component.spec.ts index 967039d1d..f8a8d3f8f 100644 --- a/src/share/saneUrl/saneUrl.component.spec.ts +++ b/src/share/saneUrl/saneUrl.component.spec.ts @@ -7,7 +7,8 @@ import { AngularMaterialModule } from 'src/sharedModules' import { CUSTOM_ELEMENTS_SCHEMA, Directive } from '@angular/core' import { of, throwError } from 'rxjs' import { NotFoundError } from '../type' -import { FormsModule } from '@angular/forms' +import { ReactiveFormsModule } from '@angular/forms' +import { CommonModule } from '@angular/common' const inputCss = `input[aria-label="Custom link"]` const submitCss = `button[aria-label="Create custom link"]` @@ -34,7 +35,7 @@ describe('> saneUrl.component.ts', () => { imports: [ NoopAnimationsModule, AngularMaterialModule, - FormsModule, + ReactiveFormsModule, ], providers: [ { diff --git a/src/util/side-panel/side-panel.component.spec.ts b/src/util/side-panel/side-panel.component.spec.ts index 73a50a69a..5a7f71a4d 100644 --- a/src/util/side-panel/side-panel.component.spec.ts +++ b/src/util/side-panel/side-panel.component.spec.ts @@ -1,6 +1,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { SidePanelComponent } from './side-panel.component'; +import { MatCardModule } from '@angular/material/card'; describe('SidePanelComponent', () => { let component: SidePanelComponent; @@ -8,7 +9,12 @@ describe('SidePanelComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ SidePanelComponent ] + imports: [ + MatCardModule, + ], + declarations: [ + SidePanelComponent, + ] }) .compileComponents(); diff --git a/src/viewerModule/viewerCmp/viewerCmp.component.ts b/src/viewerModule/viewerCmp/viewerCmp.component.ts index 27d4c91ba..b0d53ca11 100644 --- a/src/viewerModule/viewerCmp/viewerCmp.component.ts +++ b/src/viewerModule/viewerCmp/viewerCmp.component.ts @@ -444,8 +444,8 @@ export class ViewerCmp implements OnDestroy { voiFeatureEntryCmp: EntryComponent async pullAllVoi(){ + await wait(320) if (this.voiFeatureEntryCmp){ - await wait(320) this.voiFeatureEntryCmp.pullAll() } } -- GitLab