mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[AAE-3507] ADF - Change default destination folder alias -root- to -my- (#6126)
* [AAE-3507] ADF - Change default destination folder alias -root- to -my- * * After rebase
This commit is contained in:
@@ -368,8 +368,8 @@ describe('AttachFileCloudWidgetComponent', () => {
|
|||||||
await fixture.whenStable();
|
await fixture.whenStable();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expect(widget.rootNodeId).toEqual('-root-');
|
expect(widget.rootNodeId).toEqual('-my-');
|
||||||
expect(openUploadFileDialogSpy).toHaveBeenCalledWith('-root-', 'multiple', true);
|
expect(openUploadFileDialogSpy).toHaveBeenCalledWith('-my-', 'multiple', true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should be able to set default alias as rootNodeId if destinationFolderPath does not have alias', async () => {
|
it('Should be able to set default alias as rootNodeId if destinationFolderPath does not have alias', async () => {
|
||||||
@@ -390,8 +390,8 @@ describe('AttachFileCloudWidgetComponent', () => {
|
|||||||
await fixture.whenStable();
|
await fixture.whenStable();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expect(widget.rootNodeId).toEqual('-root-');
|
expect(widget.rootNodeId).toEqual('-my-');
|
||||||
expect(openUploadFileDialogSpy).toHaveBeenCalledWith('-root-', 'multiple', true);
|
expect(openUploadFileDialogSpy).toHaveBeenCalledWith('-my-', 'multiple', true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return the application name in case -appname- placeholder is present', async() => {
|
it('should return the application name in case -appname- placeholder is present', async() => {
|
||||||
@@ -450,8 +450,8 @@ describe('AttachFileCloudWidgetComponent', () => {
|
|||||||
await fixture.whenStable();
|
await fixture.whenStable();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expect(widget.rootNodeId).toEqual('-root-');
|
expect(widget.rootNodeId).toEqual('-my-');
|
||||||
expect(openUploadFileDialogSpy).toHaveBeenCalledWith('-root-', 'single', true);
|
expect(openUploadFileDialogSpy).toHaveBeenCalledWith('-my-', 'single', true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should display tooltip when tooltip is set', async(() => {
|
it('should display tooltip when tooltip is set', async(() => {
|
||||||
|
@@ -52,13 +52,12 @@ import { DestinationFolderPathModel } from '../../../models/form-cloud-represent
|
|||||||
})
|
})
|
||||||
export class AttachFileCloudWidgetComponent extends UploadCloudWidgetComponent implements OnInit {
|
export class AttachFileCloudWidgetComponent extends UploadCloudWidgetComponent implements OnInit {
|
||||||
|
|
||||||
static MY_FILES_FOLDER_ID = '-my-';
|
static ALIAS_USER_FOLDER = '-my-';
|
||||||
static ROOT_FOLDER_ID = '-root-';
|
|
||||||
static APP_NAME = '-appname-';
|
static APP_NAME = '-appname-';
|
||||||
static VALID_ALIAS = [AttachFileCloudWidgetComponent.ROOT_FOLDER_ID, AttachFileCloudWidgetComponent.MY_FILES_FOLDER_ID, '-shared-'];
|
static VALID_ALIAS = ['-root-', AttachFileCloudWidgetComponent.ALIAS_USER_FOLDER, '-shared-'];
|
||||||
|
|
||||||
typeId = 'AttachFileCloudWidgetComponent';
|
typeId = 'AttachFileCloudWidgetComponent';
|
||||||
rootNodeId = AttachFileCloudWidgetComponent.MY_FILES_FOLDER_ID;
|
rootNodeId = AttachFileCloudWidgetComponent.ALIAS_USER_FOLDER;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
formService: FormService,
|
formService: FormService,
|
||||||
@@ -133,7 +132,7 @@ export class AttachFileCloudWidgetComponent extends UploadCloudWidgetComponent i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.isValidAlias(alias) ? { alias, path } : { alias: AttachFileCloudWidgetComponent.ROOT_FOLDER_ID, path: undefined };
|
return this.isValidAlias(alias) ? { alias, path } : { alias: AttachFileCloudWidgetComponent.ALIAS_USER_FOLDER, path: undefined };
|
||||||
}
|
}
|
||||||
|
|
||||||
removeExistingSelection(selections: Node[]) {
|
removeExistingSelection(selections: Node[]) {
|
||||||
|
Reference in New Issue
Block a user