Skip to content

Commit

Permalink
[ACS-6423] Add missing account id piece (#10061)
Browse files Browse the repository at this point in the history
* [ACS-6423] Add missing account id piece

* [ACS-6423] Unit tests fixes
  • Loading branch information
MichalKinas authored Aug 9, 2024
1 parent db97f05 commit 834405d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand All @@ -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 () => {
Expand Down Expand Up @@ -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 () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
}
});
}
Expand All @@ -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);
Expand Down

0 comments on commit 834405d

Please sign in to comment.