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:
@@ -15,15 +15,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, LocalStorageUtil, LoginPage, StringUtil, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import {
|
||||
AlfrescoApiCompatibility as AlfrescoApi,
|
||||
AppDefinitionRepresentation,
|
||||
LightTenantRepresentation
|
||||
} from '@alfresco/js-api';
|
||||
BrowserActions,
|
||||
BrowserVisibility,
|
||||
LocalStorageUtil,
|
||||
LoginSSOPage,
|
||||
StringUtil,
|
||||
ApplicationsUtil,
|
||||
ApiService, UserModel
|
||||
} from '@alfresco/adf-testing';
|
||||
import { AppDefinitionRepresentation } from '@alfresco/js-api';
|
||||
import { browser, by, element } from 'protractor';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { Tenant } from '../models/APS/tenant';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
@@ -34,13 +37,17 @@ import { infoDrawerConfiguration } from './config/task.config';
|
||||
|
||||
describe('Info Drawer', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const app = browser.params.resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
||||
|
||||
const loginPage = new LoginSSOPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const taskPage = new TasksPage();
|
||||
const processServiceTabBarPage = new ProcessServiceTabBarPage();
|
||||
const processFiltersPage = new ProcessFiltersPage();
|
||||
|
||||
const app = browser.params.resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
||||
const apiService = new ApiService();
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
|
||||
const firstComment = 'comm1';
|
||||
|
||||
const date = {
|
||||
@@ -62,32 +69,29 @@ describe('Info Drawer', () => {
|
||||
let processUserModelFullName: string;
|
||||
let assigneeUserModelFullName: string;
|
||||
let appCreated: AppDefinitionRepresentation;
|
||||
let newTenant: LightTenantRepresentation;
|
||||
let processUserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
this.alfrescoApi = new AlfrescoApi({
|
||||
provider: 'BPM',
|
||||
hostBpm: browser.params.testConfig.adf_aps.host
|
||||
});
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
await this.alfrescoApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
newTenant = await this.alfrescoApi.activiti.adminTenantsApi.createTenant(new Tenant());
|
||||
const assigneeUserModel = await users.createApsUser(this.alfrescoApi, newTenant.id);
|
||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
|
||||
const assigneeUserModel = await usersActions.createUser();
|
||||
assigneeUserModelFullName = assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName;
|
||||
const processUserModel = await users.createApsUser(this.alfrescoApi, newTenant.id);
|
||||
|
||||
processUserModel = await usersActions.createUser(new UserModel({ tenantId: assigneeUserModel.tenantId }));
|
||||
processUserModelFullName = processUserModel.firstName + ' ' + processUserModel.lastName;
|
||||
await this.alfrescoApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoApi);
|
||||
|
||||
await apiService.getInstance().login(processUserModel.email, processUserModel.password);
|
||||
appCreated = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.login(processUserModel.email, processUserModel.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await this.alfrescoApi.activiti.modelsApi.deleteModel(appCreated.id);
|
||||
await this.alfrescoApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoApi.activiti.adminTenantsApi.deleteTenant(newTenant.id);
|
||||
await apiService.getInstance().activiti.modelsApi.deleteModel(appCreated.id);
|
||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
Reference in New Issue
Block a user