mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ADF-3018] Create automated test for replacing an app (#3572)
* [ADF-3018] Create automated test for replacing an app * Use await in the test * Fixing document list pagination test. * Implemented delete version and delete entire app test cases. * Added a log. * Added the api call into protractor control flow. * Renamed the test cases * Commented 'Click Audit Log button' test. * Added some in control flow. * Changing the test rail ID.
This commit is contained in:
committed by
Eugenio Romano
parent
192cca63aa
commit
98243f0450
@@ -19,6 +19,29 @@ export class AppsActions {
|
||||
return appCreated;
|
||||
}
|
||||
|
||||
async publishDeployApp(alfrescoJsApi, appId) {
|
||||
|
||||
let publishApp = await alfrescoJsApi.activiti.appsApi.publishAppDefinition(appId, new AppPublish());
|
||||
|
||||
let published = await alfrescoJsApi.activiti.appsApi.deployAppDefinitions({ appDefinitions: [{ id: publishApp.appDefinition.id }] });
|
||||
|
||||
return publishApp;
|
||||
}
|
||||
|
||||
async importNewVersionAppDefinitionPublishDeployApp(alfrescoJsApi, appFileLocation, modelId) {
|
||||
|
||||
let pathFile = path.join(TestConfig.main.rootPath + appFileLocation);
|
||||
let file = fs.createReadStream(pathFile);
|
||||
|
||||
let appCreated = await alfrescoJsApi.activiti.appsApi.importNewAppDefinition(modelId, file);
|
||||
|
||||
let publishApp = await alfrescoJsApi.activiti.appsApi.publishAppDefinition(appCreated.id, new AppPublish());
|
||||
|
||||
let published = await alfrescoJsApi.activiti.appsApi.deployAppDefinitions({ appDefinitions: [{ id: publishApp.appDefinition.id }] });
|
||||
|
||||
return appCreated;
|
||||
}
|
||||
|
||||
async startProcess(alfrescoJsApi, app, processName) {
|
||||
|
||||
let appDefinitionsList = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import TestConfig = require('../../test.config');
|
||||
import AppPublish = require('../../models/APS/AppPublish');
|
||||
|
||||
export class ModelsActions {
|
||||
|
||||
async deleteVersionModel(alfrescoJsApi, modelId) {
|
||||
|
||||
let versionModelDeleted = await alfrescoJsApi.activiti.modelsApi.deleteModel(modelId, { cascade: false, deleteRuntimeApp : true });
|
||||
|
||||
return versionModelDeleted;
|
||||
}
|
||||
|
||||
async deleteEntireModel(alfrescoJsApi, modelId) {
|
||||
|
||||
let modelDeleted = await alfrescoJsApi.activiti.modelsApi.deleteModel(modelId, { cascade: true, deleteRuntimeApp : true });
|
||||
|
||||
return modelDeleted;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user