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:
@@ -16,48 +16,42 @@
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import { LoginSSOPage, ApplicationsUtil, ApiService } from '@alfresco/adf-testing';
|
||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { ModelsActions } from '../actions/APS/models.actions';
|
||||
|
||||
describe('Modify applications', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const processServicesPage = new ProcessServicesPage();
|
||||
const app = browser.params.resources.Files.APP_WITH_PROCESSES;
|
||||
const appToBeDeleted = browser.params.resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
||||
const replacingApp = browser.params.resources.Files.WIDGETS_SMOKE_TEST;
|
||||
const apps = new AppsActions();
|
||||
const modelActions = new ModelsActions();
|
||||
|
||||
const loginPage = new LoginSSOPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const processServicesPage = new ProcessServicesPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const modelActions = new ModelsActions(apiService);
|
||||
const apps = new ApplicationsUtil(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationService = new ApplicationsUtil(apiService);
|
||||
|
||||
let firstApp, appVersionToBeDeleted;
|
||||
let applicationService;
|
||||
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'BPM',
|
||||
hostBpm: browser.params.testConfig.adf_aps.host
|
||||
});
|
||||
const user = await usersActions.createUser();
|
||||
|
||||
applicationService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
const user = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
await apiService.getInstance().login(user.email, user.password);
|
||||
|
||||
firstApp = await applicationService.importPublishDeployApp(app.file_path);
|
||||
appVersionToBeDeleted = await applicationService.importPublishDeployApp(appToBeDeleted.file_path);
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
await loginPage.login(user.email, user.password);
|
||||
});
|
||||
|
||||
it('[C260198] Should the app be displayed on dashboard when is deployed on APS', async () => {
|
||||
@@ -79,7 +73,7 @@ describe('Modify applications', () => {
|
||||
await expect(await processServicesPage.getBackgroundColor(app.title)).toEqual(CONSTANTS.APP_COLOR.BLUE);
|
||||
await expect(await processServicesPage.getDescription(app.title)).toEqual(app.description);
|
||||
|
||||
await apps.importNewVersionAppDefinitionPublishDeployApp(this.alfrescoJsApi, replacingApp.file_location, firstApp.id);
|
||||
await apps.importNewVersionAppDefinitionPublishDeployApp(replacingApp.file_location, firstApp.id);
|
||||
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
@@ -98,7 +92,7 @@ describe('Modify applications', () => {
|
||||
|
||||
await processServicesPage.checkAppIsDisplayed(app.title);
|
||||
|
||||
await modelActions.deleteEntireModel(this.alfrescoJsApi, firstApp.id);
|
||||
await modelActions.deleteEntireModel(firstApp.id);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
|
||||
@@ -114,7 +108,7 @@ describe('Modify applications', () => {
|
||||
await processServicesPage.checkAppIsDisplayed(appToBeDeleted.title);
|
||||
await expect(await processServicesPage.getBackgroundColor(appToBeDeleted.title)).toEqual(CONSTANTS.APP_COLOR.ORANGE);
|
||||
|
||||
await apps.importNewVersionAppDefinitionPublishDeployApp(this.alfrescoJsApi, replacingApp.file_location, appVersionToBeDeleted.id);
|
||||
await apps.importNewVersionAppDefinitionPublishDeployApp(replacingApp.file_location, appVersionToBeDeleted.id);
|
||||
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
@@ -123,9 +117,9 @@ describe('Modify applications', () => {
|
||||
|
||||
await expect(await processServicesPage.getBackgroundColor(appToBeDeleted.title)).toEqual(CONSTANTS.APP_COLOR.GREY);
|
||||
|
||||
await modelActions.deleteVersionModel(this.alfrescoJsApi, appVersionToBeDeleted.id);
|
||||
await modelActions.deleteVersionModel(this.alfrescoJsApi, appVersionToBeDeleted.id);
|
||||
await apps.publishDeployApp(this.alfrescoJsApi, appVersionToBeDeleted.id);
|
||||
await modelActions.deleteVersionModel(appVersionToBeDeleted.id);
|
||||
await modelActions.deleteVersionModel(appVersionToBeDeleted.id);
|
||||
await apps.publishDeployApp(appVersionToBeDeleted.id);
|
||||
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
@@ -155,7 +149,7 @@ describe('Modify applications', () => {
|
||||
}, 'publish': true
|
||||
};
|
||||
|
||||
await this.alfrescoJsApi.activiti.appsApi.updateAppDefinition(appVersionToBeDeleted.id, appDefinition);
|
||||
await apiService.getInstance().activiti.appsApi.updateAppDefinition(appVersionToBeDeleted.id, appDefinition);
|
||||
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
|
Reference in New Issue
Block a user