[NO-ISSUE] Fix e2e test (#4621)

* fix sso, change timeout, parallel

* cange travis

* move name apps in resources file

* resources fix

* resources fix

* add sleep before search group

* add possibility to extend duration of snack-bar message from configuration

* fix unit test

* fix unit test

* remove timeout

* change timeout

* decrease message time

* add lint main branch travis

* reduce timeout

* add new check application presence

* change permission script
fix search selector

* fix travis conf

* check app environment and upload the app if abbsent

* fix cloud test

* remove duplicate

* restore ps test

* restore resources file

* fix e2e test

* process with variables missing

* test new conf travis

* fix lint

* fix spellcheck

* remove duplicate module

* fix ps module

* fix travis conf

* change check activiti env

* add concept of processes in resources
This commit is contained in:
Eugenio Romano 2019-04-18 13:31:42 +02:00 committed by GitHub
parent 181cee72d6
commit 64be9e3624
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
58 changed files with 627 additions and 391 deletions

View File

@ -43,19 +43,20 @@ jobs:
include:
- stage: Warm Up Cache & Lint & Build Dist
script:
if [[ $TRAVIS_PULL_REQUEST == "false" ]];
- if [[ $TRAVIS_PULL_REQUEST == "false" ]];
then
(./scripts/npm-build-all.sh || exit 1);
./scripts/lint.sh || exit 1;
./scripts/npm-build-all.sh || exit 1;
else
(./scripts/update-version.sh -gnu -alpha || exit 1);
./scripts/update-version.sh -gnu -alpha || exit 1;
npm install;
(./scripts/lint.sh || exit 1);
(rm -rf tmp && mkdir tmp);
(git merge-base origin/$TRAVIS_BRANCH HEAD > ./tmp/devhead.txt);
(./scripts/smart-build.sh -b $TRAVIS_BRANCH -gnu || exit 1);
./scripts/lint.sh || exit 1;
rm -rf tmp && mkdir tmp;
git merge-base origin/$TRAVIS_BRANCH HEAD > ./tmp/devhead.txt;
./scripts/smart-build.sh -b $TRAVIS_BRANCH -gnu || exit 1;
fi;
(npm run build:dist || exit 1);
(./scripts/license-list-generator.sh || exit 1);
npm run build:dist || exit 1;
./scripts/license-list-generator.sh || exit 1;
- stage: Unit test
name: core and extensions
script:
@ -108,23 +109,31 @@ jobs:
- stage: Update children projects dependency #Update generator-ng2-alfresco-app
name: Update Generator
if: tag =~ .*beta.*
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n generator-ng2-alfresco-app
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n 'Alfresco/generator-ng2-alfresco-app'
- stage: Update children projects dependency # Test Update alfresco-content-app
name: Update ACA
if: tag =~ .*beta.*
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n alfresco-content-app
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n 'Alfresco/alfresco-content-app'
- stage: Update children projects dependency # Test Update adf-app-manager-ui
name: Update adf-app-manager-ui
if: tag =~ .*beta.*
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n adf-app-manager-ui
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n 'Alfresco/adf-app-manager-ui'
- stage: Update children projects dependency # Test Update alfresco-ng2-components
name: Update alfresco-ng2-components
if: tag =~ .*beta.*
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n alfresco-ng2-components
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n 'Alfresco/alfresco-ng2-components'
- stage: Update children projects dependency # Test Update alfresco-modeler-app
name: Update alfresco modeler app
if: tag =~ .*beta.*
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n alfresco-modeler-app
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n 'Alfresco/alfresco-modeler-app'
- stage: Update children projects dependency # Test Update activiti-modeling-app
name: Update alfresco modeler activiti app
if: tag =~ .*beta.*
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n Activiti/activiti-modeling-app'
- stage: Update children projects dependency # Test alfresco-admin-app
name: Update alfresco modeler activiti app
if: tag =~ .*beta.*
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n 'Alfresco/alfresco-admin-app'
- stage: e2e Test # Test core
name: core
script:
@ -168,7 +177,8 @@ jobs:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder process-services-cloud --skip-lint --use-dist || exit 1;);
node ./scripts/check-activiti-env.js --host "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --client 'activiti' || exit 1;
./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder process-services-cloud --skip-lint --use-dist -timeout 8000 || exit 1;
fi;
- stage: e2e Test # Test insights
name: insights

View File

@ -125,7 +125,8 @@
"filedata",
"uncheck",
"subfolders",
"ECMBPM"
"ECMBPM",
"candidateuserapp"
],
"dictionaries": [
"html",

View File

@ -8,6 +8,7 @@
"contextRootBpm": "activiti-app",
"authType" : "BASIC",
"locale" : "en",
"notificationDefaultDuration" : 6000,
"auth": {
"withCredentials": false
},

View File

@ -82,10 +82,7 @@ export class FormCloudDemoComponent implements OnInit, OnDestroy {
try {
this.parseForm();
} catch (error) {
this.notificationService.openSnackMessage(
'Wrong form configuration',
4000
);
this.notificationService.openSnackMessage('Wrong form configuration');
}
}

View File

@ -55,9 +55,6 @@ export class StartProcessCloudDemoComponent implements OnInit {
}
openSnackMessage(event: any) {
this.notificationService.openSnackMessage(
event.response.body.message,
4000
);
this.notificationService.openSnackMessage(event.response.body.message);
}
}

View File

