mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5378] ADF Previewer: Image Rotate + Save (#6958)
* updates including cropperJS * update on rotation + unit tests * small fix * hide toolbar on save * remove unused & duplicate method * added readonly & prettier code * include readOnly mode to hide/show media management actions * updated dependencies * fix emit spy * ADF-5378: Fix failing e2es * Fix comments for unit tests * ADF-5378: Removed obsolete buttons from e2e Co-authored-by: kristian <kristian.dimitrov@alfresco.com> Co-authored-by: adomi <ardit.domi@alfresco.com>
This commit is contained in:
@@ -960,6 +960,15 @@ describe('ViewerComponent', () => {
|
||||
|
||||
component.ngOnChanges();
|
||||
});
|
||||
|
||||
it('should emit new blob when emitted by image-viewer ', () => {
|
||||
spyOn(component.fileSubmit, 'emit');
|
||||
const data = atob('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==');
|
||||
const fakeBlob = new Blob([data], { type: 'image/png' });
|
||||
component.onSubmitFile(fakeBlob);
|
||||
|
||||
expect(component.fileSubmit.emit).toHaveBeenCalledWith(fakeBlob);
|
||||
});
|
||||
});
|
||||
|
||||
describe('display name property override by urlFile', () => {
|
||||
|
Reference in New Issue
Block a user