mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Merge pull request #688 from Alfresco/dev-eromano-511
not show viewer for not supported video formats
This commit is contained in:
@@ -53,7 +53,6 @@ describe('ViewerComponent', () => {
|
||||
jasmine.Ajax.install();
|
||||
|
||||
component.urlFile = 'base/src/assets/fake-test-file.pdf';
|
||||
|
||||
component.overlayMode = true;
|
||||
|
||||
viewerComponentFixture.detectChanges();
|
||||
@@ -124,7 +123,7 @@ describe('ViewerComponent', () => {
|
||||
expect(element.querySelector('#viewer-close-button')).toBeNull();
|
||||
});
|
||||
|
||||
it('Esc button should not hide the viewerls if is not overlay mode', () => {
|
||||
it('Esc button should not hide the viewer if is not overlay mode', () => {
|
||||
EventMock.keyDown(27);
|
||||
viewerComponentFixture.detectChanges();
|
||||
expect(element.querySelector('#viewer-main-container')).not.toBeNull();
|
||||
@@ -284,6 +283,7 @@ describe('ViewerComponent', () => {
|
||||
|
||||
component.ngOnChanges().then(() => {
|
||||
viewerComponentFixture.detectChanges();
|
||||
console.log(element.querySelector('media-player'));
|
||||
expect(element.querySelector('media-player')).not.toBeNull();
|
||||
done();
|
||||
});
|
||||
@@ -299,5 +299,16 @@ describe('ViewerComponent', () => {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should not display the media player if the file identified by mimetype is a media but with not supported extension', (done) => {
|
||||
component.urlFile = 'content';
|
||||
component.mimeType = 'video/avi';
|
||||
|
||||
component.ngOnChanges().then(() => {
|
||||
viewerComponentFixture.detectChanges();
|
||||
expect(element.querySelector('media-player')).toBeNull();
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user