mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4953] Uploader - confirmation dialog actions should return focus to the upload dialog (#5148)
* trap confirmation dialog * focus dialog when not in confirmation state * test
This commit is contained in:
committed by
Eugenio Romano
parent
b1bccdb0e3
commit
1d7ef62095
@@ -164,6 +164,26 @@ describe('FileUploadingDialogComponent', () => {
|
||||
|
||||
expect(component.isDialogMinimized).toBe(false);
|
||||
});
|
||||
|
||||
it('should focus on dialog when coming from confirmation', fakeAsync(() => {
|
||||
uploadService.addToQueue(...fileList);
|
||||
uploadService.uploadFilesInTheQueue(emitter);
|
||||
|
||||
fixture.detectChanges();
|
||||
tick(100);
|
||||
|
||||
component.toggleConfirmation();
|
||||
fixture.detectChanges();
|
||||
tick(100);
|
||||
|
||||
expect(document.activeElement.id).not.toBe('upload-dialog');
|
||||
|
||||
component.toggleConfirmation();
|
||||
fixture.detectChanges();
|
||||
tick(100);
|
||||
|
||||
expect(document.activeElement.id).toBe('upload-dialog');
|
||||
}));
|
||||
});
|
||||
|
||||
describe('cancelAllUploads()', () => {
|
||||
|
Reference in New Issue
Block a user