mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
fix test angular2 Final release viewer component #749
This commit is contained in:
@@ -15,24 +15,46 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
import { TestComponentBuilder } from '@angular/compiler/testing';
|
||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { MediaPlayerComponent } from './mediaPlayer.component';
|
||||
import { DebugElement } from '@angular/core';
|
||||
import {
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoApiService,
|
||||
CoreModule
|
||||
} from 'ng2-alfresco-core';
|
||||
|
||||
describe('Media player component ', () => {
|
||||
describe('Test ng2-alfresco-viewer Media player component ', () => {
|
||||
|
||||
let mediaPlayerComponentFixture, element, component;
|
||||
let component: any;
|
||||
let fixture: ComponentFixture<MediaPlayerComponent>;
|
||||
let debug: DebugElement;
|
||||
let element: HTMLElement;
|
||||
|
||||
beforeEach(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
|
||||
return tcb
|
||||
.createAsync(MediaPlayerComponent)
|
||||
.then(fixture => {
|
||||
mediaPlayerComponentFixture = fixture;
|
||||
element = fixture.nativeElement;
|
||||
component = fixture.componentInstance;
|
||||
});
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CoreModule
|
||||
],
|
||||
declarations: [MediaPlayerComponent],
|
||||
providers: [
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoApiService
|
||||
]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(MediaPlayerComponent);
|
||||
|
||||
debug = fixture.debugElement;
|
||||
element = fixture.nativeElement;
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('If no url is passed should thrown an error', () => {
|
||||
expect(() => {
|
||||
component.ngOnChanges();
|
||||
@@ -53,4 +75,3 @@ describe('Media player component ', () => {
|
||||
}).not.toThrow(new Error('Attribute urlFile is required'));
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
Reference in New Issue
Block a user