mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4410] Upload dialog - remove delete action of version upload (#4618)
* undo remove node version implementation * clean up style * version upload row style * upload version row cells * update tests * fix aria label
This commit is contained in:
committed by
Eugenio Romano
parent
7826eea946
commit
cc53d96698
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { FileModel, CoreModule, FileUploadOptions } from '@alfresco/adf-core';
|
||||
import { FileModel, CoreModule, FileUploadOptions, FileUploadStatus } from '@alfresco/adf-core';
|
||||
import { UploadModule } from '../upload.module';
|
||||
import { FileUploadingListRowComponent } from './file-uploading-list-row.component';
|
||||
|
||||
@@ -70,4 +70,18 @@ describe('FileUploadingListRowComponent', () => {
|
||||
'.adf-file-uploading-row__version'
|
||||
).textContent).toContain('1');
|
||||
});
|
||||
|
||||
it('should not emit remove event on a version file', () => {
|
||||
spyOn(component.remove, 'emit');
|
||||
component.file = new FileModel(<File> { name: 'fake-name' });
|
||||
component.file.options = <FileUploadOptions> { newVersion: true };
|
||||
component.file.data = { entry: { properties: { 'cm:versionLabel': '1' } } };
|
||||
component.file.status = FileUploadStatus.Complete;
|
||||
|
||||
fixture.detectChanges();
|
||||
const uploadCompleteIcon = document.querySelector('.adf-file-uploading-row__file-version .adf-file-uploading-row__status--done');
|
||||
uploadCompleteIcon.dispatchEvent(new MouseEvent('click'));
|
||||
|
||||
expect(component.remove.emit).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user