mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
Remove dead code from the e2e (#3542)
* cleanup dead code * cleanup dead code * cleanup dead code * cleanup dead code * cleanup dead code * cleanup dead code
This commit is contained in:
@@ -23,9 +23,8 @@
|
||||
*/
|
||||
|
||||
import { Logger } from '@alfresco/adf-testing';
|
||||
import { AlfrescoApi, Comment, CommentsApi, NodesApi, TrashcanApi, SitesApi, SharedlinksApi, SiteEntry } from '@alfresco/js-api';
|
||||
import { AlfrescoApi, Comment, CommentsApi, NodesApi, TrashcanApi, SitesApi, SharedlinksApi } from '@alfresco/js-api';
|
||||
import { browser } from 'protractor';
|
||||
import { SITE_VISIBILITY } from '../configs';
|
||||
import { Utils } from './utils';
|
||||
|
||||
export class UserActions {
|
||||
@@ -62,15 +61,6 @@ export class UserActions {
|
||||
}
|
||||
}
|
||||
|
||||
async logout(): Promise<any> {
|
||||
try {
|
||||
await this.alfrescoApi.login(this.username, this.password);
|
||||
return this.alfrescoApi.logout();
|
||||
} catch (error) {
|
||||
this.handleError('User Actions - logout failed : ', error);
|
||||
}
|
||||
}
|
||||
|
||||
async createComment(nodeId: string, content: string): Promise<Comment | null> {
|
||||
try {
|
||||
const comment = await this.commentsApi.createComment(nodeId, { content });
|
||||
@@ -180,32 +170,6 @@ export class UserActions {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create multiple sites
|
||||
* @param siteNames The list of the site names
|
||||
* @param visibility Default site visibility
|
||||
* @returns List of site entries
|
||||
*/
|
||||
async createSites(siteNames: string[], visibility?: string): Promise<SiteEntry[]> {
|
||||
const sites: SiteEntry[] = [];
|
||||
|
||||
try {
|
||||
if (siteNames && siteNames.length > 0) {
|
||||
for (const siteName of siteNames) {
|
||||
const site = await this.sitesApi.createSite({
|
||||
title: siteName,
|
||||
visibility: visibility || SITE_VISIBILITY.PUBLIC,
|
||||
id: siteName
|
||||
});
|
||||
sites.push(site);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
this.handleError(`User Actions - createSites failed : `, error);
|
||||
}
|
||||
return sites;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete multiple sites/libraries.
|
||||
* @param siteIds The list of the site/library IDs to delete.
|
||||
|
Reference in New Issue
Block a user