mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-6423] Add missing account id piece (#10061)
* [ACS-6423] Add missing account id piece * [ACS-6423] Unit tests fixes
This commit is contained in:
@@ -269,7 +269,7 @@ describe('AttachFileWidgetComponent', () => {
|
|||||||
await fixture.whenStable();
|
await fixture.whenStable();
|
||||||
|
|
||||||
fixture.debugElement.query(By.css('#attach-SHAREME')).nativeElement.click();
|
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 () => {
|
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();
|
await fixture.whenStable();
|
||||||
|
|
||||||
fixture.debugElement.query(By.css('#attach-SHAREME')).nativeElement.click();
|
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 () => {
|
it('should be able to upload files coming from content node selector', async () => {
|
||||||
@@ -617,7 +617,7 @@ describe('AttachFileWidgetComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
await fixture.whenStable();
|
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 () => {
|
it('should open fileBrowserDialog if devMode flag is on', async () => {
|
||||||
|
@@ -206,7 +206,7 @@ export class AttachFileWidgetComponent extends UploadWidgetComponent implements
|
|||||||
this.contentDialog.openFileBrowseDialogByDefaultLocation().subscribe((selections: Node[]) => {
|
this.contentDialog.openFileBrowseDialogByDefaultLocation().subscribe((selections: Node[]) => {
|
||||||
if (selections.length) {
|
if (selections.length) {
|
||||||
this.tempFilesList.push(...selections);
|
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) {
|
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) => {
|
this.attachDialogService.openLogin(repository, currentFolderId, accountIdentifier).subscribe((selections) => {
|
||||||
selections.forEach((node) => (node['isExternal'] = true));
|
selections.forEach((node) => (node['isExternal'] = true));
|
||||||
this.tempFilesList.push(...selections);
|
this.tempFilesList.push(...selections);
|
||||||
|
Reference in New Issue
Block a user