mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-4862] Upload dialog - reading order (#5045)
* dialog container accessibility * upload container aria label translation key * focus on active upload dialog * test * add back removed aria-label
This commit is contained in:
committed by
Eugenio Romano
parent
19a17ca6e6
commit
df0bb75324
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { EventEmitter } from '@angular/core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing';
|
||||
import {
|
||||
FileModel, FileUploadCompleteEvent, FileUploadErrorEvent, UploadService, setupTestBed, CoreModule, AlfrescoApiService, AlfrescoApiServiceMock, UserPreferencesService
|
||||
} from '@alfresco/adf-core';
|
||||
@@ -78,6 +78,16 @@ describe('FileUploadingDialogComponent', () => {
|
||||
expect(component.isDialogActive).toBe(true);
|
||||
});
|
||||
|
||||
it('should focus on dialog when uploading file', fakeAsync(() => {
|
||||
uploadService.addToQueue(...fileList);
|
||||
uploadService.uploadFilesInTheQueue(emitter);
|
||||
|
||||
fixture.detectChanges();
|
||||
tick(100);
|
||||
|
||||
expect(document.activeElement.id).toBe('upload-dialog');
|
||||
}));
|
||||
|
||||
it('should update uploading file list', () => {
|
||||
uploadService.addToQueue(...fileList);
|
||||
uploadService.uploadFilesInTheQueue(emitter);
|
||||
|
Reference in New Issue
Block a user