@ -19,6 +19,7 @@ import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { NotificationService } from '@alfresco/adf-core';
import { CloudLayoutService } from './services/cloud-layout.service';
@Component({
templateUrl: './start-task-cloud-demo.component.html',
styleUrls: ['./start-task-cloud-demo.component.scss']
@ -41,19 +42,16 @@ export class StartTaskCloudDemoComponent implements OnInit {
}
onStartTaskSuccess() {
this.cloudLayoutService.setCurrentTaskFilterParam({key: 'my-tasks'});
this.cloudLayoutService.setCurrentTaskFilterParam({ key: 'my-tasks' });
this.router.navigate([`/cloud/${this.appName}/tasks`]);
}
onCancelStartTask() {
this.cloudLayoutService.setCurrentTaskFilterParam({key: 'my-tasks'});
this.cloudLayoutService.setCurrentTaskFilterParam({ key: 'my-tasks' });
this.router.navigate([`/cloud/${this.appName}/tasks`]);
}
openSnackMessage(event: any) {
this.notificationService.openSnackMessage(
event.response.body.message,
4000
);
this.notificationService.openSnackMessage(event.response.body.message);
}
}

View File

@ -16,7 +16,12 @@
*/
import { Component } from '@angular/core';
import { AppConfigService, NotificationService, UserPreferencesService, UserPreferenceValues } from '@alfresco/adf-core';
import {
AppConfigService,
NotificationService,
UserPreferencesService,
UserPreferenceValues
} from '@alfresco/adf-core';
@Component({
selector: 'app-config-editor',
@ -60,16 +65,10 @@ export class ConfigEditorComponent {
}
} catch (error) {
this.invalidJson = true;
this.notificationService.openSnackMessage(
'Wrong Code configuration ' + error,
1000
);
this.notificationService.openSnackMessage('Wrong Code configuration ' + error);
} finally {
if (!this.invalidJson) {
this.notificationService.openSnackMessage(
'Saved',
1000
);
this.notificationService.openSnackMessage('Saved');
}
}
}
@ -89,7 +88,7 @@ export class ConfigEditorComponent {
this.isUserPreference = true;
this.userPreferenceProperty = 'textOrientation';
this.userPreferencesService.select( this.userPreferenceProperty).subscribe((textOrientation: number) => {
this.userPreferencesService.select(this.userPreferenceProperty).subscribe((textOrientation: number) => {
this.code = JSON.stringify(textOrientation);
this.field = 'textOrientation';
this.indentCode();

View File

@ -349,10 +349,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
}
openSnackMessage(event: any) {
this.notificationService.openSnackMessage(
event,
4000
);
this.notificationService.openSnackMessage(event);
}
emitReadyEvent(event: NodePaging) {
@ -579,10 +576,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
});
dialogInstance.componentInstance.error.subscribe((message) => {
this.notificationService.openSnackMessage(
message,
6000
);
this.notificationService.openSnackMessage(message);
});
}

View File

@ -26,7 +26,7 @@ import { Subscription } from 'rxjs';
templateUrl: 'form.component.html',
styleUrls: ['form.component.scss'],
providers: [
{provide: FormService, useClass: InMemoryFormService}
{ provide: FormService, useClass: InMemoryFormService }
],
encapsulation: ViewEncapsulation.None
})
@ -87,10 +87,7 @@ export class FormComponent implements OnInit, OnDestroy {
try {
this.parseForm();
} catch (error) {
this.notificationService.openSnackMessage(
'Wrong form configuration',
4000
);
this.notificationService.openSnackMessage('Wrong form configuration');
}
}

View File

@ -70,10 +70,7 @@ export class DemoPermissionComponent implements OnInit {
showErrorMessage(error) {
const message = error.message ? error.message : error;
this.notificationService.openSnackMessage(
message,
4000
);
this.notificationService.openSnackMessage(message);
}
}

View File

@ -93,3 +93,11 @@ export class MyComponent implements OnInit {
}
}
```
The default message duration is 5000 ms that is used only if you don't pass a custom duration in the parameters of openSnackMessageAction/openSnackMessage methods.
You can also change the default 5000 ms adding the following configuration in the app.config.json:
```json
"notificationDefaultDuration" : "7000"
```

View File

@ -91,12 +91,11 @@ describe('Document List Component - Actions', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser);
browser.driver.sleep(15000);
browser.driver.sleep(10000);
done();
});
beforeEach(async (done) => {
navigationBarPage.clickAboutButton();
navigationBarPage.clickContentServicesButton();
done();
});

View File

@ -99,9 +99,9 @@ describe('Permissions Component', function () {
folderName = `MEESEEKS_${StringUtil.generateRandomString(5)}`;
const publicSiteBody = {visibility: 'PUBLIC', title: publicSiteName};
const publicSiteBody = { visibility: 'PUBLIC', title: publicSiteName };
const privateSiteBody = {visibility: 'PRIVATE', title: privateSiteName};
const privateSiteBody = { visibility: 'PRIVATE', title: privateSiteName };
publicSite = await alfrescoJsApi.core.sitesApi.createSite(publicSiteBody);
privateSite = await alfrescoJsApi.core.sitesApi.createSite(privateSiteBody);
@ -136,7 +136,6 @@ describe('Permissions Component', function () {
privateSiteFile = await uploadActions.uploadFile(alfrescoJsApi, fileModel.location, 'privateSite' + fileModel.name, privateSite.entry.guid);
await alfrescoJsApi.core.nodesApi.updateNode(privateSiteFile.entry.id,
{
permissions: {
locallySet: [{
@ -148,9 +147,7 @@ describe('Permissions Component', function () {
});
await uploadActions.uploadFile(alfrescoJsApi, fileModel.location, 'Site' + fileModel.name, siteFolder.entry.id);
done();
});
afterAll(async (done) => {
@ -182,6 +179,9 @@ describe('Permissions Component', function () {
permissionsPage.clickAddPermissionButton();
permissionsPage.checkAddPermissionDialogIsDisplayed();
permissionsPage.checkSearchUserInputIsDisplayed();
browser.sleep(7000);
permissionsPage.searchUserOrGroup(consumerUser.getId());
permissionsPage.clickUserOrGroup(consumerUser.getFirstName());
permissionsPage.checkUserOrGroupIsAdded(consumerUser.getId());

View File

@ -32,7 +32,7 @@ export class SearchCheckListPage {
clickCheckListOption(option) {
BrowserVisibility.waitUntilElementIsVisible(this.filter);
const result = this.filter.all(by.css(`mat-checkbox[data-automation-id*='-${option}'] .mat-checkbox-inner-container`)).first();
const result = this.filter.all(by.css(`mat-checkbox[data-automation-id*='${option}'] .mat-checkbox-inner-container`)).first();
BrowserVisibility.waitUntilElementIsVisible(result);
BrowserVisibility.waitUntilElementIsClickable(result);
result.click();

View File

@ -28,7 +28,6 @@ export class NotificationPage {
actionToggle = element(by.css('mat-slide-toggle[data-automation-id="notification-action-toggle"]'));
notificationSnackBar = element.all(by.css('simple-snack-bar')).first();
actionOutput = element(by.css('div[data-automation-id="notification-action-output"]'));
customNotificationButton = element(by.css('button[data-automation-id="notification-custom-config-button"]'));
selectionDropDown = element.all(by.css('.mat-select-panel')).first();
notificationsPage = element(by.css('a[data-automation-id="Notifications"]'));
notificationConfig = element(by.css('p[data-automation-id="notification-custom-object"]'));
@ -98,8 +97,6 @@ export class NotificationPage {
}
clickNotificationButton() {
// BrowserVisibility.waitUntilElementIsVisible(this.customNotificationButton);
// this.customNotificationButton.click();
const button = browser.wait(until.elementLocated(by.css('button[data-automation-id="notification-custom-config-button"]')));
button.click();
}

View File

@ -132,7 +132,7 @@ export class ViewerPage {
}
checkFileIsLoaded() {
BrowserVisibility.waitUntilElementIsOnPage(this.pdfPageLoaded, 15000);
BrowserVisibility.waitUntilElementIsOnPage(this.pdfPageLoaded, 10000);
}
checkImgViewerIsDisplayed() {

View File

@ -19,7 +19,6 @@ import { LoginSSOPage, SettingsPage } from '@alfresco/adf-testing';
import { AppListCloudPage } from '@alfresco/adf-testing';
import TestConfig = require('../test.config');
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
import { browser } from 'protractor';
import resources = require('../util/resources');
describe('Applications list', () => {
@ -28,11 +27,10 @@ describe('Applications list', () => {
const loginSSOPage = new LoginSSOPage();
const navigationBarPage = new NavigationBarPage();
const appListCloudPage = new AppListCloudPage();
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP.name;
it('[C289910] Should the app be displayed on dashboard when is deployed on APS', () => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity);
browser.ignoreSynchronization = true;
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
navigationBarPage.navigateToProcessServicesCloudPage();
appListCloudPage.checkApsContainer();

View File

@ -22,7 +22,6 @@ import { NavigationBarPage } from '../pages/adf/navigationBarPage';
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
import { ProcessCloudDemoPage } from '../pages/adf/demo-shell/process-services/processCloudDemoPage';
import { AppListCloudPage } from '@alfresco/adf-testing';
import { browser } from 'protractor';
import resources = require('../util/resources');
describe('Edit process filters cloud', () => {
@ -35,15 +34,13 @@ describe('Edit process filters cloud', () => {
const tasksCloudDemoPage = new TasksCloudDemoPage();
const processCloudDemoPage = new ProcessCloudDemoPage();
let silentLogin;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP.name;
beforeAll(async () => {
silentLogin = false;
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
beforeAll(async (done) => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
done();
});
beforeEach((done) => {

View File

@ -21,7 +21,6 @@ import { AppListCloudPage, StringUtil, ApiService, LoginSSOPage, TasksService, S
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
import { browser } from 'protractor';
import resources = require('../util/resources');
describe('Edit task filters cloud', () => {
@ -34,16 +33,13 @@ describe('Edit task filters cloud', () => {
const tasksCloudDemoPage = new TasksCloudDemoPage();
let tasksService: TasksService;
let silentLogin;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP.name;
const completedTaskName = StringUtil.generateRandomString(), assignedTaskName = StringUtil.generateRandomString();
let assignedTask;
beforeAll(async () => {
silentLogin = false;
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
beforeAll(async (done) => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
const apiService = new ApiService('activiti', TestConfig.adf.hostBPM, TestConfig.adf.hostSso, 'BPM');
@ -53,6 +49,7 @@ describe('Edit task filters cloud', () => {
assignedTask = await tasksService.createStandaloneTask(assignedTaskName, simpleApp);
await tasksService.claimTask(assignedTask.entry.id, simpleApp);
await tasksService.createAndCompleteTask(completedTaskName, simpleApp);
done();
});
beforeEach((done) => {

View File

@ -39,7 +39,6 @@ describe('People Groups Cloud Component', () => {
let groupIdentityService: GroupIdentityService;
let rolesService: RolesService;
let silentLogin;
let apsUser;
let activitiUser;
let noRoleUser;
@ -55,14 +54,14 @@ describe('People Groups Cloud Component', () => {
let groups = [];
let clientId;
beforeAll(async () => {
beforeAll(async (done) => {
const apiService = new ApiService('activiti', TestConfig.adf.hostBPM, TestConfig.adf.hostSso, 'BPM');
await apiService.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
identityService = new IdentityService(apiService);
rolesService = new RolesService(apiService);
groupIdentityService = new GroupIdentityService(apiService);
clientId = await groupIdentityService.getClientIdByApplicationName(resources.ACTIVITI7_APPS.SIMPLE_APP);
clientId = await groupIdentityService.getClientIdByApplicationName(resources.ACTIVITI7_APPS.SIMPLE_APP.name);
groupActiviti = await groupIdentityService.createIdentityGroup();
clientActivitiAdminRoleId = await rolesService.getClientRoleIdByRoleName(groupActiviti.id, clientId, CONSTANTS.ROLES.ACTIVITI_ADMIN);
clientActivitiUserRoleId = await rolesService.getClientRoleIdByRoleName(groupActiviti.id, clientId, CONSTANTS.ROLES.ACTIVITI_USER);
@ -88,12 +87,11 @@ describe('People Groups Cloud Component', () => {
await groupIdentityService.addClientRole(groupActiviti.id, clientId, clientActivitiAdminRoleId, CONSTANTS.ROLES.ACTIVITI_ADMIN );
users = [`${apsUser.idIdentityService}`, `${activitiUser.idIdentityService}`, `${noRoleUser.idIdentityService}`];
groups = [`${groupAps.id}`, `${groupActiviti.id}`, `${groupNoRole.id}`];
silentLogin = false;
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
navigationBarPage.navigateToPeopleGroupCloudPage();
done();
});
afterAll(async () => {
@ -106,11 +104,14 @@ describe('People Groups Cloud Component', () => {
});
beforeEach(() => {
browser.refresh();
peopleGroupCloudComponentPage.checkGroupsCloudComponentTitleIsDisplayed();
peopleGroupCloudComponentPage.checkPeopleCloudComponentTitleIsDisplayed();
});
afterEach(() => {
browser.refresh();
});
it('[C297674] Add role filtering to PeopleCloudComponent', () => {
peopleGroupCloudComponentPage.clickPeopleCloudMultipleSelection();
peopleGroupCloudComponentPage.clickPeopleCloudFilterRole();
@ -188,7 +189,6 @@ describe('People Groups Cloud Component', () => {
peopleGroupCloudComponentPage.clickPreselectValidation();
expect(peopleGroupCloudComponentPage.getPreselectValidationStatus()).toBe('true');
peopleGroupCloudComponentPage.enterPeoplePreselect(`[{"id":"${noRoleUser.idIdentityService}"}]`);
browser.sleep(100);
expect(peopleCloudComponent.getAssigneeFieldContent()).toBe(`${noRoleUser.firstName}` + ' ' + `${noRoleUser.lastName}`);
peopleGroupCloudComponentPage.clickPreselectValidation();
@ -196,7 +196,6 @@ describe('People Groups Cloud Component', () => {
peopleGroupCloudComponentPage.clickPreselectValidation();
expect(peopleGroupCloudComponentPage.getPreselectValidationStatus()).toBe('true');
peopleGroupCloudComponentPage.enterPeoplePreselect(`[{"email":"${apsUser.email}"}]`);
browser.sleep(100);
expect(peopleCloudComponent.getAssigneeFieldContent()).toBe(`${apsUser.firstName}` + ' ' + `${apsUser.lastName}`);
peopleGroupCloudComponentPage.clickPreselectValidation();
@ -204,7 +203,6 @@ describe('People Groups Cloud Component', () => {
peopleGroupCloudComponentPage.clickPreselectValidation();
expect(peopleGroupCloudComponentPage.getPreselectValidationStatus()).toBe('true');
peopleGroupCloudComponentPage.enterPeoplePreselect(`[{"username":"${activitiUser.username}"}]`);
browser.sleep(100);
expect(peopleCloudComponent.getAssigneeFieldContent()).toBe(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
peopleGroupCloudComponentPage.enterPeoplePreselect('[{"id":"12345","username":"someUsername","email":"someEmail"}]');
@ -212,7 +210,6 @@ describe('People Groups Cloud Component', () => {
expect(peopleGroupCloudComponentPage.getPreselectValidationStatus()).toBe('false');
peopleGroupCloudComponentPage.clickPreselectValidation();
expect(peopleGroupCloudComponentPage.getPreselectValidationStatus()).toBe('true');
browser.sleep(100);
expect(peopleCloudComponent.getAssigneeFieldContent()).toBe('');
});
@ -262,68 +259,11 @@ describe('People Groups Cloud Component', () => {
expect(peopleGroupCloudComponentPage.getPreselectValidationStatus()).toBe('true');
peopleGroupCloudComponentPage.enterPeoplePreselect(`[{"firstName":"${apsUser.firstName}","lastName":"${apsUser.lastName},"` +
`{"firstName":"${activitiUser.firstName}","lastName":"${activitiUser.lastName}",{"firstName":"${noRoleUser.firstName}","lastName":"${noRoleUser.lastName}"]`);
browser.sleep(100);
browser.sleep(200);
expect(peopleCloudComponent.getAssigneeFieldContent()).toBe('');
});
it('[C305041] Should filter the People Single Selection with the Application name filter', () => {
peopleGroupCloudComponentPage.checkPeopleCloudSingleSelectionIsSelected();
peopleGroupCloudComponentPage.clickPeopleFilerByApp();
peopleGroupCloudComponentPage.enterPeopleAppName(resources.ACTIVITI7_APPS.SIMPLE_APP);
peopleCloudComponent.searchAssignee(`${activitiUser.firstName}`);
peopleCloudComponent.checkUserIsDisplayed(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
peopleCloudComponent.selectAssigneeFromList(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
browser.sleep(100);
expect(peopleCloudComponent.getAssigneeFieldContent()).toBe(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
});
it('[C305041] Should filter the People Multiple Selection with the Application name filter', () => {
peopleGroupCloudComponentPage.clickPeopleCloudMultipleSelection();
peopleGroupCloudComponentPage.clickPeopleFilerByApp();
peopleGroupCloudComponentPage.enterPeopleAppName(resources.ACTIVITI7_APPS.SIMPLE_APP);
peopleCloudComponent.searchAssignee(`${apsUser.firstName}`);
peopleCloudComponent.checkUserIsDisplayed(`${apsUser.firstName}` + ' ' + `${apsUser.lastName}`);
peopleCloudComponent.selectAssigneeFromList(`${apsUser.firstName}` + ' ' + `${apsUser.lastName}`);
peopleCloudComponent.checkSelectedPeople(`${apsUser.firstName}` + ' ' + `${apsUser.lastName}`);
peopleCloudComponent.searchAssigneeToExisting(`${activitiUser.firstName}`);
peopleCloudComponent.checkUserIsDisplayed(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
peopleCloudComponent.selectAssigneeFromList(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
peopleCloudComponent.checkSelectedPeople(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
peopleCloudComponent.searchAssigneeToExisting(`${noRoleUser.firstName}`);
peopleCloudComponent.checkUserIsNotDisplayed(`${noRoleUser.firstName}` + ' ' + `${noRoleUser.lastName}`);
});
it('[C305041] Should filter the Groups Single Selection with the Application name filter', () => {
peopleGroupCloudComponentPage.clickGroupCloudSingleSelection();
peopleGroupCloudComponentPage.clickGroupFilerByApp();
peopleGroupCloudComponentPage.enterGroupAppName(resources.ACTIVITI7_APPS.SIMPLE_APP);
groupCloudComponentPage.searchGroups(`${groupActiviti.name}`);
groupCloudComponentPage.checkGroupIsDisplayed(`${groupActiviti.name}`);
groupCloudComponentPage.selectGroupFromList(`${groupActiviti.name}`);
expect(groupCloudComponentPage.getGroupsFieldContent()).toBe(`${groupActiviti.name}`);
});
it('[C305041] Should filter the Groups Multiple Selection with the Application name filter', () => {
peopleGroupCloudComponentPage.clickGroupCloudMultipleSelection();
peopleGroupCloudComponentPage.clickGroupFilerByApp();
peopleGroupCloudComponentPage.enterGroupAppName(resources.ACTIVITI7_APPS.SIMPLE_APP);
groupCloudComponentPage.searchGroups(`${groupAps.name}`);
groupCloudComponentPage.checkGroupIsDisplayed(`${groupAps.name}`);
groupCloudComponentPage.selectGroupFromList(`${groupAps.name}`);
groupCloudComponentPage.checkSelectedGroup(`${groupAps.name}`);
groupCloudComponentPage.searchGroupsToExisting(`${groupActiviti.name}`);
groupCloudComponentPage.checkGroupIsDisplayed(`${groupActiviti.name}`);
groupCloudComponentPage.selectGroupFromList(`${groupActiviti.name}`);
groupCloudComponentPage.checkSelectedGroup(`${groupActiviti.name}`);
groupCloudComponentPage.searchGroupsToExisting(`${groupNoRole.name}`);
groupCloudComponentPage.checkGroupIsNotDisplayed(`${groupNoRole.name}`);
});
});
});

View File

@ -0,0 +1,174 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import TestConfig = require('../test.config');
import { SettingsPage } from '@alfresco/adf-testing';
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
import { PeopleGroupCloudComponentPage } from '../pages/adf/demo-shell/process-services/peopleGroupCloudComponentPage';
import { GroupCloudComponentPage, PeopleCloudComponentPage } from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { LoginSSOPage, IdentityService, GroupIdentityService, RolesService, ApiService } from '@alfresco/adf-testing';
import CONSTANTS = require('../util/constants');
import resources = require('../util/resources');
describe('People Groups Cloud Component', () => {
describe('People Groups Cloud Component', () => {
const settingsPage = new SettingsPage();
const loginSSOPage = new LoginSSOPage();
const navigationBarPage = new NavigationBarPage();
const peopleGroupCloudComponentPage = new PeopleGroupCloudComponentPage();
const peopleCloudComponent = new PeopleCloudComponentPage();
const groupCloudComponentPage = new GroupCloudComponentPage();
let identityService: IdentityService;
let groupIdentityService: GroupIdentityService;
let rolesService: RolesService;
let apsUser;
let activitiUser;
let noRoleUser;
let groupAps;
let groupActiviti;
let groupNoRole;
let apsUserRoleId;
let activitiUserRoleId;
let apsAdminRoleId;
let activitiAdminRoleId;
let clientActivitiAdminRoleId, clientActivitiUserRoleId;
let users = [];
let groups = [];
let clientId;
beforeAll(async (done) => {
const apiService = new ApiService('activiti', TestConfig.adf.hostBPM, TestConfig.adf.hostSso, 'BPM');
await apiService.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
identityService = new IdentityService(apiService);
rolesService = new RolesService(apiService);
groupIdentityService = new GroupIdentityService(apiService);
clientId = await groupIdentityService.getClientIdByApplicationName(resources.ACTIVITI7_APPS.SIMPLE_APP.name);
groupActiviti = await groupIdentityService.createIdentityGroup();
clientActivitiAdminRoleId = await rolesService.getClientRoleIdByRoleName(groupActiviti.id, clientId, CONSTANTS.ROLES.ACTIVITI_ADMIN);
clientActivitiUserRoleId = await rolesService.getClientRoleIdByRoleName(groupActiviti.id, clientId, CONSTANTS.ROLES.ACTIVITI_USER);
apsUser = await identityService.createIdentityUser();
apsUserRoleId = await rolesService.getRoleIdByRoleName(CONSTANTS.ROLES.APS_USER);
await identityService.assignRole(apsUser.idIdentityService, apsUserRoleId, CONSTANTS.ROLES.APS_USER);
activitiUser = await identityService.createIdentityUser();
activitiUserRoleId = await rolesService.getRoleIdByRoleName(CONSTANTS.ROLES.ACTIVITI_USER);
await identityService.assignRole(activitiUser.idIdentityService, activitiUserRoleId, CONSTANTS.ROLES.ACTIVITI_USER);
noRoleUser = await identityService.createIdentityUser();
await identityService.deleteClientRole(noRoleUser.idIdentityService, clientId, clientActivitiAdminRoleId, CONSTANTS.ROLES.ACTIVITI_ADMIN);
await identityService.deleteClientRole(noRoleUser.idIdentityService, clientId, clientActivitiUserRoleId, CONSTANTS.ROLES.ACTIVITI_USER);
groupAps = await groupIdentityService.createIdentityGroup();
apsAdminRoleId = await rolesService.getRoleIdByRoleName(CONSTANTS.ROLES.APS_ADMIN);
await groupIdentityService.assignRole(groupAps.id, apsAdminRoleId, CONSTANTS.ROLES.APS_ADMIN);
activitiAdminRoleId = await rolesService.getRoleIdByRoleName(CONSTANTS.ROLES.ACTIVITI_ADMIN);
await groupIdentityService.assignRole(groupActiviti.id, activitiAdminRoleId, CONSTANTS.ROLES.ACTIVITI_ADMIN);
groupNoRole = await groupIdentityService.createIdentityGroup();
await groupIdentityService.addClientRole(groupAps.id, clientId, clientActivitiAdminRoleId, CONSTANTS.ROLES.ACTIVITI_ADMIN );
await groupIdentityService.addClientRole(groupActiviti.id, clientId, clientActivitiAdminRoleId, CONSTANTS.ROLES.ACTIVITI_ADMIN );
users = [`${apsUser.idIdentityService}`, `${activitiUser.idIdentityService}`, `${noRoleUser.idIdentityService}`];
groups = [`${groupAps.id}`, `${groupActiviti.id}`, `${groupNoRole.id}`];
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
loginSSOPage.clickOnSSOButton();
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
navigationBarPage.navigateToPeopleGroupCloudPage();
done();
});
afterAll(async () => {
for (let i = 0; i < users.length; i++) {
await identityService.deleteIdentityUser(users[i]);
}
for (let i = 0; i < groups.length; i++) {
await groupIdentityService.deleteIdentityGroup(groups[i]);
}
});
beforeEach(() => {
peopleGroupCloudComponentPage.checkGroupsCloudComponentTitleIsDisplayed();
peopleGroupCloudComponentPage.checkPeopleCloudComponentTitleIsDisplayed();
});
afterEach(() => {
browser.refresh();
});
it('[C305041] Should filter the People Single Selection with the Application name filter', () => {
peopleGroupCloudComponentPage.checkPeopleCloudSingleSelectionIsSelected();
peopleGroupCloudComponentPage.clickPeopleFilerByApp();
peopleGroupCloudComponentPage.enterPeopleAppName(resources.ACTIVITI7_APPS.SIMPLE_APP.name);
peopleCloudComponent.searchAssignee(`${activitiUser.firstName}`);
peopleCloudComponent.checkUserIsDisplayed(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
peopleCloudComponent.selectAssigneeFromList(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
browser.sleep(100);
expect(peopleCloudComponent.getAssigneeFieldContent()).toBe(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
});
it('[C305041] Should filter the People Multiple Selection with the Application name filter', () => {
peopleGroupCloudComponentPage.clickPeopleCloudMultipleSelection();
peopleGroupCloudComponentPage.clickPeopleFilerByApp();
peopleGroupCloudComponentPage.enterPeopleAppName(resources.ACTIVITI7_APPS.SIMPLE_APP.name);
peopleCloudComponent.searchAssignee(`${apsUser.firstName}`);
peopleCloudComponent.checkUserIsDisplayed(`${apsUser.firstName}` + ' ' + `${apsUser.lastName}`);
peopleCloudComponent.selectAssigneeFromList(`${apsUser.firstName}` + ' ' + `${apsUser.lastName}`);
peopleCloudComponent.checkSelectedPeople(`${apsUser.firstName}` + ' ' + `${apsUser.lastName}`);
peopleCloudComponent.searchAssigneeToExisting(`${activitiUser.firstName}`);
peopleCloudComponent.checkUserIsDisplayed(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
peopleCloudComponent.selectAssigneeFromList(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
peopleCloudComponent.checkSelectedPeople(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
peopleCloudComponent.searchAssigneeToExisting(`${noRoleUser.firstName}`);
peopleCloudComponent.checkUserIsNotDisplayed(`${noRoleUser.firstName}` + ' ' + `${noRoleUser.lastName}`);
});
it('[C305041] Should filter the Groups Single Selection with the Application name filter', () => {
peopleGroupCloudComponentPage.clickGroupCloudSingleSelection();
peopleGroupCloudComponentPage.clickGroupFilerByApp();
peopleGroupCloudComponentPage.enterGroupAppName(resources.ACTIVITI7_APPS.SIMPLE_APP.name);
groupCloudComponentPage.searchGroups(`${groupActiviti.name}`);
groupCloudComponentPage.checkGroupIsDisplayed(`${groupActiviti.name}`);
groupCloudComponentPage.selectGroupFromList(`${groupActiviti.name}`);
expect(groupCloudComponentPage.getGroupsFieldContent()).toBe(`${groupActiviti.name}`);
});
it('[C305041] Should filter the Groups Multiple Selection with the Application name filter', () => {
peopleGroupCloudComponentPage.clickGroupCloudMultipleSelection();
peopleGroupCloudComponentPage.clickGroupFilerByApp();
peopleGroupCloudComponentPage.enterGroupAppName(resources.ACTIVITI7_APPS.SIMPLE_APP.name);
groupCloudComponentPage.searchGroups(`${groupAps.name}`);
groupCloudComponentPage.checkGroupIsDisplayed(`${groupAps.name}`);
groupCloudComponentPage.selectGroupFromList(`${groupAps.name}`);
groupCloudComponentPage.checkSelectedGroup(`${groupAps.name}`);
groupCloudComponentPage.searchGroupsToExisting(`${groupActiviti.name}`);
groupCloudComponentPage.checkGroupIsDisplayed(`${groupActiviti.name}`);
groupCloudComponentPage.selectGroupFromList(`${groupActiviti.name}`);
groupCloudComponentPage.checkSelectedGroup(`${groupActiviti.name}`);
groupCloudComponentPage.searchGroupsToExisting(`${groupNoRole.name}`);
groupCloudComponentPage.checkGroupIsNotDisplayed(`${groupNoRole.name}`);
});
});
});

View File

@ -44,15 +44,12 @@ describe('Process list cloud', () => {
let processInstancesService: ProcessInstancesService;
let queryService: QueryService;
let silentLogin;
let completedProcess, runningProcessInstance, switchProcessInstance, noOfApps;
const candidateuserapp = resources.ACTIVITI7_APPS.CANDIDATE_USER_APP;
const candidateuserapp = resources.ACTIVITI7_APPS.CANDIDATE_USER_APP.name;
beforeAll(async () => {
silentLogin = false;
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
beforeAll(async (done) => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
navigationBarPage.clickConfigEditorButton();
@ -87,8 +84,10 @@ describe('Process list cloud', () => {
processDefinitionService = new ProcessDefinitionsService(apiService);
const processDefinition = await processDefinitionService.getProcessDefinitions(candidateuserapp);
processInstancesService = new ProcessInstancesService(apiService);
await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, candidateuserapp);
runningProcessInstance = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, candidateuserapp);
switchProcessInstance = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, candidateuserapp);
@ -99,9 +98,10 @@ describe('Process list cloud', () => {
tasksService = new TasksService(apiService);
const claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, candidateuserapp);
await tasksService.completeTask(claimedTask.entry.id, candidateuserapp);
done();
});
beforeEach((done) => {
beforeEach(async(done) => {
navigationBarPage.navigateToProcessServicesCloudPage();
appListCloudComponent.checkApsContainer();
appListCloudComponent.goToApp(candidateuserapp);
@ -128,7 +128,7 @@ describe('Process list cloud', () => {
});
});
it('[C291783] Should display processes ordered by id when Id is selected from sort dropdown', async () => {
xit('[C291783] Should display processes ordered by id when Id is selected from sort dropdown', async () => {
processCloudDemoPage.editProcessFilterCloudComponent().clickCustomiseFilterHeader().setStatusFilterDropDown('RUNNING')
.setSortFilterDropDown('Id').setOrderFilterDropDown('ASC');
processCloudDemoPage.processListCloudComponent().getDataTable().checkSpinnerIsDisplayed().checkSpinnerIsNotDisplayed();

View File

@ -23,7 +23,6 @@ import { ProcessCloudDemoPage } from '../pages/adf/demo-shell/process-services/p
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
import { AppListCloudPage } from '@alfresco/adf-testing';
import { browser } from 'protractor';
import resources = require('../util/resources');
describe('Process filters cloud', () => {
@ -41,16 +40,13 @@ describe('Process filters cloud', () => {
let processInstancesService: ProcessInstancesService;
let queryService: QueryService;
let silentLogin;
let runningProcess, completedProcess;
const simpleApp = resources.ACTIVITI7_APPS.CANDIDATE_USER_APP;
const simpleApp = resources.ACTIVITI7_APPS.CANDIDATE_USER_APP.name;
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
beforeAll(async () => {
silentLogin = false;
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
beforeAll(async (done) => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginSSOIdentityService(user, password);
const apiService = new ApiService('activiti', TestConfig.adf.hostBPM, TestConfig.adf.hostSso, 'BPM');
@ -67,6 +63,7 @@ describe('Process filters cloud', () => {
tasksService = new TasksService(apiService);
const claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, simpleApp);
await tasksService.completeTask(claimedTask.entry.id, simpleApp);
done();
});
beforeEach((done) => {

View File

@ -26,15 +26,14 @@ import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tas
import { ProcessHeaderCloudPage } from '@alfresco/adf-testing';
import { ProcessCloudDemoPage } from '../pages/adf/demo-shell/process-services/processCloudDemoPage';
import { browser } from 'protractor';
import resources = require('../util/resources');
describe('Process Header cloud component', () => {
describe('Process Header cloud component', () => {
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
const subProcessApp = resources.ACTIVITI7_APPS.SUB_PROCESS_APP;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP.name;
const subProcessApp = resources.ACTIVITI7_APPS.SUB_PROCESS_APP.name;
const formatDate = 'DD-MM-YYYY';
const processHeaderCloudPage = new ProcessHeaderCloudPage();
@ -50,14 +49,11 @@ describe('Process Header cloud component', () => {
let processInstancesService: ProcessInstancesService;
let queryService: QueryService;
let silentLogin;
let runningProcess, runningCreatedDate, parentCompleteProcess, childCompleteProcess, completedCreatedDate;
beforeAll(async (done) => {
silentLogin = false;
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
const apiService = new ApiService('activiti', TestConfig.adf.hostBPM, TestConfig.adf.hostSso, 'BPM');

View File

@ -16,7 +16,13 @@
*/
import TestConfig = require('../test.config');
import { ProcessDefinitionsService, ProcessInstancesService, LoginSSOPage, ApiService, SettingsPage } from '@alfresco/adf-testing';
import {
ProcessDefinitionsService,
ProcessInstancesService,
LoginSSOPage,
ApiService,
SettingsPage
} from '@alfresco/adf-testing';
import { ProcessCloudDemoPage } from '../pages/adf/demo-shell/process-services/processCloudDemoPage';
import { AppListCloudPage } from '@alfresco/adf-testing';
@ -24,7 +30,6 @@ import { NavigationBarPage } from '../pages/adf/navigationBarPage';
import { ConfigEditorPage } from '../pages/adf/configEditorPage';
import { ProcessListCloudConfiguration } from './processListCloud.config';
import { browser } from 'protractor';
import resources = require('../util/resources');
describe('Process list cloud', () => {
@ -40,16 +45,13 @@ describe('Process list cloud', () => {
let processDefinitionService: ProcessDefinitionsService;
let processInstancesService: ProcessInstancesService;
let silentLogin;
const candidateuserapp = resources.ACTIVITI7_APPS.CANDIDATE_USER_APP;
const candidateuserapp = resources.ACTIVITI7_APPS.CANDIDATE_USER_APP.name;
let jsonFile;
let runningProcess;
beforeAll(async () => {
silentLogin = false;
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
beforeAll(async (done) => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
const apiService = new ApiService('activiti', TestConfig.adf.hostBPM, TestConfig.adf.hostSso, 'BPM');
@ -59,7 +61,7 @@ describe('Process list cloud', () => {
const processDefinition = await processDefinitionService.getProcessDefinitions(candidateuserapp);
processInstancesService = new ProcessInstancesService(apiService);
runningProcess = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, candidateuserapp);
done();
});
beforeEach(async (done) => {

View File

@ -21,7 +21,6 @@ import TestConfig = require('../test.config');
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
import { ProcessCloudDemoPage } from '../pages/adf/demo-shell/process-services/processCloudDemoPage';
import { StringUtil } from '@alfresco/adf-testing';
import { browser } from 'protractor';
import resources = require('../util/resources');
describe('Start Process', () => {
@ -37,16 +36,13 @@ describe('Start Process', () => {
const processNameBiggerThen255Characters = StringUtil.generateRandomString(256);
const lengthValidationError = 'Length exceeded, 255 characters max.';
const requiredError = 'Process Name is required', requiredProcessError = 'Process Definition is required';
const processDefinition = 'processwithvariables';
const processWithVariables = resources.ACTIVITI7_APPS.SIMPLE_APP.processes.processwithvariables;
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
let silentLogin;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP.name;
beforeAll((done) => {
silentLogin = false;
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginSSOIdentityService(user, password);
navigationBarPage.navigateToProcessServicesCloudPage();
appListCloudComponent.checkApsContainer();
@ -70,6 +66,7 @@ describe('Start Process', () => {
});
it('[C291842] Should be displayed an error message if process name exceed 255 characters', () => {
appListCloudComponent.checkAppIsDisplayed(simpleApp);
appListCloudComponent.goToApp(simpleApp);
processCloudDemoPage.openNewProcessForm();
startProcessPage.enterProcessName(processName255Characters);
@ -110,7 +107,7 @@ describe('Start Process', () => {
startProcessPage.blur(startProcessPage.processDefinition);
startProcessPage.checkValidationErrorIsDisplayed(requiredProcessError);
startProcessPage.selectFromProcessDropdown(processDefinition);
startProcessPage.selectFromProcessDropdown(processWithVariables);
startProcessPage.checkStartProcessButtonIsEnabled();
startProcessPage.clickStartProcessButton();
processCloudDemoPage.clickOnProcessFilters();

View File

@ -22,7 +22,6 @@ import {
LoginSSOPage, SettingsPage, AppListCloudPage, StringUtil, TaskHeaderCloudPage,
StartTasksCloudPage, PeopleCloudComponentPage, TasksService, ApiService, IdentityService
} from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { TaskDetailsCloudDemoPage } from '../pages/adf/demo-shell/process-services/taskDetailsCloudDemoPage';
import resources = require('../util/resources');
@ -46,9 +45,9 @@ describe('Start Task', () => {
const requiredError = 'Field required';
const dateValidationError = 'Date format DD/MM/YYYY';
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP.name;
let silentLogin, activitiUser;
let activitiUser;
let tasksService: TasksService;
let identityService: IdentityService;
@ -59,10 +58,8 @@ describe('Start Task', () => {
tasksService = new TasksService(apiService);
activitiUser = await identityService.createIdentityUser();
silentLogin = false;
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginSSOIdentityService(user, password);
done();
});

View File

@ -20,7 +20,6 @@ import TestConfig = require('../test.config');
import { LoginSSOPage, TasksService, ApiService, SettingsPage, AppListCloudPage, StringUtil } from '@alfresco/adf-testing';
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
import { browser } from 'protractor';
import resources = require('../util/resources');
describe('Task filters cloud', () => {
@ -34,15 +33,12 @@ describe('Task filters cloud', () => {
let tasksService: TasksService;
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
let silentLogin;
const newTask = StringUtil.generateRandomString(5), completedTask = StringUtil.generateRandomString(5);
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP.name;
beforeAll(() => {
silentLogin = false;
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginSSOIdentityService(user, password);
});

View File

@ -23,7 +23,6 @@ import moment = require('moment');
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
import { LoginSSOPage, SettingsPage, AppListCloudPage, TaskHeaderCloudPage, TasksService } from '@alfresco/adf-testing';
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
import { browser } from 'protractor';
import { TaskDetailsCloudDemoPage } from '../pages/adf/demo-shell/process-services/taskDetailsCloudDemoPage';
import resources = require('../util/resources');
@ -32,7 +31,7 @@ describe('Task Header cloud component', () => {
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
const basicCreatedTaskName = StringUtil.generateRandomString(), completedTaskName = StringUtil.generateRandomString();
let basicCreatedTask, basicCreatedDate, completedTask, completedCreatedDate, subTask, subTaskCreatedDate;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP.name;
const priority = 30, description = 'descriptionTask', formatDate = 'DD-MM-YYYY';
const taskHeaderCloudPage = new TaskHeaderCloudPage();
@ -45,13 +44,9 @@ describe('Task Header cloud component', () => {
const taskDetailsCloudDemoPage = new TaskDetailsCloudDemoPage();
let tasksService: TasksService;
let silentLogin;
beforeAll(async (done) => {
silentLogin = false;
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginSSOIdentityService(user, password);
const apiService = new ApiService('activiti', TestConfig.adf.hostBPM, TestConfig.adf.hostSso, 'BPM');

View File

@ -30,7 +30,6 @@ import moment = require('moment');
import { DateUtil } from '../util/dateUtil';
import { NotificationPage } from '../pages/adf/notificationPage';
import { browser } from 'protractor';
import resources = require('../util/resources');
describe('Edit task filters and task list properties', () => {
@ -49,9 +48,8 @@ describe('Edit task filters and task list properties', () => {
let processInstancesService: ProcessInstancesService;
const notificationPage = new NotificationPage();
let silentLogin;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
const candidateUserApp = resources.ACTIVITI7_APPS.CANDIDATE_USER_APP;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP.name;
const candidateUserApp = resources.ACTIVITI7_APPS.CANDIDATE_USER_APP.name;
const noTasksFoundMessage = 'No Tasks Found';
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
@ -63,11 +61,9 @@ describe('Edit task filters and task list properties', () => {
const afterDate = moment().add(1, 'days').format('DD/MM/YYYY');
beforeAll(async (done) => {
silentLogin = false;
const jsonFile = new TaskListCloudConfiguration().getConfiguration();
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginSSOIdentityService(user, password);
navigationBarPage.clickConfigEditorButton();
@ -80,7 +76,7 @@ describe('Edit task filters and task list properties', () => {
configEditorPage.clickEditTaskConfiguration();
configEditorPage.clickClearButton();
browser.driver.sleep(5000);
configEditorPage.enterBigConfigurationText(`{
"filterProperties": [
"appName",
@ -305,7 +301,7 @@ describe('Edit task filters and task list properties', () => {
tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(createdTask.entry.name);
});
it('[C297691] Task is not displayed when typing into lastModifiedFrom field a date before the task due date ' +
xit('[C297691] Task is not displayed when typing into lastModifiedFrom field a date before the task due date ' +
'and into lastModifiedTo a date before task due date', function () {
tasksCloudDemoPage.myTasksFilter().checkTaskFilterIsDisplayed();
@ -316,7 +312,7 @@ describe('Edit task filters and task list properties', () => {
expect(tasksCloudDemoPage.taskListCloudComponent().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
});
it('[C297692] Task is displayed when typing into lastModifiedFrom field a date before the tasks due date ' +
xit('[C297692] Task is displayed when typing into lastModifiedFrom field a date before the tasks due date ' +
'and into lastModifiedTo a date after', function () {
tasksCloudDemoPage.myTasksFilter().checkTaskFilterIsDisplayed();

View File

@ -36,18 +36,15 @@ describe('Task list cloud - selection', () => {
let tasksService: TasksService;
let silentLogin;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP.name;
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
const noOfTasks = 3;
let response;
const tasks = [];
beforeAll(async (done) => {
silentLogin = false;
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginSSOIdentityService(user, password);
const apiService = new ApiService('activiti', TestConfig.adf.hostBPM, TestConfig.adf.hostSso, 'BPM');

View File

@ -22,7 +22,6 @@ import { NavigationBarPage } from '../pages/adf/navigationBarPage';
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
import { AppListCloudPage } from '@alfresco/adf-testing';
import { browser } from 'protractor';
import resources = require('../util/resources');
describe('Task filters cloud', () => {
@ -38,21 +37,18 @@ describe('Task filters cloud', () => {
let processInstancesService: ProcessInstancesService;
let queryService: QueryService;
let silentLogin;
const createdTaskName = StringUtil.generateRandomString(), completedTaskName = StringUtil.generateRandomString(),
assignedTaskName = StringUtil.generateRandomString(), deletedTaskName = StringUtil.generateRandomString();
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP.name;
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
let assignedTask, deletedTask, suspendedTasks;
const orderByNameAndPriority = ['cCreatedTask', 'dCreatedTask', 'eCreatedTask'];
let priority = 30;
const nrOfTasks = 3;
beforeAll(async () => {
silentLogin = false;
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
beforeAll(async (done) => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginSSOIdentityService(user, password);
const apiService = new ApiService('activiti', TestConfig.adf.hostBPM, TestConfig.adf.hostSso, 'BPM');
@ -83,6 +79,7 @@ describe('Task filters cloud', () => {
await processInstancesService.suspendProcessInstance(processInstance.entry.id, simpleApp);
await processInstancesService.deleteProcessInstance(secondProcessInstance.entry.id, simpleApp);
await queryService.getProcessInstanceTasks(processInstance.entry.id, simpleApp);
done();
});
beforeEach(async (done) => {

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -18,8 +18,6 @@
import { LoginPage } from '@alfresco/adf-testing';
import { SearchResultsPage } from '../../pages/adf/searchResultsPage';
import { SearchFiltersPage } from '../../pages/adf/searchFiltersPage';
import { ConfigEditorPage } from '../../pages/adf/configEditorPage';
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
import { SearchDialog } from '../../pages/adf/dialog/searchDialog';
import { AcsUserModel } from '../../models/ACS/acsUserModel';
@ -32,13 +30,12 @@ import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { UploadActions } from '../../actions/ACS/upload.actions';
import { browser } from 'protractor';
import { StringUtil } from '@alfresco/adf-testing';
import { setConfigField } from '../../proxy';
describe('Search Checklist Component', () => {
const loginPage = new LoginPage();
const searchFiltersPage = new SearchFiltersPage();
const configEditorPage = new ConfigEditorPage();
const navigationBarPage = new NavigationBarPage();
const searchDialog = new SearchDialog();
const searchResults = new SearchResultsPage();
@ -139,18 +136,13 @@ describe('Search Checklist Component', () => {
jsonFile = searchConfiguration.getConfiguration();
});
it('[C277143] Should be able to click show more/less button with pageSize set as default', () => {
navigationBarPage.clickConfigEditorButton();
fit('[C277143] Should be able to click show more/less button with pageSize set as default', async() => {
for (let numberOfOptions = 0; numberOfOptions < 8; numberOfOptions++) {
jsonFile.categories[1].component.settings.options.push({ 'name': 'Folder', 'value': "TYPE:'cm:folder'" });
}
configEditorPage.clickSearchConfiguration();
configEditorPage.clickClearButton();
configEditorPage.enterBigConfigurationText(JSON.stringify(jsonFile));
configEditorPage.clickSaveButton();
await setConfigField('search', JSON.stringify(jsonFile));
browser.sleep(2000);
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
searchFiltersPage.clickCheckListFilter();
@ -176,19 +168,14 @@ describe('Search Checklist Component', () => {
browser.refresh();
});
it('[C277144] Should be able to click show more/less button with pageSize set with a custom value', () => {
navigationBarPage.clickConfigEditorButton();
it('[C277144] Should be able to click show more/less button with pageSize set with a custom value', async() => {
jsonFile.categories[1].component.settings.pageSize = 10;
for (let numberOfOptions = 0; numberOfOptions < 8; numberOfOptions++) {
jsonFile.categories[1].component.settings.options.push({ 'name': 'Folder', 'value': "TYPE:'cm:folder'" });
}
configEditorPage.clickSearchConfiguration();
configEditorPage.clickClearButton();
configEditorPage.enterBigConfigurationText(JSON.stringify(jsonFile));
configEditorPage.clickSaveButton();
await setConfigField('search', JSON.stringify(jsonFile));
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
searchFiltersPage.clickCheckListFilter();
@ -197,16 +184,9 @@ describe('Search Checklist Component', () => {
searchFiltersPage.checkListFiltersPage().checkShowMoreButtonIsNotDisplayed();
browser.refresh();
navigationBarPage.clickConfigEditorButton();
jsonFile.categories[1].component.settings.pageSize = 11;
configEditorPage.clickSearchConfiguration();
configEditorPage.clickClearButton();
configEditorPage.enterBigConfigurationText(JSON.stringify(jsonFile));
configEditorPage.clickSaveButton();
await setConfigField('search', JSON.stringify(jsonFile));
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
searchFiltersPage.clickCheckListFilter();
@ -217,14 +197,9 @@ describe('Search Checklist Component', () => {
browser.refresh();
navigationBarPage.clickConfigEditorButton();
jsonFile.categories[1].component.settings.pageSize = 9;
configEditorPage.clickSearchConfiguration();
configEditorPage.clickClearButton();
configEditorPage.enterBigConfigurationText(JSON.stringify(jsonFile));
configEditorPage.clickSaveButton();
await setConfigField('search', JSON.stringify(jsonFile));
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
searchFiltersPage.clickCheckListFilter();
@ -236,19 +211,14 @@ describe('Search Checklist Component', () => {
browser.refresh();
});
it('[C277145] Should be able to click show more/less button with pageSize set to zero', () => {
navigationBarPage.clickConfigEditorButton();
it('[C277145] Should be able to click show more/less button with pageSize set to zero', async() => {
jsonFile.categories[1].component.settings.pageSize = 0;
for (let numberOfOptions = 0; numberOfOptions < 8; numberOfOptions++) {
jsonFile.categories[1].component.settings.options.push({ 'name': 'Folder', 'value': "TYPE:'cm:folder'" });
}
configEditorPage.clickSearchConfiguration();
configEditorPage.clickClearButton();
configEditorPage.enterBigConfigurationText(JSON.stringify(jsonFile));
configEditorPage.clickSaveButton();
await setConfigField('search', JSON.stringify(jsonFile));
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
searchFiltersPage.clickCheckListFilter();
@ -267,14 +237,9 @@ describe('Search Checklist Component', () => {
browser.refresh();
navigationBarPage.clickConfigEditorButton();
delete jsonFile.categories[1].component.settings.pageSize;
configEditorPage.clickSearchConfiguration();
configEditorPage.clickClearButton();
configEditorPage.enterBigConfigurationText(JSON.stringify(jsonFile));
configEditorPage.clickSaveButton();
await setConfigField('search', JSON.stringify(jsonFile));
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
searchFiltersPage.clickCheckListFilter();
@ -309,15 +274,10 @@ describe('Search Checklist Component', () => {
done();
});
it('[C277018] Should be able to change the operator', () => {
navigationBarPage.clickConfigEditorButton();
it('[C277018] Should be able to change the operator', async() => {
jsonFile.categories[1].component.settings.operator = 'AND';
configEditorPage.clickSearchConfiguration();
configEditorPage.clickClearButton();
configEditorPage.enterBigConfigurationText(JSON.stringify(jsonFile));
configEditorPage.clickSaveButton();
await setConfigField('search', JSON.stringify(jsonFile));
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
searchFiltersPage.clickCheckListFilter();
@ -336,15 +296,10 @@ describe('Search Checklist Component', () => {
browser.refresh();
});
it('[C277019] Should be able to add new properties with different types', () => {
navigationBarPage.clickConfigEditorButton();
it('[C277019] Should be able to add new properties with different types', async() => {
jsonFile.categories[1].component.settings.options.push({ 'name': filterType.custom, 'value': "TYPE:'cm:auditable'" });
configEditorPage.clickSearchConfiguration();
configEditorPage.clickClearButton();
configEditorPage.enterBigConfigurationText(JSON.stringify(jsonFile));
configEditorPage.clickSaveButton();
await setConfigField('search', JSON.stringify(jsonFile));
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
searchFiltersPage.clickCheckListFilter();

View File

@ -68,7 +68,7 @@ describe('Search component - Text widget', () => {
}
}, {}, {});
await browser.driver.sleep(10000);
await browser.driver.sleep(15000);
loginPage.loginToContentServicesUsingUserModel(acsUser);

View File

@ -98,7 +98,7 @@ describe('Search component - Search Page', () => {
await uploadActions.createEmptyFiles(this.alfrescoJsApi, adminFileNames, newFolderModelUploaded.entry.id);
browser.driver.sleep(15000);
browser.driver.sleep(10000);
loginPage.loginToContentServicesUsingUserModel(acsUser);

View File

@ -36,8 +36,8 @@ exports.Files = {
}
},
APP_WITH_PROCESSES:{
file_location:"/resources/apps/App_with_processes.zip",
APP_WITH_PROCESSES: {
file_location: "/resources/apps/App_with_processes.zip",
title: "App_with_processes",
description: "Description for app",
process_se_name: "process_with_se",
@ -45,15 +45,15 @@ exports.Files = {
task_name: "Task Test 2"
},
APP_DYNAMIC_TABLE_DROPDOWN:{
file_location:"/resources/apps/AppDynamicTableDropdown.zip",
APP_DYNAMIC_TABLE_DROPDOWN: {
file_location: "/resources/apps/AppDynamicTableDropdown.zip",
title: "App3576",
description: "Description for app",
processName: "Process3576"
},
APP_WITH_USER_WIDGET:{
file_location:"/resources/apps/appWithUser.zip",
APP_WITH_USER_WIDGET: {
file_location: "/resources/apps/appWithUser.zip",
title: "appWithUser",
description: "Description for app",
processName: "ProcessWithUser",
@ -361,7 +361,7 @@ exports.Files = {
last_page_number: "8",
password: "1q2w3e4r"
},
LARGE_FILE:{
LARGE_FILE: {
file_location: "/resources/adf/BigFile.zip",
file_name: "BigFile.zip"
},
@ -454,15 +454,15 @@ exports.Files = {
file_location: "/resources/adf/allFileTypes/a_zip_file.mp4.zip",
file_name: "a_zip_file.mp4.zip"
},
PAGES:{
PAGES: {
file_location: "/resources/adf/allFileTypes/file_unsupported.pages",
file_name: "file_unsupported.pages"
},
UNSUPPORTED:{
UNSUPPORTED: {
file_location: "/resources/adf/allFileTypes/file_unsupported.3DS",
file_name: "file_unsupported.3DS"
},
INI:{
INI: {
file_location: "/resources/adf/allFileTypes/desktop.ini",
file_name: "desktop.ini"
},
@ -514,7 +514,20 @@ exports.Files = {
};
exports.ACTIVITI7_APPS = {
CANDIDATE_USER_APP : "candidateuserapp",
SIMPLE_APP : "simple-app",
SUB_PROCESS_APP : "subprocess-app"
CANDIDATE_USER_APP: {
name: "candidateuserapp",
file_location: "/resources/activiti7/candidateuserapp.zip"
},
SIMPLE_APP: {
name: "simpleapp",
file_location: "/resources/activiti7/simpleApp.zip",
processes: {
processwithvariables: "processwithvariables",
simpleProcess: "simpleProcess"
}
},
SUB_PROCESS_APP: {
name: "subprocess-app",
file_location: "/resources/activiti7/subProcessApp.zip",
}
};

View File

@ -38,7 +38,8 @@ export enum AppConfigValues {
LOGIN_ROUTE = 'loginRoute',
DISABLECSRF = 'disableCSRF',
AUTH_WITH_CREDENTIALS = 'auth.withCredentials',
APPLICATION = 'application'
APPLICATION = 'application',
NOTIFY_DURATION = 'notificationDefaultDuration'
}
export enum Status {

View File

@ -21,6 +21,11 @@ import { AppConfigService } from '../app-config/app-config.service';
import { TestBed } from '@angular/core/testing';
import { ClipboardModule } from './clipboard.module';
import { ClipboardService } from './clipboard.service';
import { TranslationService } from '../services/translation.service';
import { AppConfigServiceMock } from '../mock/app-config.service.mock';
import { HttpClientModule } from '@angular/common/http';
import { MatSnackBarModule } from '@angular/material';
import { TranslationMock } from '@alfresco/adf-core';
describe('ClipboardService', () => {
let clipboardService: ClipboardService;
@ -30,20 +35,15 @@ describe('ClipboardService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
ClipboardModule
ClipboardModule,
HttpClientModule,
MatSnackBarModule
],
providers: [
LogService,
NotificationService,
{
provide: AppConfigService,
useValue: new AppConfigService(null)
},
{
provide: NotificationService,
useValue: new NotificationService(null, null)
}
{ provide: TranslationService, useClass: TranslationMock },
{ provide: AppConfigService, useClass: AppConfigServiceMock },
NotificationService
]
});
});

View File

@ -25,6 +25,7 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { NotificationService } from './notification.service';
import { TranslationMock } from '../mock/translation.service.mock';
import { TranslationService } from './translation.service';
import { HttpClientModule } from '@angular/common/http';
@Component({
template: '',
@ -76,7 +77,8 @@ describe('NotificationService', () => {
imports: [
NoopAnimationsModule,
OverlayModule,
MatSnackBarModule
MatSnackBarModule,
HttpClientModule
],
declarations: [ProvidesNotificationServiceComponent],
providers: [

View File

@ -18,16 +18,20 @@
import { Injectable } from '@angular/core';
import { MatSnackBar, MatSnackBarRef, MatSnackBarConfig } from '@angular/material';
import { TranslationService } from './translation.service';
import { AppConfigService, AppConfigValues } from '../app-config/app-config.service';
@Injectable({
providedIn: 'root'
})
export class NotificationService {
static DEFAULT_DURATION_MESSAGE: number = 5000;
DEFAULT_DURATION_MESSAGE: number = 5000;
constructor(private snackBar: MatSnackBar,
private translationService: TranslationService) {
private translationService: TranslationService,
private appConfigService: AppConfigService) {
this.DEFAULT_DURATION_MESSAGE = this.appConfigService.get<number>(AppConfigValues.NOTIFY_DURATION) || this.DEFAULT_DURATION_MESSAGE;
}
/**
@ -36,7 +40,10 @@ export class NotificationService {
* @param config Time before notification disappears after being shown or MatSnackBarConfig object
* @returns Information/control object for the SnackBar
*/
openSnackMessage(message: string, config: number | MatSnackBarConfig = NotificationService.DEFAULT_DURATION_MESSAGE): MatSnackBarRef<any> {
openSnackMessage(message: string, config?: number | MatSnackBarConfig): MatSnackBarRef<any> {
if (!config) {
config = this.DEFAULT_DURATION_MESSAGE;
}
const translatedMessage = this.translationService.instant(message);
@ -56,7 +63,10 @@ export class NotificationService {
* @param config Time before notification disappears after being shown or MatSnackBarConfig object
* @returns Information/control object for the SnackBar
*/
openSnackMessageAction(message: string, action: string, config: number | MatSnackBarConfig = NotificationService.DEFAULT_DURATION_MESSAGE): MatSnackBarRef<any> {
openSnackMessageAction(message: string, action: string, config?: number | MatSnackBarConfig): MatSnackBarRef<any> {
if (!config) {
config = this.DEFAULT_DURATION_MESSAGE;
}
const translatedMessage = this.translationService.instant(message);

View File

@ -24,7 +24,7 @@ import { FormCloudComponent } from './components/form-cloud.component';
import { UploadCloudWidgetComponent } from './components/upload-cloud.widget';
import { MaterialModule } from '../material.module';
import { TaskFormCloudComponent } from './components/task-form-cloud.component';
import { TaskModule } from '../task/task.module';
import { TaskCloudModule } from '../task/task-cloud.module';
@NgModule({
imports: [
@ -37,7 +37,7 @@ import { TaskModule } from '../task/task.module';
ReactiveFormsModule,
FormBaseModule,
CoreModule,
TaskModule
TaskCloudModule
],
declarations: [FormCloudComponent, UploadCloudWidgetComponent, TaskFormCloudComponent],
entryComponents: [

View File

@ -20,19 +20,22 @@ import { TaskListCloudModule } from './task-list/task-list-cloud.module';
import { TaskFiltersCloudModule } from './task-filters/task-filters-cloud.module';
import { StartTaskCloudModule } from './start-task/start-task-cloud.module';
import { TaskHeaderCloudModule } from './task-header/task-header-cloud.module';
import { TaskDirectiveModule } from './directives/task-directive.module';
@NgModule({
imports: [
TaskListCloudModule,
TaskFiltersCloudModule,
StartTaskCloudModule,
TaskHeaderCloudModule
TaskHeaderCloudModule,
TaskDirectiveModule
],
exports: [
TaskListCloudModule,
TaskFiltersCloudModule,
StartTaskCloudModule,
TaskHeaderCloudModule
TaskHeaderCloudModule,
TaskDirectiveModule
]
})
export class TaskCloudModule { }

View File

@ -31,7 +31,17 @@ export class ProcessDefinitionsService {
const queryParams = {};
try {
const data = await this.api.performBpmOperation(path, method, queryParams, {});
return data;
} catch (error) {
if (error.status === 404) {
// tslint:disable-next-line:no-console
console.log(`${appName} not present`);
} else if (error.status === 403) {
// tslint:disable-next-line:no-console
console.log(`Access to the requested resource has been denied ${appName}`);
}
}
}
}

View File

@ -41,7 +41,7 @@ export class EditProcessFilterCloudComponentPage {
checkCustomiseFilterHeaderIsExpanded() {
const expansionPanelExtended = element.all(by.css('mat-expansion-panel-header[class*="mat-expanded"]')).first();
BrowserVisibility.waitUntilElementIsVisible(expansionPanelExtended);
const content = element(by.css('div[class*="mat-expansion-panel-content "][style*="visible"]'));
const content = element.all(by.css('div[class*="mat-expansion-panel-content "][style*="visible"]')).first();
BrowserVisibility.waitUntilElementIsVisible(content);
return this;
}

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { by, element, protractor } from 'protractor';
import { browser, by, element, protractor } from 'protractor';
import { BrowserVisibility } from '../../core/browser-visibility';
export class GroupCloudComponentPage {
@ -24,6 +24,7 @@ export class GroupCloudComponentPage {
searchGroups(name) {
BrowserVisibility.waitUntilElementIsVisible(this.groupCloudSearch);
browser.sleep(1000);
this.groupCloudSearch.clear().then(() => {
for (let i = 0; i < name.length; i++) {
this.groupCloudSearch.sendKeys(name[i]);
@ -53,6 +54,7 @@ export class GroupCloudComponentPage {
selectGroupFromList(name) {
const groupRow = element.all(by.cssContainingText('mat-option span', name)).first();
BrowserVisibility.waitUntilElementIsVisible(groupRow);
browser.sleep(1000);
groupRow.click();
BrowserVisibility.waitUntilElementIsNotVisible(groupRow);
return this;

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { by, element, protractor } from 'protractor';
import { browser, by, element, protractor } from 'protractor';
import { BrowserVisibility } from '../../core/browser-visibility';
export class PeopleCloudComponentPage {
@ -34,6 +34,7 @@ export class PeopleCloudComponentPage {
searchAssignee(name) {
BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudSearch);
BrowserVisibility.waitUntilElementIsClickable(this.peopleCloudSearch);
browser.sleep(1000);
this.peopleCloudSearch.clear().then(() => {
for (let i = 0; i < name.length; i++) {
this.peopleCloudSearch.sendKeys(name[i]);
@ -57,6 +58,7 @@ export class PeopleCloudComponentPage {
selectAssigneeFromList(name) {
const assigneeRow = element(by.cssContainingText('mat-option span.adf-people-label-name', name));
BrowserVisibility.waitUntilElementIsVisible(assigneeRow);
browser.sleep(1000);
assigneeRow.click();
BrowserVisibility.waitUntilElementIsNotVisible(assigneeRow);
return this;
@ -86,6 +88,7 @@ export class PeopleCloudComponentPage {
getAssigneeFieldContent() {
BrowserVisibility.waitUntilElementIsVisible(this.assigneeField);
browser.sleep(1000);
return this.assigneeField.getAttribute('value');
}

View File

@ -24,8 +24,8 @@ export class ProcessHeaderCloudPage {
nameField = element.all(by.css('span[data-automation-id*="name"] span')).first();
statusField = element(by.css('span[data-automation-id*="status"] span'));
initiatorField = element(by.css('span[data-automation-id*="initiator"] span'));
startDateField = element(by.css('span[data-automation-id*="startDate"] span'));
lastModifiedField = element(by.css('span[data-automation-id*="lastModified"] span'));
startDateField = element.all(by.css('span[data-automation-id*="startDate"] span')).first();
lastModifiedField = element.all(by.css('span[data-automation-id*="lastModified"] span')).first();
parentIdField = element(by.css('span[data-automation-id*="parentId"] span'));
businessKeyField = element.all(by.css('span[data-automation-id*="businessKey"] span')).first();

View File

@ -86,6 +86,7 @@ export class StartProcessCloudPage {
}
checkStartProcessButtonIsEnabled() {
BrowserVisibility.waitUntilElementIsClickable(this.startProcessButton);
expect(this.startProcessButton.isEnabled()).toBe(true);
}

View File

@ -27,7 +27,7 @@ export class StartTasksCloudPage {
startButton = element(by.css('button[id="button-start"]'));
startButtonEnabled = element(by.css('button[id="button-start"]:not(disabled)'));
cancelButton = element(by.css('button[id="button-cancel"]'));
form = element(by.css('adf-cloud-start-task form'));
form = element.all(by.css('adf-cloud-start-task form')).first();
checkFormIsDisplayed() {
BrowserVisibility.waitUntilElementIsVisible(this.form);

View File

@ -23,7 +23,7 @@ export class TaskHeaderCloudPage {
assigneeField = element(by.css('span[data-automation-id*="assignee"] span'));
statusField = element(by.css('span[data-automation-id*="status"] span'));
priorityField = element(by.css('span[data-automation-id*="priority"] span'));
dueDateField = element(by.css('span[data-automation-id*="dueDate"] span'));
dueDateField = element.all(by.css('span[data-automation-id*="dueDate"] span')).first();
categoryField = element(by.css('span[data-automation-id*="category"] span'));
createdField = element(by.css('span[data-automation-id="card-dateitem-created"] span'));
parentNameField = element(by.css('span[data-automation-id*="parentName"] span'));

73
package-lock.json generated
View File

@ -1,69 +1,69 @@
{
"name": "alfresco-components",
"version": "3.2.0-beta3",
"version": "3.2.0-beta6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@alfresco/adf-content-services": {
"version": "3.2.0-beta3",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-3.2.0-beta3.tgz",
"integrity": "sha512-OVPpclIBbJjFmRPXD8fGGBk0t7i6Avz3Xuk/DjgxFZfJdJDEb+it2KSPR4wT38NZS95vJHtB6TCfh76rMQJzHQ==",
"version": "3.2.0-beta6",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-3.2.0-beta6.tgz",
"integrity": "sha512-ENQKbCZ8p6mOHFijS5gDIoUZHdX7nSQw87I9U1qxZA85/5Y7tOz58ZmRhA6tathN2S/D6nsXgAqql+y6HGCdTw==",
"requires": {
"tslib": "^1.9.0"
}
},
"@alfresco/adf-core": {
"version": "3.2.0-beta3",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-3.2.0-beta3.tgz",
"integrity": "sha512-lT7c9QYatJS4x3oAupgiASCGvzQyowZWBoYu32YctS/F6876QAPPaegjkRxqitWjfvs7aXRaCYydb5BoDeLkRg==",
"version": "3.2.0-beta6",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-3.2.0-beta6.tgz",
"integrity": "sha512-DCe2FLGL3UnRCQ7cnxHKZhmK3inWaERhguTl2WIwEWl2wmyJoDd2tDQrc2cfIdjNrqpz3D6yJQdFtExv4XseKw==",
"requires": {
"tslib": "^1.9.0"
}
},
"@alfresco/adf-extensions": {
"version": "3.2.0-beta3",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.2.0-beta3.tgz",
"integrity": "sha512-TEguuRhzbj6cAeawLJqcK0o8lNzeRO7Pmw9Paxeu9m5RtQEPfvwGydDrlDGWnJ3H5Xx8byxhERIgdOfuK2SWTg==",
"version": "3.2.0-beta6",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.2.0-beta6.tgz",
"integrity": "sha512-fPN2kf7NyWU9FvmE9KHayKG87RZEUIzhXRAHGgCuXMzjXsJdddPoNF8c9cvb03MfEFuGHU6cHR75x2Td+GL94w==",
"requires": {
"tslib": "^1.9.0"
}
},
"@alfresco/adf-insights": {
"version": "3.2.0-beta3",
"resolved": "https://registry.npmjs.org/@alfresco/adf-insights/-/adf-insights-3.2.0-beta3.tgz",
"integrity": "sha512-19zsI39GREZ6fzvs+4fw0FktMSLz6qSq8P2+QTRUThvtL1KZFLeW76BEZPX19YG/K0OuQvuLTXKt2tsf1CChRw==",
"version": "3.2.0-beta6",
"resolved": "https://registry.npmjs.org/@alfresco/adf-insights/-/adf-insights-3.2.0-beta6.tgz",
"integrity": "sha512-i3ak+KZFVaNaikoa0hrF+U/v5y/YUuPFJTFGg32wsRtfeJuCC4IhcyRx6VHRO4QIwnhVKSDh1QPx86DjKpW44Q==",
"requires": {
"tslib": "^1.9.0"
}
},
"@alfresco/adf-process-services": {
"version": "3.2.0-beta3",
"resolved": "https://registry.npmjs.org/@alfresco/adf-process-services/-/adf-process-services-3.2.0-beta3.tgz",
"integrity": "sha512-rwJLBrrRI+ndHa7H+RMMlLtbs44yR4Y1pMOCnfchqtGD1m7G/D2g/n5WHo7fp832rU8RP3yw/ZEz4WzMZuxcfA==",
"version": "3.2.0-beta6",
"resolved": "https://registry.npmjs.org/@alfresco/adf-process-services/-/adf-process-services-3.2.0-beta6.tgz",
"integrity": "sha512-QfwhCR6Ykk4ny5NAMwtDAs+UkaGopvmyAwcFglim/RwQJKF3MnFG/gX0K/p6eJDzDRZhoumfzh+I/mBU5DVk9Q==",
"requires": {
"tslib": "^1.9.0"
}
},
"@alfresco/adf-process-services-cloud": {
"version": "3.2.0-beta3",
"resolved": "https://registry.npmjs.org/@alfresco/adf-process-services-cloud/-/adf-process-services-cloud-3.2.0-beta3.tgz",
"integrity": "sha512-j0QWbMBvGN/zRfI0L7V+uXQvY8pSBnOsvBpUEh889WPlf/XWacfKC+a08/UHH5l0YRuWdn4H7cenYrMewdzgiA==",
"version": "3.2.0-beta6",
"resolved": "https://registry.npmjs.org/@alfresco/adf-process-services-cloud/-/adf-process-services-cloud-3.2.0-beta6.tgz",
"integrity": "sha512-lhqU/n1AptJm3ALYImdCj1VpvVbllT8qyBCO/yQN9W+GrRNGnapZh8H7sS1JwTgRkfJMqRAUWQpnlWc1sEK/JA==",
"requires": {
"tslib": "^1.9.0"
}
},
"@alfresco/adf-testing": {
"version": "3.2.0-beta3",
"resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-3.2.0-beta3.tgz",
"integrity": "sha512-aB4duKaP4CUms90FrvNyL6xunjTHguwYlTlF+/ImqmEZbS0gIvFajyzEbSv0xbtFJRbuYWVQTh41ad6n2vml9A==",
"version": "3.2.0-beta6",
"resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-3.2.0-beta6.tgz",
"integrity": "sha512-xweqGzrgK2lvzQONc3ZC4cXWsLXTmesr1oybEu06FbK9MkXf+aUlGvCG3hLueYkU3GwnLRFu9ZsDnRCH8ZIwfA==",
"requires": {
"tslib": "^1.9.0"
}
},
"@alfresco/js-api": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-3.1.0.tgz",
"integrity": "sha512-kjh2vmbZ2LImNVUOfmYz6kZPcv/8IoMFLtOOcL5IrBg6PdYxYlmjAw5Gs/5wlNHuqSnZe6nNfZCPlmYDxsL6aQ==",
"version": "3.2.0-beta6",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-3.2.0-beta6.tgz",
"integrity": "sha512-XWsA5lTcrJ5WOeXvej/TAh9NEyExue4SO07RvLNNU+NKB8lW/3V0N29V8I15daquh4eJWi783SJz+24Pbp6Edw==",
"requires": {
"event-emitter": "0.3.4",
"superagent": "3.8.2"
@ -9534,21 +9534,6 @@
"integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=",
"dev": true
},
"jasmine-fail-fast": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/jasmine-fail-fast/-/jasmine-fail-fast-2.0.0.tgz",
"integrity": "sha1-5dguaimiX2YsZA5MMnDC+acTh+c=",
"requires": {
"lodash": "3.10.0"
},
"dependencies": {
"lodash": {
"version": "3.10.0",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.0.tgz",
"integrity": "sha1-k9UcZygopEFqEq9XIguoqHN+L7s="
}
}
},
"jasmine-reporters": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/jasmine-reporters/-/jasmine-reporters-2.3.2.tgz",
@ -13958,14 +13943,6 @@
}
}
},
"protractor-fail-fast": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/protractor-fail-fast/-/protractor-fail-fast-3.1.0.tgz",
"integrity": "sha512-OjuIFmY7hm5R/Msmioyg3aBevySpmpIgtm2TGUvMEqTzviPk/Fqd1HYmMjIQ+NzFMzrK+93LJa4civDvw1+hEg==",
"requires": {
"jasmine-fail-fast": "~2.0.0"
}
},
"protractor-html-reporter-2": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/protractor-html-reporter-2/-/protractor-html-reporter-2-1.0.4.tgz",

188
scripts/check-activiti-env.js Executable file
View File

@ -0,0 +1,188 @@
let path = require('path');
let fs = require('fs');
let alfrescoApi = require('@alfresco/js-api');
let program = require('commander');
let ACTIVITI7_APPS = require('../e2e/util/resources').ACTIVITI7_APPS;
let config = {};
let absentApps = [];
let host;
async function main() {
program
.version('0.1.0')
.option('--host [type]', 'Remote environment host adf.lab.com ')
.option('--client [type]', 'clientId ')
.option('-p, --password [type]', 'password ')
.option('-u, --username [type]', 'username ')
.parse(process.argv);
config = {
provider: 'BPM',
hostBpm: `http://${program.host}`,
authType: 'OAUTH',
oauth2: {
host: `http://${program.host}/auth/realms/alfresco`,
clientId: program.client,
scope: 'openid',
secret: '',
implicitFlow: false,
silentLogin: false,
redirectUri: '/',
redirectUriLogout: '/logout'
}
};
host = program.host;
try {
this.alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility(config);
await this.alfrescoJsApi.login(program.username, program.password);
} catch (e) {
console.log('Login error' + e);
}
let appsDeployed = await getDeployedApplicationsByStatus(this.alfrescoJsApi, 'RUNNING');
Object.keys(ACTIVITI7_APPS).forEach((key) => {
let isPresent = appsDeployed.find((currentApp) => {
return ACTIVITI7_APPS[key].name === currentApp.entry.name;
});
if (!isPresent) {
absentApps.push(ACTIVITI7_APPS[key]);
}
});
if (absentApps.length > 0) {
console.log(`The following apps are missing in the target env ${JSON.stringify(absentApps)}`)
await checkIfAppIsReleased(this.alfrescoJsApi, absentApps);
process.exit(1);
}
}
async function checkIfAppIsReleased(apiService, absentApps) {
let listAppsInModeler = await getAppProjects(apiService);
for (let i = 0; i < absentApps.length; i++) {
let currentAbsentApp = absentApps[i];
let isPresent = listAppsInModeler.find((currentApp) => {
return currentAbsentApp.name === currentApp.entry.name;
});
if (!isPresent) {
console.log(`uplodare ` + currentAbsentApp.name);
let uploadedApp = await importApp(apiService, currentAbsentApp);
if (uploadedApp) {
await releaseApp(apiService, uploadedApp);
await deployApp(apiService, uploadedApp);
}
}
}
}
async function deployApp(apiService, app) {
const url = `${config.hostBpm}/alfresco-deployment-service/v1/applications`;
const pathParams = {},
queryParams = {
"name": "re",
"releaseId": app.entry.id,
"security": [{"role": "APS_ADMIN", "groups": [], "users": ["admin.adf"]}, {
"role": "APS_USER",
"groups": [],
"users": ["admin.adf"]
}]
};
const headerParams = {}, formParams = {}, bodyParam = {},
contentTypes = ['multipart/form-data'], accepts = ['application/json'];
try {
return await apiService.oauth2Auth.callCustomApi(url, 'POST', pathParams, queryParams, headerParams, formParams, bodyParam,
contentTypes, accepts);
} catch (error) {
console.log(`Not possible to deploy the project ${app.entry.name} ` + error);
process.exit(1);
}
}
async function importApp(apiService, app) {
const pathFile = path.join('./e2e/' + app.file_location);
const file = fs.createReadStream(pathFile);
const url = `${config.hostBpm}/alfresco-modeling-service/v1/projects/import`;
const pathParams = {}, queryParams = {},
headerParams = {}, formParams = {'file': file}, bodyParam = {},
contentTypes = ['multipart/form-data'], accepts = ['application/json'];
try {
return await apiService.oauth2Auth.callCustomApi(url, 'POST', pathParams, queryParams, headerParams, formParams, bodyParam,
contentTypes, accepts);
} catch (error) {
console.log(`Not possible to upload the project ${app.name} ` + error);
process.exit(1);
}
}
async function releaseApp(apiService, app) {
const url = `${config.hostBpm}alfresco-modeling-service/v1/projects/${app.entry.id}/releases`;
console.log(url);
const pathParams = {}, queryParams = {},
headerParams = {}, formParams = {}, bodyParam = {},
contentTypes = ['application/json'], accepts = ['application/json'];
try {
return await apiService.oauth2Auth.callCustomApi(url, 'POST', pathParams, queryParams, headerParams, formParams, bodyParam,
contentTypes, accepts);
} catch (error) {
console.log(`Not possible to release the project ${app.entry.name} ` + error);
process.exit(1);
}
}
async function getDeployedApplicationsByStatus(apiService, status) {
const url = `${config.hostBpm}/alfresco-deployment-service/v1/applications`;
const pathParams = {}, queryParams = {status: status},
headerParams = {}, formParams = {}, bodyParam = {},
contentTypes = ['application/json'], accepts = ['application/json'];
let data;
try {
data = await apiService.oauth2Auth.callCustomApi(url, 'GET', pathParams, queryParams, headerParams, formParams, bodyParam,
contentTypes, accepts);
return data.list.entries;
} catch (error) {
console.log(`Not possible get the application from alfresco-deployment-service` + error);
process.exit(1);
}
}
async function getAppProjects(apiService, status) {
const url = `${config.hostBpm}/alfresco-modeling-service/v1/projects`;
const pathParams = {}, queryParams = {status: status},
headerParams = {}, formParams = {}, bodyParam = {},
contentTypes = ['application/json'], accepts = ['application/json'];
let data;
try {
data = await apiService.oauth2Auth.callCustomApi(url, 'GET', pathParams, queryParams, headerParams, formParams, bodyParam,
contentTypes, accepts);
return data.list.entries;
} catch (error) {
console.log(`Not possible get the application from alfresco-modeling-service` + error);
process.exit(1);
}
}
main();

View File

@ -7,7 +7,7 @@ DEVELOPMENT=false
EXECLINT=true
LITESERVER=false
EXEC_VERSION_JSAPI=false
TIMEOUT=7000
TIMEOUT=20000
SELENIUM_PROMISE_MANAGER=1
show_help() {

View File

@ -56,6 +56,6 @@ git add .
git commit -m "Update ADF packages version $VERSION"
git push -u origin $BRANCH
curl -H "Authorization: token $TOKEN" -X POST -d '{"body":"Update ADF packages version '$VERSION'","head":"'$BRANCH'","base":"development","title":"Update ADF packages version '$VERSION'"}' https://api.github.com/repos/alfresco/$NAME_REPO/pulls
curl -H "Authorization: token $TOKEN" -X POST -d '{"body":"Update ADF packages version '$VERSION'","head":"'$BRANCH'","base":"development","title":"Update ADF packages version '$VERSION'"}' https://api.github.com/repos/$NAME_REPO/pulls
rm -rf $TEMP_GENERATOR_DIR;