mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-1799] add tests for share file (#727)
* initial work * shared link created through API * add tests for share file on all list views * remove utc for end of day * remove hours and minutes * update unit test * workaround * update docker settings for tomcat * tomcat setup for e2e
This commit is contained in:
committed by
Denys Vuika
parent
9012c0832b
commit
30b445dde9
@@ -54,6 +54,10 @@ export class NodesApi extends RepoApi {
|
||||
return (await this.getNodeByPath(`${relativePath}`)).entry.properties['cm:description'];
|
||||
}
|
||||
|
||||
async getNodeProperty(nodeId: string, property: string) {
|
||||
return (await this.getNodeById(nodeId)).entry.properties[property];
|
||||
}
|
||||
|
||||
async deleteNodeById(id: string, permanent: boolean = true) {
|
||||
await this.apiAuth();
|
||||
return await this.alfrescoJsApi.core.nodesApi.deleteNode(id, { permanent });
|
||||
|
@@ -32,10 +32,17 @@ export class SharedLinksApi extends RepoApi {
|
||||
super(username, password);
|
||||
}
|
||||
|
||||
async shareFileById(id: string) {
|
||||
async shareFileById(id: string, expireDate?: Date) {
|
||||
try {
|
||||
await this.apiAuth();
|
||||
const data = { nodeId: id };
|
||||
return await this.alfrescoJsApi.core.sharedlinksApi.addSharedLink(data);
|
||||
const data = {
|
||||
nodeId: id,
|
||||
expiresAt: expireDate
|
||||
};
|
||||
return await this.alfrescoJsApi.core.sharedlinksApi.addSharedLink(data);
|
||||
} catch (error) {
|
||||
console.log('---- shareFileById error: ', error);
|
||||
}
|
||||
}
|
||||
|
||||
async shareFilesByIds(ids: string[]) {
|
||||
|
Reference in New Issue
Block a user