mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
remove duplication
This commit is contained in:
committed by
Eugenio Romano
parent
cfa8a222f0
commit
b639cf38b2
@@ -29,12 +29,6 @@ enum LoginSteps {
|
||||
Welcome = 2
|
||||
}
|
||||
|
||||
enum LoginSteps {
|
||||
Landing = 0,
|
||||
Checking = 1,
|
||||
Welcome = 2
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'adf-login, alfresco-login',
|
||||
templateUrl: './login.component.html',
|
||||
|
@@ -285,47 +285,5 @@ describe('NotSupportedFormatComponent', () => {
|
||||
expect(element.querySelector('#pdf-rendition-viewer')).not.toBeNull('Pdf rendition should be shown.');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Conversion', () => {
|
||||
|
||||
function clickOnConvertButton() {
|
||||
renditionSubject.next({ entry: { status: 'NOT_CREATED' } });
|
||||
fixture.detectChanges();
|
||||
|
||||
let convertButton: any = element.querySelector('#viewer-convert-button');
|
||||
convertButton.click();
|
||||
fixture.detectChanges();
|
||||
}
|
||||
|
||||
it('should show loading spinner and disable the "Convert to PDF button" after the button was clicked', () => {
|
||||
clickOnConvertButton();
|
||||
|
||||
let convertButton: any = element.querySelector('#viewer-convert-button');
|
||||
expect(element.querySelector('#conversion-spinner')).not.toBeNull('Conversion spinner should be shown');
|
||||
expect(convertButton.disabled).toBe(true);
|
||||
});
|
||||
|
||||
it('should re-enable the "Convert to PDF button" and hide spinner after unsuccessful conversion and hide loading spinner', () => {
|
||||
clickOnConvertButton();
|
||||
|
||||
conversionSubject.error(new Error());
|
||||
fixture.detectChanges();
|
||||
|
||||
let convertButton: any = element.querySelector('#viewer-convert-button');
|
||||
expect(element.querySelector('#conversion-spinner')).toBeNull('Conversion spinner should be shown');
|
||||
expect(convertButton.disabled).toBe(false);
|
||||
});
|
||||
|
||||
it('should show the pdf rendition after successful conversion', () => {
|
||||
clickOnConvertButton();
|
||||
|
||||
conversionSubject.next();
|
||||
conversionSubject.complete();
|
||||
fixture.detectChanges();
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(element.querySelector('#pdf-rendition-viewer')).not.toBeNull('Pdf rendition should be shown.');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user