[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);
});
});