Skip to content

Commit

Permalink
feat(editor-content): fix unit tests #29872
Browse files Browse the repository at this point in the history
  • Loading branch information
nicobytes committed Sep 26, 2024
1 parent d84ea81 commit 4cbbfbb
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { DotEditContentCategoryFieldComponent } from '../../fields/dot-edit-cont
import { DotEditContentCheckboxFieldComponent } from '../../fields/dot-edit-content-checkbox-field/dot-edit-content-checkbox-field.component';
import { DotEditContentCustomFieldComponent } from '../../fields/dot-edit-content-custom-field/dot-edit-content-custom-field.component';
import { DotEditContentFileFieldComponent } from '../../fields/dot-edit-content-file-field/dot-edit-content-file-field.component';
import { DotFileFieldUploadService } from '../../fields/dot-edit-content-file-field/services/upload-file/upload-file.service';
import { DotEditContentHostFolderFieldComponent } from '../../fields/dot-edit-content-host-folder-field/dot-edit-content-host-folder-field.component';
import { DotEditContentJsonFieldComponent } from '../../fields/dot-edit-content-json-field/dot-edit-content-json-field.component';
import { DotEditContentKeyValueComponent } from '../../fields/dot-edit-content-key-value/dot-edit-content-key-value.component';
Expand Down Expand Up @@ -70,8 +71,20 @@ declare module '@tiptap/core' {
const FIELD_TYPES_COMPONENTS: Record<FIELD_TYPES, Type<unknown> | DotEditFieldTestBed> = {
// We had to use unknown because components have different types.
[FIELD_TYPES.TEXT]: DotEditContentTextFieldComponent,
[FIELD_TYPES.FILE]: DotEditContentFileFieldComponent,
[FIELD_TYPES.IMAGE]: DotEditContentFileFieldComponent,
[FIELD_TYPES.FILE]: {
component: DotEditContentFileFieldComponent,
providers: [{
provide: DotFileFieldUploadService,
useValue: {}
}],
},
[FIELD_TYPES.IMAGE]: {
component: DotEditContentFileFieldComponent,
providers: [{
provide: DotFileFieldUploadService,
useValue: {}
}],
},
[FIELD_TYPES.TEXTAREA]: DotEditContentTextAreaComponent,
[FIELD_TYPES.SELECT]: DotEditContentSelectFieldComponent,
[FIELD_TYPES.RADIO]: DotEditContentRadioFieldComponent,
Expand Down

0 comments on commit 4cbbfbb

Please sign in to comment.