Skip to content
Snippets Groups Projects
Verified Commit 2281cc0e authored by Sebastian Bergandy's avatar Sebastian Bergandy :keyboard:
Browse files

Fix unit test

parent 2e1bc67d
No related branches found
No related tags found
1 merge request!66Fix change detection on validation
...@@ -56,7 +56,7 @@ describe('CheckboxEditorComponent', () => { ...@@ -56,7 +56,7 @@ describe('CheckboxEditorComponent', () => {
describe('hasError', () => { describe('hasError', () => {
it('should return true', () => { it('should return true', () => {
component.fieldControl.setErrors({ 1: createInvalidParam() }); component.fieldControl.setErrors({ 1: createInvalidParam() });
component._updateInvalidParams();
const result: boolean = component.hasError; const result: boolean = component.hasError;
expect(result).toBe(true); expect(result).toBe(true);
...@@ -76,6 +76,7 @@ describe('CheckboxEditorComponent', () => { ...@@ -76,6 +76,7 @@ describe('CheckboxEditorComponent', () => {
describe('error message', () => { describe('error message', () => {
it('should show', () => { it('should show', () => {
component.fieldControl.setErrors({ 1: createInvalidParam() }); component.fieldControl.setErrors({ 1: createInvalidParam() });
component._updateInvalidParams();
fixture.detectChanges(); fixture.detectChanges();
const element: HTMLElement = getElementFromFixture(fixture, errorMessageId); const element: HTMLElement = getElementFromFixture(fixture, errorMessageId);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment