Skip to content

Commit

Permalink
fix editor unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
dobanisola-scottlogic committed May 21, 2024
1 parent a2e9bc3 commit 7610ff6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/app/components/editor/editor.spec.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
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<Editor>;

beforeEach(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [NoopAnimationsModule],
declarations: [Editor]
});

fixture = TestBed.createComponent(Editor);
editor = fixture.componentInstance;
});
}));

it('should display by default', () => {
fixture.detectChanges();
Expand All @@ -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];
Expand Down

0 comments on commit 7610ff6

Please sign in to comment.