mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-5118] Enable E2E (#5628)
* Enable E2E 1. C305010 2. C311290 3. C317658 * * improved e2e * * minor changes * * upload fixed * improve e2e Co-authored-by: Eugenio Romano <eugenio.romano@alfresco.com>
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
|
||||
import { ApiService } from '../api.service';
|
||||
import { StringUtil } from '../../utils/string.util';
|
||||
import { ApiUtil } from '../../structure/api.util';
|
||||
import { Logger } from '../../utils/logger';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
export class GroupIdentityService {
|
||||
@@ -58,12 +60,24 @@ export class GroupIdentityService {
|
||||
}
|
||||
|
||||
async getGroupInfoByGroupName(groupName: string): Promise<any> {
|
||||
const path = `/groups`;
|
||||
const method = 'GET';
|
||||
const queryParams = { search: groupName }, postBody = {};
|
||||
const predicate = (result: any) => {
|
||||
return !!result;
|
||||
};
|
||||
|
||||
const data = await this.api.performIdentityOperation(path, method, queryParams, postBody);
|
||||
return data[0];
|
||||
const apiCall = async () => {
|
||||
try {
|
||||
const path = `/groups`;
|
||||
const method = 'GET';
|
||||
const queryParams = { search: groupName }, postBody = {};
|
||||
|
||||
const data = await this.api.performIdentityOperation(path, method, queryParams, postBody);
|
||||
return data[0];
|
||||
} catch (error) {
|
||||
Logger.error('Group not found');
|
||||
}
|
||||
};
|
||||
|
||||
return ApiUtil.waitForApi(apiCall, predicate);
|
||||
}
|
||||
|
||||
async assignRole(groupId: string, roleId: string, roleName: string): Promise<any> {
|
||||
|
@@ -189,4 +189,14 @@ export class EditProcessFilterCloudComponentPage {
|
||||
await BrowserActions.click(this.saveButton);
|
||||
}
|
||||
|
||||
async setFilter({ name = '', status = '', sort = '', order = '', initiator = '', processName = '' }): Promise<void> {
|
||||
await this.openFilter();
|
||||
if (name) { await this.setProcessName(name); }
|
||||
if (status) { await this.setStatusFilterDropDown(status); }
|
||||
if (sort) { await this.setSortFilterDropDown(sort); }
|
||||
if (order) { await this.setOrderFilterDropDown(order); }
|
||||
if (initiator) { await this.setProperty('initiator', initiator); }
|
||||
if (processName) { await this.setProcessName(processName); }
|
||||
await this.openFilter();
|
||||
}
|
||||
}
|
||||
|
@@ -20,14 +20,14 @@ import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
|
||||
export class ProcessHeaderCloudPage {
|
||||
|
||||
idField: ElementFinder = element.all(by.css('span[data-automation-id*="id"] span')).first();
|
||||
nameField: ElementFinder = element.all(by.css('span[data-automation-id*="name"] span')).first();
|
||||
statusField: ElementFinder = element(by.css('span[data-automation-id*="status"] span'));
|
||||
initiatorField: ElementFinder = element(by.css('span[data-automation-id*="initiator"] span'));
|
||||
startDateField: ElementFinder = element.all(by.css('span[data-automation-id*="startDate"] span')).first();
|
||||
lastModifiedField: ElementFinder = element.all(by.css('span[data-automation-id*="lastModified"] span')).first();
|
||||
parentIdField: ElementFinder = element(by.css('span[data-automation-id*="parentId"] span'));
|
||||
businessKeyField: ElementFinder = element.all(by.css('span[data-automation-id*="businessKey"] span')).first();
|
||||
idField: ElementFinder = element.all(by.css('span[data-automation-id*="id"] span span')).first();
|
||||
nameField: ElementFinder = element.all(by.css('span[data-automation-id*="name"] span span')).first();
|
||||
statusField: ElementFinder = element(by.css('span[data-automation-id*="status"] span span'));
|
||||
initiatorField: ElementFinder = element(by.css('span[data-automation-id*="initiator"] span span'));
|
||||
startDateField: ElementFinder = element.all(by.css('span[data-automation-id*="startDate"] span span')).first();
|
||||
lastModifiedField: ElementFinder = element.all(by.css('span[data-automation-id*="lastModified"] span span')).first();
|
||||
parentIdField: ElementFinder = element(by.css('span[data-automation-id*="parentId"] span span'));
|
||||
businessKeyField: ElementFinder = element.all(by.css('span[data-automation-id*="businessKey"] span span')).first();
|
||||
|
||||
async getId(): Promise<string> {
|
||||
return BrowserActions.getText(this.idField);
|
||||
|
Reference in New Issue
Block a user