mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-01 14:41:32 +00:00
#68 url file is a mandatory attribute
This commit is contained in:
@@ -36,13 +36,13 @@ describe('Ng2-alfresco-viewer', () => {
|
||||
});
|
||||
}));
|
||||
|
||||
it('shadow overlay shoudl be present if overlay is true', injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
|
||||
it('shadow overlay should be present if overlay is true', injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
|
||||
return tcb
|
||||
.createAsync(ViewerComponent)
|
||||
.then((fixture) => {
|
||||
let element = fixture.nativeElement;
|
||||
let component = fixture.componentInstance;
|
||||
|
||||
component.urlFile = 'fake-url-file';
|
||||
component.overlayMode = true;
|
||||
|
||||
fixture.detectChanges();
|
||||
@@ -90,7 +90,7 @@ describe('Ng2-alfresco-viewer', () => {
|
||||
});
|
||||
}));
|
||||
|
||||
it('Name File should be showed', injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
|
||||
it('Name File should be present', injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
|
||||
return tcb
|
||||
.createAsync(ViewerComponent)
|
||||
.then((fixture) => {
|
||||
@@ -108,4 +108,18 @@ describe('Ng2-alfresco-viewer', () => {
|
||||
});
|
||||
}));
|
||||
});
|
||||
|
||||
describe('Attribute', () => {
|
||||
it('Url File should be mandatory', injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
|
||||
return tcb
|
||||
.createAsync(ViewerComponent)
|
||||
.then((fixture) => {
|
||||
let component = fixture.componentInstance;
|
||||
|
||||
expect(() => {
|
||||
component.urlFile = 'fake-url-file';
|
||||
}).toThrow();
|
||||
});
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user