mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +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
@@ -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