mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-259] refactor login page (#5733)
* refator login page * refator login page * remove obsolete classes and move what is needed in the test pck * fix const * revert modify * remove duplicate browser property * fix build * fix * fix * fix lint * move drop action in testing remove not necessary space js-api centralize content * first refactor use js-api * fix protractor * refactor test config * simplify properties fix namings * ps cloud simplify remove unused js files * id fix * fix search test simplify environment var step 1 * fix lint * first user iteration fix * fix model * unify use of apiService * first step automatic user creation Identity * refactor creation user content-services * refactor creation user search * refactor creation user core * process service refactoring 1 * process service refactoring 1 * process service refactoring 2 * fix process * appconfig * fix process util * fix gallery * fix "this" reference issues * fix incorrect import paths * fix core * some fixes * allign * fix some test remove structure folder and move in actions * fixes * move folders in the right place * fix * fix rebase * solve build issue * fix e2e * change init aae * order api and some fixes * fix possible not valid password * fix some ps test * replace host port also in objects * Update app-config.service.ts * fix process * fix process test * process service cloud fix * fiexs * modify init script * fix two test * remove unused property * host issue * not use npx * fix ps cloud test Co-authored-by: Denys Vuika <denys.vuika@gmail.com>
This commit is contained in:
@@ -25,7 +25,6 @@ import {
|
||||
StartTasksCloudPage,
|
||||
ApiService,
|
||||
IdentityService,
|
||||
SettingsPage,
|
||||
GroupIdentityService,
|
||||
TaskFormCloudComponent,
|
||||
LocalStorageUtil,
|
||||
@@ -43,8 +42,6 @@ import { StartProcessCloudConfiguration } from './config/start-process-cloud.con
|
||||
import { ProcessCloudDemoPage } from '../pages/adf/demo-shell/process-services/process-cloud-demo.page';
|
||||
import { ProcessDetailsCloudDemoPage } from '../pages/adf/demo-shell/process-services-cloud/process-details-cloud-demo.page';
|
||||
import { FileModel } from '../models/ACS/file.model';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AcsUserModel } from '../models/ACS/acs-user.model';
|
||||
import { BreadCrumbDropdownPage } from '../pages/adf/content-services/breadcrumb/bread-crumb-dropdown.page';
|
||||
|
||||
describe('Start Task Form', () => {
|
||||
@@ -58,28 +55,23 @@ describe('Start Task Form', () => {
|
||||
const contentNodeSelectorDialogPage = new ContentNodeSelectorDialogPage();
|
||||
const breadCrumbDropdownPage = new BreadCrumbDropdownPage();
|
||||
const processDetailsCloudDemoPage = new ProcessDetailsCloudDemoPage();
|
||||
const settingsPage = new SettingsPage();
|
||||
const widget = new ProcessCloudWidgetPage();
|
||||
const startProcessPage = new StartProcessCloudPage();
|
||||
const processCloudDemoPage = new ProcessCloudDemoPage();
|
||||
const taskHeaderCloudPage = new TaskHeaderCloudPage();
|
||||
const processHeaderCloud = new ProcessHeaderCloudPage();
|
||||
const apiService = new ApiService(
|
||||
browser.params.config.oauth2.clientId,
|
||||
browser.params.config.bpmHost, browser.params.config.oauth2.host, browser.params.config.providers
|
||||
);
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.config.bpmHost
|
||||
});
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
|
||||
const apiService = new ApiService();
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const identityService = new IdentityService(apiService);
|
||||
const groupIdentityService = new GroupIdentityService(apiService);
|
||||
|
||||
const startProcessCloudConfiguration = new StartProcessCloudConfiguration();
|
||||
const startProcessCloudConfig = startProcessCloudConfiguration.getConfiguration();
|
||||
|
||||
const standaloneTaskName = StringUtil.generateRandomString(5);
|
||||
const startEventFormProcess = StringUtil.generateRandomString(5);
|
||||
let testUser, acsUser, groupInfo;
|
||||
let testUser, groupInfo;
|
||||
let processDefinitionService: ProcessDefinitionsService;
|
||||
let processInstancesService: ProcessInstancesService;
|
||||
let processDefinition, uploadLocalFileProcess, uploadContentFileProcess, uploadDefaultFileProcess,
|
||||
@@ -95,17 +87,13 @@ describe('Start Task Form', () => {
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_path
|
||||
});
|
||||
|
||||
let identityService: IdentityService;
|
||||
let groupIdentityService: GroupIdentityService;
|
||||
const folderName = StringUtil.generateRandomString(5);
|
||||
let uploadedFolder;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||
|
||||
identityService = new IdentityService(apiService);
|
||||
groupIdentityService = new GroupIdentityService(apiService);
|
||||
testUser = await identityService.createIdentityUserWithRole(apiService, [identityService.ROLES.ACTIVITI_USER]);
|
||||
testUser = await identityService.createIdentityUserWithRole( [identityService.ROLES.ACTIVITI_USER]);
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
@@ -147,30 +135,12 @@ describe('Start Task Form', () => {
|
||||
'businessKey': StringUtil.generateRandomString()
|
||||
});
|
||||
|
||||
acsUser = await new AcsUserModel({
|
||||
email: testUser.email,
|
||||
password: testUser.password,
|
||||
id: testUser.username,
|
||||
firstName: testUser.firstName,
|
||||
lastName: testUser.lastName
|
||||
});
|
||||
await this.alfrescoJsApi.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
await apiService.getInstance().login(testUser.email, testUser.password);
|
||||
uploadedFolder = await uploadActions.createFolder(folderName, '-my-');
|
||||
await uploadActions.uploadFile(testFileModel.location, testFileModel.name, uploadedFolder.entry.id);
|
||||
await uploadActions.uploadFile(pdfFileModel.location, pdfFileModel.name, uploadedFolder.entry.id);
|
||||
|
||||
await settingsPage.setProviderEcmBpmSso(
|
||||
browser.params.config.bpmHost,
|
||||
browser.params.config.bpmHost,
|
||||
browser.params.config.oauth2.host,
|
||||
browser.params.config.identityHost,
|
||||
browser.params.config.oauth2.clientId,
|
||||
false);
|
||||
await loginSSOPage.clickOnSSOButton();
|
||||
|
||||
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await LocalStorageUtil.setConfigField('adf-cloud-start-process', JSON.stringify(startProcessCloudConfig));
|
||||
});
|
||||
|
||||
@@ -186,7 +156,6 @@ describe('Start Task Form', () => {
|
||||
});
|
||||
|
||||
describe('StandaloneTask with form', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
await appListCloudComponent.checkApsContainer();
|
||||
@@ -238,7 +207,6 @@ describe('Start Task Form', () => {
|
||||
});
|
||||
|
||||
describe('Start a process with a start event form', async () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
await appListCloudComponent.checkApsContainer();
|
||||
@@ -312,7 +280,6 @@ describe('Start Task Form', () => {
|
||||
});
|
||||
|
||||
describe('Attach content to process-cloud task form using upload widget', async () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
await appListCloudComponent.checkApsContainer();
|
||||
|
Reference in New Issue
Block a user