[ADF-3017]Update app (#3897)

* Add test

* Added some checks to the test

* Remove a method that is not used anymore

* Fix lint issues

* Rebase

* lock file

* update pacakge.json
This commit is contained in:
cristinaj
2018-10-25 00:37:36 +03:00
committed by Eugenio Romano
parent 36a150af4f
commit ed7ce4574a
5 changed files with 4214 additions and 4160 deletions

View File

@@ -41,6 +41,7 @@ describe('Modify applications', () => {
let apps = new AppsActions();
let modelActions = new ModelsActions();
let firstApp, appVersionToBeDeleted;
let model;
beforeAll(async (done) => {
let users = new UsersActions();
@@ -144,4 +145,29 @@ describe('Modify applications', () => {
expect(processServicesPage.getBackgroundColor(appToBeDeleted.title)).toEqual(CONSTANTS.APP_COLOR.ORANGE);
});
it('[C260207] Should the app be updated when is edited in APS', async () => {
let newDescription = 'new description';
navigationBarPage.clickProcessServicesButton();
processServicesPage.checkApsContainer();
expect(processServicesPage.getAppIconType(appToBeDeleted.title)).toEqual(CONSTANTS.APP_ICON.USER);
expect(processServicesPage.getBackgroundColor(appToBeDeleted.title)).toEqual(CONSTANTS.APP_COLOR.ORANGE);
expect(processServicesPage.getDescription(appToBeDeleted.title)).toEqual(appToBeDeleted.description);
let appDefinition = {'appDefinition': {'id': appVersionToBeDeleted.id, 'name': appToBeDeleted.title,
'description': newDescription, 'definition': {'models': [firstApp.definition.models[0]], 'theme': 'theme-4',
'icon': 'glyphicon-user'}}, 'publish': true};
browser.controlFlow().execute(async () => {
await this.alfrescoJsApi.activiti.appsApi.updateAppDefinition(appVersionToBeDeleted.id, appDefinition);
});
browser.refresh();
expect(processServicesPage.getDescription(appToBeDeleted.title)).toEqual(newDescription);
expect(processServicesPage.getBackgroundColor(appToBeDeleted.title)).toEqual(CONSTANTS.APP_COLOR.RED);
expect(processServicesPage.getAppIconType(appToBeDeleted.title)).toEqual(CONSTANTS.APP_ICON.USER);
});
});

View File

@@ -100,12 +100,14 @@ exports.THEMING = {
exports.APP_COLOR = {
BLUE: "rgba(38, 154, 188, 1)",
GREY: "rgba(105, 108, 103, 1)",
ORANGE: "rgba(250, 185, 108, 1)"
ORANGE: "rgba(250, 185, 108, 1)",
RED: "rgba(199, 78, 62, 1)"
};
exports.APP_ICON = {
FAVORITE: "favorite_border",
UNIT: "ac_unit"
UNIT: "ac_unit",
USER: "person"
};
exports.PROCESS_END_DATE = "No date";

View File

@@ -72,6 +72,7 @@ exports.Files = {
SIMPLE_APP_WITH_USER_FORM: {
file_location: "/resources/apps/Simple App with User Form.zip",
title: "Simple App with User Form",
description: "Simple app with a process having a User task with a form attached.",
processName: "Simple Process",
processDiagramFileLocation: '/resources/apps/SimpleAppWithUserForm.png',
processThumbnail: '/resources/processes/Simple Process Thumbnail.png',