From 834405d197991297b1a15d46844dc0f2f2f6e91b Mon Sep 17 00:00:00 2001 From: MichalKinas <113341662+MichalKinas@users.noreply.github.com> Date: Fri, 9 Aug 2024 07:49:17 +0200 Subject: [PATCH] [ACS-6423] Add missing account id piece (#10061) * [ACS-6423] Add missing account id piece * [ACS-6423] Unit tests fixes --- .../content-widget/attach-file-widget.component.spec.ts | 6 +++--- .../widgets/content-widget/attach-file-widget.component.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget.component.spec.ts b/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget.component.spec.ts index 36b77fa30d..0f8db079f4 100644 --- a/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget.component.spec.ts +++ b/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget.component.spec.ts @@ -269,7 +269,7 @@ describe('AttachFileWidgetComponent', () => { await fixture.whenStable(); fixture.debugElement.query(By.css('#attach-SHAREME')).nativeElement.click(); - expect(applyAlfrescoNodeSpy).toHaveBeenCalledWith({ ...fakeNode, isLink: true }, undefined, 'alfresco-1000-SHAREME'); + expect(applyAlfrescoNodeSpy).toHaveBeenCalledWith({ ...fakeNode, isLink: true }, undefined, 'alfresco-1000-SHAREMEAlfresco'); }); it('should isLink property of the selected node become false when the widget has link disabled', async () => { @@ -294,7 +294,7 @@ describe('AttachFileWidgetComponent', () => { await fixture.whenStable(); fixture.debugElement.query(By.css('#attach-SHAREME')).nativeElement.click(); - expect(applyAlfrescoNodeSpy).toHaveBeenCalledWith({ ...fakeNode, isLink: false }, undefined, 'alfresco-1000-SHAREME'); + expect(applyAlfrescoNodeSpy).toHaveBeenCalledWith({ ...fakeNode, isLink: false }, undefined, 'alfresco-1000-SHAREMEAlfresco'); }); it('should be able to upload files coming from content node selector', async () => { @@ -617,7 +617,7 @@ describe('AttachFileWidgetComponent', () => { fixture.detectChanges(); await fixture.whenStable(); - expect(openLoginSpy).toHaveBeenCalledWith(fakeRepositoryListAnswer[2], undefined, 'alfresco-2000-external'); + expect(openLoginSpy).toHaveBeenCalledWith(fakeRepositoryListAnswer[2], undefined, 'alfresco-2000-externalAlfresco'); }); it('should open fileBrowserDialog if devMode flag is on', async () => { diff --git a/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget.component.ts b/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget.component.ts index 57b5732c9e..165a2d5e2b 100644 --- a/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget.component.ts +++ b/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget.component.ts @@ -206,7 +206,7 @@ export class AttachFileWidgetComponent extends UploadWidgetComponent implements this.contentDialog.openFileBrowseDialogByDefaultLocation().subscribe((selections: Node[]) => { if (selections.length) { this.tempFilesList.push(...selections); - this.uploadFileFromCS(selections, `alfresco-${repository.id}-${repository.name}`); + this.uploadFileFromCS(selections, `alfresco-${repository.id}-${repository.name}Alfresco`); } }); } @@ -227,7 +227,7 @@ export class AttachFileWidgetComponent extends UploadWidgetComponent implements } private uploadFileFromExternalCS(repository: AlfrescoEndpointRepresentation, currentFolderId?: string) { - const accountIdentifier = `alfresco-${repository.id}-${repository.name}`; + const accountIdentifier = `alfresco-${repository.id}-${repository.name}Alfresco`; this.attachDialogService.openLogin(repository, currentFolderId, accountIdentifier).subscribe((selections) => { selections.forEach((node) => (node['isExternal'] = true)); this.tempFilesList.push(...selections);