From 7610ff643023cc9ec5262eea4df02b0b780ec31d Mon Sep 17 00:00:00 2001 From: Deborah Date: Tue, 21 May 2024 16:58:19 +0100 Subject: [PATCH] fix editor unit test --- src/app/components/editor/editor.spec.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/app/components/editor/editor.spec.ts b/src/app/components/editor/editor.spec.ts index 43f4210bc0c..bd16731a8d7 100755 --- a/src/app/components/editor/editor.spec.ts +++ b/src/app/components/editor/editor.spec.ts @@ -1,13 +1,13 @@ -import { TestBed, ComponentFixture } from '@angular/core/testing'; +import { TestBed, ComponentFixture, waitForAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { Editor } from './editor'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; -describe('Editor', () => { +fdescribe('Editor', () => { let editor: Editor; let fixture: ComponentFixture; - beforeEach(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [NoopAnimationsModule], declarations: [Editor] @@ -15,7 +15,7 @@ describe('Editor', () => { fixture = TestBed.createComponent(Editor); editor = fixture.componentInstance; - }); + })); it('should display by default', () => { fixture.detectChanges(); @@ -25,9 +25,7 @@ describe('Editor', () => { }); it('should show value', () => { - editor.value = 'V'; - fixture.detectChanges(); - + editor.writeValue('V'); fixture.detectChanges(); const paragraphEl = fixture.debugElement.query(By.css('.p-editor-content')).nativeElement.children[0].children[0];