Skip to content

Commit

Permalink
fix FolderEditDirective unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikiwanekhyland authored and VitoAlbano committed May 10, 2024
1 parent 25b7c96 commit 6c4f6b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('FolderEditDirective', () => {

beforeEach(() => {
TestBed.configureTestingModule({
imports: [ContentTestingModule],
imports: [ContentTestingModule, FolderEditDirective],
declarations: [TestComponent]
});
fixture = TestBed.createComponent(TestComponent);
Expand All @@ -69,8 +69,7 @@ describe('FolderEditDirective', () => {

spyOn(dialog, 'open').and.returnValue(dialogRefMock);
});
// eslint-disable-next-line
xit('should not emit folderEdit event when input value is undefined', async () => {
it('should not emit folderEdit event when input value is undefined', async () => {
spyOn(dialogRefMock, 'afterClosed').and.returnValue(of(null));
spyOn(contentService.folderEdit, 'next');

Expand All @@ -81,8 +80,7 @@ describe('FolderEditDirective', () => {
expect(contentService.folderEdit.next).not.toHaveBeenCalled();
});

// eslint-disable-next-line
xit('should emit success event with node if the folder creation was successful', async () => {
it('should emit success event with node if the folder creation was successful', async () => {
fixture.detectChanges();
const testNode: any = {};

Expand All @@ -93,8 +91,7 @@ describe('FolderEditDirective', () => {
await fixture.whenStable();
expect(fixture.componentInstance.successParameter).toBe(testNode);
});
// eslint-disable-next-line
xit('should open the dialog with the proper title', async () => {
it('should open the dialog with the proper title', async () => {
fixture.detectChanges();
element.triggerEventHandler('click', event);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import { ContentService } from '../common/services/content.service';
const DIALOG_WIDTH: number = 400;

@Directive({
selector: '[adf-edit-folder]'
selector: '[adf-edit-folder]',
standalone: true
})
export class FolderEditDirective {
/** Folder node to edit. */
Expand Down

0 comments on commit 6c4f6b5

Please sign in to comment.