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:
Denys Vuika
2023-11-28 16:00:00 +00:00
committed by GitHub
parent 53931b0d27
commit 8aaca5f693
29 changed files with 9 additions and 1016 deletions

View File

@@ -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.