diff --git a/projects/rero/ng-core/src/lib/dialog/dialog.component.html b/projects/rero/ng-core/src/lib/dialog/dialog.component.html
deleted file mode 100644
index b8e6de0e..00000000
--- a/projects/rero/ng-core/src/lib/dialog/dialog.component.html
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- @if (config.data.confirmButton) {
-
- }
-
diff --git a/projects/rero/ng-core/src/lib/dialog/dialog.component.spec.ts b/projects/rero/ng-core/src/lib/dialog/dialog.component.spec.ts
index 67674743..31859606 100644
--- a/projects/rero/ng-core/src/lib/dialog/dialog.component.spec.ts
+++ b/projects/rero/ng-core/src/lib/dialog/dialog.component.spec.ts
@@ -19,6 +19,7 @@ import { TranslateModule } from '@ngx-translate/core';
import { DynamicDialogConfig, DynamicDialogModule, DynamicDialogRef } from 'primeng/dynamicdialog';
import { Nl2brPipe } from '../pipe/nl2br.pipe';
import { DialogComponent } from './dialog.component';
+import { ButtonModule } from 'primeng/button';
describe('DialogComponent', () => {
let component: DialogComponent;
@@ -28,6 +29,7 @@ describe('DialogComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
+ ButtonModule,
DynamicDialogModule,
TranslateModule.forRoot()
],
diff --git a/projects/rero/ng-core/src/lib/dialog/dialog.component.ts b/projects/rero/ng-core/src/lib/dialog/dialog.component.ts
index a7dce33d..57c64023 100644
--- a/projects/rero/ng-core/src/lib/dialog/dialog.component.ts
+++ b/projects/rero/ng-core/src/lib/dialog/dialog.component.ts
@@ -17,12 +17,17 @@
import { Component, inject } from '@angular/core';
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
-/**
- * Show dialog modal
- */
@Component({
selector: 'ng-core-dialog',
- templateUrl: './dialog.component.html'
+ template: `
+
+
+ @if (config.data.confirmButton) {
+
+ }
+
+ `
})
export class DialogComponent {
diff --git a/projects/rero/ng-core/src/lib/guard/component-can-deactivate.guard.spec.ts b/projects/rero/ng-core/src/lib/guard/component-can-deactivate.guard.spec.ts
index 74a5c9b3..4fbdc804 100644
--- a/projects/rero/ng-core/src/lib/guard/component-can-deactivate.guard.spec.ts
+++ b/projects/rero/ng-core/src/lib/guard/component-can-deactivate.guard.spec.ts
@@ -17,10 +17,9 @@
import { TestBed } from '@angular/core/testing';
import { TranslateModule } from '@ngx-translate/core';
-import { Observable } from 'rxjs';
+import { DialogService } from 'primeng/dynamicdialog';
import { AbstractCanDeactivateComponent } from '../component/abstract-can-deactivate.component';
import { ComponentCanDeactivateGuard } from './component-can-deactivate.guard';
-import { DialogService } from 'primeng/dynamicdialog';
export class MockComponent extends AbstractCanDeactivateComponent {
canDeactivate: boolean = true;
@@ -52,10 +51,4 @@ describe('ComponentCanDeactivateGuard', () => {
it('should return a boolean if confirmation is not required.', () => {
expect(guard.canDeactivate(component)).toBeTrue();
});
-
- it('should return an observable on a boolean value.', () => {
- component.canDeactivate = false;
- const obs = guard.canDeactivate(component) as Observable