mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-01 14:41:32 +00:00
Add test to ensure that file name is present in unsupported dialog
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<section class="section--center mdl-grid mdl-grid--no-spacing">
|
||||
<div class="viewer-margin mdl-card mdl-cell mdl-cell--9-col-desktop mdl-cell--6-col-tablet mdl-cell--4-col-phone mdl-shadow--2dp">
|
||||
<div class="viewer-download-text mdl-card__supporting-text">
|
||||
<h4>File {{nameFile}} is an unsupported format</h4>
|
||||
<h4>File <span>{{nameFile}}</span> is an unsupported format</h4>
|
||||
</div>
|
||||
<div class="center-element mdl-card__actions">
|
||||
<button id="viewer-download-button" class="viewer-margin center-element mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" (click)="download()">
|
||||
|
@@ -32,5 +32,18 @@ describe('Not Supported Format View', () => {
|
||||
expect(element.querySelector('#viewer-download-button')).not.toBeNull();
|
||||
});
|
||||
}));
|
||||
it('should display the name of the file', injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
|
||||
return tcb
|
||||
.createAsync(NotSupportedFormat)
|
||||
.then((fixture) => {
|
||||
let element = fixture.nativeElement;
|
||||
let component = fixture.componentInstance;
|
||||
component.nameFile = 'Example Content.xls';
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(element.querySelector('h4 span').innerHTML).toEqual('Example Content.xls');
|
||||
});
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user