[AAE-10778] Replace adf-viewer with adf-alfresco-viewer, update escape command to close the viewer

This commit is contained in:
Amedeo Lepore 2022-12-16 10:25:24 +01:00
parent 467143102e
commit 9e8158f4dc

View File

@ -88,7 +88,7 @@ class DummyDialogComponent {
@Component({ @Component({
selector: 'adf-viewer-container-open-with', selector: 'adf-viewer-container-open-with',
template: ` template: `
<adf-viewer> <adf-alfresco-viewer>
<adf-viewer-open-with> <adf-viewer-open-with>
<button mat-menu-item> <button mat-menu-item>
<mat-icon>dialpad</mat-icon> <mat-icon>dialpad</mat-icon>
@ -103,7 +103,7 @@ class DummyDialogComponent {
<span>Option 3</span> <span>Option 3</span>
</button> </button>
</adf-viewer-open-with> </adf-viewer-open-with>
</adf-viewer> </adf-alfresco-viewer>
` `
}) })
class ViewerWithCustomOpenWithComponent { class ViewerWithCustomOpenWithComponent {
@ -112,7 +112,7 @@ class ViewerWithCustomOpenWithComponent {
@Component({ @Component({
selector: 'adf-viewer-container-more-actions', selector: 'adf-viewer-container-more-actions',
template: ` template: `
<adf-viewer> <adf-alfresco-viewer>
<adf-viewer-more-actions> <adf-viewer-more-actions>
<button mat-menu-item> <button mat-menu-item>
<mat-icon>dialpad</mat-icon> <mat-icon>dialpad</mat-icon>
@ -127,7 +127,7 @@ class ViewerWithCustomOpenWithComponent {
<span>Action Three</span> <span>Action Three</span>
</button> </button>
</adf-viewer-more-actions> </adf-viewer-more-actions>
</adf-viewer> </adf-alfresco-viewer>
` `
}) })
class ViewerWithCustomMoreActionsComponent { class ViewerWithCustomMoreActionsComponent {
@ -783,7 +783,7 @@ describe('AlfrescoViewerComponent', () => {
const dialogRef = dialog.open(DummyDialogComponent); const dialogRef = dialog.open(DummyDialogComponent);
dialogRef.afterClosed().subscribe(() => { dialogRef.afterClosed().subscribe(() => {
document.body.dispatchEvent(event); EventMock.keyDown(27);
fixture.detectChanges(); fixture.detectChanges();
expect(element.querySelector('.adf-alfresco-viewer-content')).toBeNull(); expect(element.querySelector('.adf-alfresco-viewer-content')).toBeNull();
done(); done();