mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AD-4222] e2e compilation fixes (#4426)
* Run tsc on the e2e folder and as part of the sh script * in progress * in progress * in progress * in progress * in progress * in progress * fixing compile errors * fixing compile errors. * Fix the apiService and exclude nodemodules * Add semicolumn * fix import * fix configuration test package * fix * fix errors * fix typescript * restore packages.json * fix errors after rebase * fix type prolems and add protracotr path mapping * remove undefined
This commit is contained in:
committed by
Eugenio Romano
parent
f891ea3df5
commit
fc2132e248
@@ -17,21 +17,20 @@
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import TestConfig = require('../../test.config');
|
||||
import { AlfrescoApiConfig } from '@alfresco/js-api/src/alfrescoApiConfig';
|
||||
|
||||
export class ApiService {
|
||||
|
||||
HOST_SSO = TestConfig.adf.hostSso;
|
||||
HOST_BPM = TestConfig.adf.hostBPM;
|
||||
HOST_IDENTITY = TestConfig.adf.hostIdentity;
|
||||
HOST_SSO: string = TestConfig.adf.hostSso;
|
||||
HOST_BPM: string = TestConfig.adf.hostBPM;
|
||||
HOST_IDENTITY: string = TestConfig.adf.hostIdentity;
|
||||
|
||||
apiService = new AlfrescoApi({
|
||||
config: AlfrescoApiConfig = {
|
||||
provider: 'BPM',
|
||||
bpmHost: `${this.HOST_BPM}`,
|
||||
identityHost: `${this.HOST_IDENTITY}`,
|
||||
hostBpm: this.HOST_BPM,
|
||||
authType: 'OAUTH',
|
||||
oauth2: {
|
||||
host: `${this.HOST_SSO}`,
|
||||
authType: '/protocol/openid-connect/token',
|
||||
host: this.HOST_SSO,
|
||||
clientId: 'activiti',
|
||||
scope: 'openid',
|
||||
secret: '',
|
||||
@@ -41,7 +40,9 @@ export class ApiService {
|
||||
redirectUriLogout: '/logout'
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
apiService: any = new AlfrescoApi(this.config);
|
||||
|
||||
async login(username, password) {
|
||||
await this.apiService.login(username, password);
|
||||
|
@@ -17,15 +17,11 @@
|
||||
|
||||
import { ApiService } from '../APS-cloud/apiservice';
|
||||
import { Util } from '../../util/util';
|
||||
import { AppConfigService } from '@alfresco/adf-core';
|
||||
|
||||
export class GroupIdentity {
|
||||
|
||||
api: ApiService = new ApiService();
|
||||
|
||||
constructor(appConfig: AppConfigService) {
|
||||
}
|
||||
|
||||
async init(username, password) {
|
||||
await this.api.login(username, password);
|
||||
}
|
||||
|
@@ -17,15 +17,11 @@
|
||||
|
||||
import { ApiService } from '../APS-cloud/apiservice';
|
||||
import { Util } from '../../util/util';
|
||||
import { AppConfigService } from '@alfresco/adf-core';
|
||||
|
||||
export class Identity {
|
||||
|
||||
api: ApiService = new ApiService();
|
||||
|
||||
constructor(appConfig: AppConfigService) {
|
||||
}
|
||||
|
||||
async init(username, password) {
|
||||
await this.api.login(username, password);
|
||||
}
|
||||
|
@@ -16,15 +16,11 @@
|
||||
*/
|
||||
|
||||
import { ApiService } from '../APS-cloud/apiservice';
|
||||
import { AppConfigService } from '@alfresco/adf-core';
|
||||
|
||||
export class Roles {
|
||||
|
||||
api: ApiService = new ApiService();
|
||||
|
||||
constructor(appConfig: AppConfigService) {
|
||||
}
|
||||
|
||||
async init(username, password) {
|
||||
await this.api.login(username, password);
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ let JS_BIND_INPUT = function (target) {
|
||||
};
|
||||
|
||||
let JS_BIND_INPUT_FOLDER = function (target) {
|
||||
let input = document.createElement('input');
|
||||
let input: any = document.createElement('input');
|
||||
input.type = 'file';
|
||||
input.style.display = 'none';
|
||||
input.multiple = true;
|
||||
|
@@ -28,7 +28,6 @@ import { Util } from '../../util/util';
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Document List - Pagination', function () {
|
||||
let pagination = {
|
||||
|
@@ -21,12 +21,13 @@ import { ContentServicesPage } from '../pages/adf/contentServicesPage';
|
||||
import { AcsUserModel } from '../models/ACS/acsUserModel';
|
||||
import TestConfig = require('../test.config');
|
||||
import resources = require('../util/resources');
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi, SiteBodyCreate } from '@alfresco/js-api';
|
||||
import { FileModel } from '../models/ACS/fileModel';
|
||||
import { UploadActions } from '../actions/ACS/upload.actions';
|
||||
import { Util } from '../util/util';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||
import VisibilityEnum = SiteBodyCreate.VisibilityEnum;
|
||||
|
||||
describe('Permissions Component', function () {
|
||||
|
||||
@@ -73,7 +74,7 @@ describe('Permissions Component', function () {
|
||||
await alfrescoJsApi.login(fileOwnerUser.id, fileOwnerUser.password);
|
||||
|
||||
let siteName = Util.generateRandomString(5);
|
||||
let publicSiteBody = {'title': siteName, 'visibility': 'PUBLIC'};
|
||||
let publicSiteBody = { 'title': siteName, 'visibility': VisibilityEnum.PUBLIC };
|
||||
publicSite = await alfrescoJsApi.core.sitesApi.createSite(publicSiteBody);
|
||||
|
||||
folderName = Util.generateRandomString(5);
|
||||
|
@@ -29,6 +29,7 @@ import { Util } from '../util/util';
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '../actions/ACS/upload.actions';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Trashcan - Pagination', () => {
|
||||
let pagination = {
|
||||
|
@@ -89,7 +89,7 @@ describe('Upload component', () => {
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
let nodesPromise = await contentServicesPage.getContentList().getAllNodeIdInList();
|
||||
let nodesPromise = await contentServicesPage.getElementsDisplayedId();
|
||||
|
||||
nodesPromise.forEach(async (currentNodePromise) => {
|
||||
await currentNodePromise.then(async (currentNode) => {
|
||||
|
@@ -33,7 +33,8 @@ import { FolderModel } from '../../models/ACS/folderModel';
|
||||
import TestConfig = require('../../test.config');
|
||||
import resources = require('../../util/resources');
|
||||
|
||||
import AlfrescoApi = require('@alfresco/js-api');
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
|
||||
describe('Upload - User permission', () => {
|
||||
|
@@ -34,6 +34,7 @@ export class FileModel {
|
||||
secondPageText = resources.Files.ADF_DOCUMENTS.PDF.second_page_text;
|
||||
lastPageNumber = resources.Files.ADF_DOCUMENTS.PDF.last_page_number;
|
||||
createdAt = '';
|
||||
password = '';
|
||||
createdByUser = new CreatedByModel();
|
||||
modifiedByUser = new CreatedByModel();
|
||||
content: ContentModel = {};
|
||||
|
@@ -165,7 +165,7 @@ export class DataTableComponentPage {
|
||||
async getAllRowsColumnValues(column) {
|
||||
let columnLocator = by.css("adf-datatable div[class*='adf-datatable-body'] div[class*='adf-datatable-row'] div[title='" + column + "'] span");
|
||||
Util.waitUntilElementIsVisible(element.all(columnLocator).first());
|
||||
let initialList = await element.all(columnLocator).getText();
|
||||
let initialList: any = await element.all(columnLocator).getText();
|
||||
return initialList.filter((el) => el);
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ import { TaskListCloudComponent } from '../../process-cloud/taskListCloudCompone
|
||||
import { EditTaskFilterCloudComponent } from '../../process-cloud/editTaskFilterCloudComponent';
|
||||
import { FormControllersPage } from '../../material/formControllersPage';
|
||||
|
||||
import { element, by } from 'protractor';
|
||||
import { element, by, browser } from 'protractor';
|
||||
|
||||
export class TasksCloudDemoPage {
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element } from 'protractor';
|
||||
import { by, element, protractor } from 'protractor';
|
||||
import { Util } from '../../../util/util';
|
||||
|
||||
export class EditProcessFilterDialog {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element } from 'protractor';
|
||||
import { by, element, protractor } from 'protractor';
|
||||
import { Util } from '../../../util/util';
|
||||
|
||||
export class EditTaskFilterDialog {
|
||||
|
@@ -111,7 +111,7 @@ export class ShareDialog {
|
||||
}
|
||||
|
||||
calendarTodayDayIsDisabled() {
|
||||
const today = this.dayPicker.element(by.css('.mat-datetimepicker-calendar-body-today')).getText();
|
||||
const today: any = this.dayPicker.element(by.css('.mat-datetimepicker-calendar-body-today')).getText();
|
||||
Util.waitUntilElementIsPresent(element(by.cssContainingText('.mat-datetimepicker-calendar-body-disabled', today)));
|
||||
}
|
||||
|
||||
|
@@ -113,12 +113,6 @@ export class UploadDialog {
|
||||
return this;
|
||||
}
|
||||
|
||||
removeFileWhileUploading(content) {
|
||||
browser.driver.actions().mouseMove(this.getRowByRowName(content).element(this.sizeUploaded)).perform();
|
||||
this.getRowByRowName(content).element(this.cancelWhileUploadingIcon).click();
|
||||
return this;
|
||||
}
|
||||
|
||||
getTitleText() {
|
||||
Util.waitUntilElementIsVisible(this.title);
|
||||
let deferred = protractor.promise.defer();
|
||||
@@ -164,7 +158,7 @@ export class UploadDialog {
|
||||
|
||||
numberOfCurrentFilesUploaded() {
|
||||
let deferred = protractor.promise.defer();
|
||||
this.getTitleText().then((text) => {
|
||||
this.getTitleText().then((text: any) => {
|
||||
deferred.fulfill(text.split('Uploaded ')[1].split(' / ')[0]);
|
||||
});
|
||||
return deferred.promise;
|
||||
@@ -172,7 +166,7 @@ export class UploadDialog {
|
||||
|
||||
numberOfInitialFilesUploaded() {
|
||||
let deferred = protractor.promise.defer();
|
||||
this.getTitleText().then((text) => {
|
||||
this.getTitleText().then((text: any) => {
|
||||
deferred.fulfill(text.split('Uploaded ')[1].split(' / ')[1]);
|
||||
});
|
||||
return deferred.promise;
|
||||
|
@@ -38,7 +38,7 @@ export class FilePreviewPage {
|
||||
let deferred = protractor.promise.defer();
|
||||
Util.waitUntilElementIsVisible(this.pdfTitleFromSearch);
|
||||
Util.waitUntilElementIsVisible(this.textLayer);
|
||||
this.pdfTitleFromSearch.getText().then(function (result) {
|
||||
this.pdfTitleFromSearch.getText().then((result) => {
|
||||
deferred.fulfill(result);
|
||||
});
|
||||
return deferred.promise;
|
||||
@@ -152,13 +152,13 @@ export class FilePreviewPage {
|
||||
}
|
||||
|
||||
checkCanvasWidth() {
|
||||
return element.all(by.css(`div[class='canvasWrapper'] > canvas`)).first().getAttribute(`width`).then(function (width) {
|
||||
return element.all(by.css(`div[class='canvasWrapper'] > canvas`)).first().getAttribute(`width`).then((width) => {
|
||||
return width;
|
||||
});
|
||||
}
|
||||
|
||||
checkCanvasHeight() {
|
||||
return element.all(by.css(`div[class='canvasWrapper'] > canvas`)).first().getAttribute(`height`).then(function (height) {
|
||||
return element.all(by.css(`div[class='canvasWrapper'] > canvas`)).first().getAttribute(`height`).then((height) => {
|
||||
return height;
|
||||
});
|
||||
}
|
||||
@@ -175,14 +175,14 @@ export class FilePreviewPage {
|
||||
actualHeight,
|
||||
zoomedInHeight;
|
||||
|
||||
this.checkCanvasWidth().then(function (width) {
|
||||
this.checkCanvasWidth().then((width) => {
|
||||
actualWidth = width;
|
||||
if (actualWidth && zoomedInWidth) {
|
||||
expect(zoomedInWidth).toBeGreaterThan(actualWidth);
|
||||
}
|
||||
});
|
||||
|
||||
this.checkCanvasHeight().then(function (height) {
|
||||
this.checkCanvasHeight().then( (height) => {
|
||||
actualHeight = height;
|
||||
if (actualHeight && zoomedInHeight) {
|
||||
expect(zoomedInHeight).toBeGreaterThan(actualHeight);
|
||||
@@ -191,14 +191,14 @@ export class FilePreviewPage {
|
||||
|
||||
this.clickZoomIn();
|
||||
|
||||
this.checkCanvasWidth().then(function (width) {
|
||||
this.checkCanvasWidth().then((width) => {
|
||||
zoomedInWidth = width;
|
||||
if (actualWidth && zoomedInWidth) {
|
||||
expect(zoomedInWidth).toBeGreaterThan(actualWidth);
|
||||
}
|
||||
});
|
||||
|
||||
this.checkCanvasHeight().then(function (height) {
|
||||
this.checkCanvasHeight().then( (height) => {
|
||||
zoomedInHeight = height;
|
||||
if (actualHeight && zoomedInHeight) {
|
||||
expect(zoomedInHeight).toBeGreaterThan(actualHeight);
|
||||
@@ -220,27 +220,27 @@ export class FilePreviewPage {
|
||||
newWidth,
|
||||
newHeight;
|
||||
|
||||
this.checkCanvasWidth().then(function (width) {
|
||||
this.checkCanvasWidth().then((width) => {
|
||||
actualWidth = width;
|
||||
});
|
||||
|
||||
this.checkCanvasHeight().then(function (height) {
|
||||
this.checkCanvasHeight().then((height) => {
|
||||
actualHeight = height;
|
||||
});
|
||||
|
||||
this.clickZoomIn();
|
||||
|
||||
this.checkCanvasWidth().then(function (width) {
|
||||
this.checkCanvasWidth().then((width) => {
|
||||
zoomedWidth = width;
|
||||
});
|
||||
|
||||
this.checkCanvasHeight().then(function (height) {
|
||||
this.checkCanvasHeight().then((height) => {
|
||||
zoomedHeight = height;
|
||||
});
|
||||
|
||||
this.clickActualSize();
|
||||
|
||||
this.checkCanvasWidth().then(function (width) {
|
||||
this.checkCanvasWidth().then((width) => {
|
||||
newWidth = width;
|
||||
if (actualWidth && zoomedWidth && newWidth) {
|
||||
expect(newWidth).toBeLessThan(zoomedWidth);
|
||||
@@ -248,7 +248,7 @@ export class FilePreviewPage {
|
||||
}
|
||||
});
|
||||
|
||||
this.checkCanvasHeight().then(function (height) {
|
||||
this.checkCanvasHeight().then((height) => {
|
||||
newHeight = height;
|
||||
if (actualHeight && zoomedHeight && newHeight) {
|
||||
expect(newHeight).toBeLessThan(zoomedHeight);
|
||||
@@ -267,17 +267,16 @@ export class FilePreviewPage {
|
||||
let actualWidth,
|
||||
zoomedOutWidth,
|
||||
actualHeight,
|
||||
zoomedOutHeight,
|
||||
zoomedInHeight;
|
||||
zoomedOutHeight;
|
||||
|
||||
this.checkCanvasWidth().then(function (width) {
|
||||
this.checkCanvasWidth().then((width) => {
|
||||
actualWidth = width;
|
||||
if (actualWidth && zoomedOutWidth) {
|
||||
expect(zoomedOutWidth).toBeLessThan(actualWidth);
|
||||
}
|
||||
});
|
||||
|
||||
this.checkCanvasHeight().then(function (height) {
|
||||
this.checkCanvasHeight().then((height) => {
|
||||
actualHeight = height;
|
||||
if (actualHeight && zoomedOutHeight) {
|
||||
expect(zoomedOutHeight).toBeLessThan(actualHeight);
|
||||
@@ -286,15 +285,14 @@ export class FilePreviewPage {
|
||||
|
||||
this.clickZoomOut();
|
||||
|
||||
this.checkCanvasWidth().then(function (width) {
|
||||
this.checkCanvasWidth().then((width) => {
|
||||
zoomedOutWidth = width;
|
||||
if (actualWidth && zoomedOutWidth) {
|
||||
expect(zoomedOutWidth).toBeLessThan(actualWidth);
|
||||
}
|
||||
});
|
||||
|
||||
this.checkCanvasHeight().then(function (height) {
|
||||
zoomedInHeight = height;
|
||||
this.checkCanvasHeight().then(() => {
|
||||
if (actualHeight && zoomedOutHeight) {
|
||||
expect(zoomedOutHeight).toBeLessThan(actualHeight);
|
||||
}
|
||||
|
@@ -110,7 +110,7 @@ export class EditProcessFilterCloudComponent {
|
||||
|
||||
async checkAppNamesAreUnique() {
|
||||
let appNameList = element.all(by.css('mat-option[data-automation-id="adf-cloud-edit-process-property-optionsappName"] span'));
|
||||
let appTextList = await appNameList.getText();
|
||||
let appTextList: any = await appNameList.getText();
|
||||
let uniqueArray = appTextList.filter((appName) => {
|
||||
let sameAppNameArray = appTextList.filter((eachApp) => eachApp === appName);
|
||||
return sameAppNameArray.length === 1;
|
||||
|
@@ -57,13 +57,13 @@ export class FormFields {
|
||||
return widget;
|
||||
}
|
||||
|
||||
getFieldValue(fieldId, valueLocatorParam) {
|
||||
getFieldValue(fieldId, valueLocatorParam?: any) {
|
||||
let value = this.getWidget(fieldId).element(valueLocatorParam || this.valueLocator);
|
||||
Util.waitUntilElementIsVisible(value);
|
||||
return value.getAttribute('value');
|
||||
}
|
||||
|
||||
getFieldLabel(fieldId, labelLocatorParam) {
|
||||
getFieldLabel(fieldId, labelLocatorParam?: any) {
|
||||
let label = this.getWidget(fieldId).all(labelLocatorParam || this.labelLocator).first();
|
||||
Util.waitUntilElementIsVisible(label);
|
||||
return label.getText();
|
||||
@@ -74,7 +74,7 @@ export class FormFields {
|
||||
return error.getText();
|
||||
}
|
||||
|
||||
getFieldText(fieldId, labelLocatorParam) {
|
||||
getFieldText(fieldId, labelLocatorParam?: any) {
|
||||
let label = this.getWidget(fieldId).element(labelLocatorParam || this.labelLocator);
|
||||
Util.waitUntilElementIsVisible(label);
|
||||
return label.getText();
|
||||
|
@@ -157,7 +157,7 @@ describe('Process list cloud', () => {
|
||||
noOfApps = processCloudDemoPage.editProcessFilterCloudComponent().clickCustomiseFilterHeader().getNumberOfAppNameOptions();
|
||||
expect(processCloudDemoPage.editProcessFilterCloudComponent().checkAppNamesAreUnique()).toBe(true);
|
||||
browser.actions().sendKeys(protractor.Key.ESCAPE).perform();
|
||||
processCloudDemoPage.editProcessFilterCloudComponent().setStateFilterDropDown('RUNNING')
|
||||
processCloudDemoPage.editProcessFilterCloudComponent().setStatusFilterDropDown('RUNNING')
|
||||
.setAppNameDropDown(simpleApp).setProcessInstanceId(runningProcessInstance.entry.id);
|
||||
|
||||
processCloudDemoPage.processListCloudComponent().getDataTable().checkSpinnerIsDisplayed().checkSpinnerIsNotDisplayed();
|
||||
@@ -173,7 +173,7 @@ describe('Process list cloud', () => {
|
||||
processCloudDemoPage.editProcessFilterCloudComponent().clickCustomiseFilterHeader();
|
||||
expect(processCloudDemoPage.editProcessFilterCloudComponent().getProcessInstanceId()).toEqual(runningProcessInstance.entry.id);
|
||||
|
||||
processCloudDemoPage.editProcessFilterCloudComponent().setStateFilterDropDown('RUNNING')
|
||||
processCloudDemoPage.editProcessFilterCloudComponent().setStatusFilterDropDown('RUNNING')
|
||||
.setAppNameDropDown(simpleApp).setProcessInstanceId(switchProcessInstance.entry.id);
|
||||
|
||||
processCloudDemoPage.processListCloudComponent().getDataTable().checkSpinnerIsDisplayed().checkSpinnerIsNotDisplayed();
|
||||
|
@@ -20,7 +20,6 @@ import CONSTANTS = require('../util/constants');
|
||||
import { Util } from '../util/util';
|
||||
import moment = require('moment');
|
||||
|
||||
import AlfrescoApi = require('@alfresco/js-api');
|
||||
import { Tasks } from '../actions/APS-cloud/tasks';
|
||||
|
||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||
@@ -28,7 +27,7 @@ import { LoginSSOPage } from '@alfresco/adf-testing';
|
||||
import { SettingsPage } from '../pages/adf/settingsPage';
|
||||
import { AppListCloudPage } from '@alfresco/adf-testing';
|
||||
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
||||
import { TaskDetailsCloudComponent } from '../pages/adf/process-cloud/TaskDetailsCloudComponent';
|
||||
import { TaskDetailsCloudComponent } from '../pages/adf/process-cloud/taskDetailsCloudComponent';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Task Header cloud component', () => {
|
||||
|
@@ -437,7 +437,7 @@ describe('Start Task - Custom App', () => {
|
||||
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(paginationTasksName[13]);
|
||||
taskListSinglePage.taskList().getRowsDisplayedWithSameName(paginationTasksName[13]).then((list) => {
|
||||
expect(list.count()).toEqual(2);
|
||||
expect(list.length).toEqual(2);
|
||||
});
|
||||
});
|
||||
|
||||
|
@@ -371,7 +371,7 @@ describe('Start Process Component', () => {
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.selectFromProcessList('Active Task');
|
||||
processDetailsPage.clickOnActiveTask();
|
||||
processDetailsPage.checkActiveTaskTitleIsDisplayed(app.task_name);
|
||||
processDetailsPage.checkActiveTaskTitleIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C260457] Should display process in Completed when cancelled', () => {
|
||||
|
@@ -253,7 +253,7 @@ describe('Task', () => {
|
||||
|
||||
it('[C260350] Should display a new filter when a filter is added', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
let newFilter = new UserProcessInstanceFilterRepresentation();
|
||||
let newFilter: any = new UserProcessInstanceFilterRepresentation();
|
||||
newFilter.name = 'New Task Filter';
|
||||
newFilter.appId = appId;
|
||||
newFilter.icon = 'glyphicon-filter';
|
||||
@@ -277,7 +277,7 @@ describe('Task', () => {
|
||||
|
||||
it('[C286447] Should display the task filter icon when a custom filter is added', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
let newFilter = new UserProcessInstanceFilterRepresentation();
|
||||
let newFilter: any = new UserProcessInstanceFilterRepresentation();
|
||||
newFilter.name = 'New Task Filter with icon';
|
||||
newFilter.appId = appId;
|
||||
newFilter.icon = 'glyphicon-cloud';
|
||||
@@ -317,7 +317,7 @@ describe('Task', () => {
|
||||
|
||||
it('[C260353] Should display changes on a filter when this filter is edited', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
let newFilter = new UserProcessInstanceFilterRepresentation();
|
||||
let newFilter: any = new UserProcessInstanceFilterRepresentation();
|
||||
newFilter.name = 'New Task Filter';
|
||||
newFilter.appId = appId;
|
||||
newFilter.icon = 'glyphicon-filter';
|
||||
@@ -334,7 +334,7 @@ describe('Task', () => {
|
||||
taskFiltersDemoPage.customTaskFilter('New Task Filter').checkTaskFilterIsDisplayed();
|
||||
|
||||
browser.controlFlow().execute(() => {
|
||||
let newFilter = new UserProcessInstanceFilterRepresentation();
|
||||
let newFilter: any = new UserProcessInstanceFilterRepresentation();
|
||||
newFilter.name = 'Task Filter Edited';
|
||||
newFilter.appId = appId;
|
||||
newFilter.icon = 'glyphicon-filter';
|
||||
@@ -356,7 +356,7 @@ describe('Task', () => {
|
||||
|
||||
it('[C286448] Should display changes on a task filter when this filter icon is edited', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
let newFilter = new UserProcessInstanceFilterRepresentation();
|
||||
let newFilter: any = new UserProcessInstanceFilterRepresentation();
|
||||
newFilter.name = 'Task Filter Edited icon';
|
||||
newFilter.appId = appId;
|
||||
newFilter.icon = 'glyphicon-filter';
|
||||
@@ -373,7 +373,7 @@ describe('Task', () => {
|
||||
taskFiltersDemoPage.customTaskFilter('Task Filter Edited icon').checkTaskFilterIsDisplayed();
|
||||
|
||||
browser.controlFlow().execute(() => {
|
||||
let newFilter = new UserProcessInstanceFilterRepresentation();
|
||||
let newFilter: any = new UserProcessInstanceFilterRepresentation();
|
||||
newFilter.name = 'Task Filter Edited icon';
|
||||
newFilter.appId = appId;
|
||||
newFilter.icon = 'glyphicon-cloud';
|
||||
@@ -397,11 +397,11 @@ describe('Task', () => {
|
||||
|
||||
it('[C260354] Should not display task filter when this filter is deleted', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
let newFilter = new UserProcessInstanceFilterRepresentation();
|
||||
let newFilter: any = new UserProcessInstanceFilterRepresentation();
|
||||
newFilter.name = 'New Task Filter';
|
||||
newFilter.appId = appId;
|
||||
newFilter.icon = 'glyphicon-filter';
|
||||
newFilter.filter = { sort: 'created-desc', state: 'completed', assignment: 'involved' };
|
||||
newFilter.filter = <any> { sort: 'created-desc', state: 'completed', assignment: 'involved' };
|
||||
|
||||
let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter);
|
||||
|
||||
|
@@ -100,13 +100,9 @@ describe('Task Filters Sorting', () => {
|
||||
|
||||
});
|
||||
|
||||
// afterAll(async(done) => {
|
||||
// await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(tenantId);
|
||||
// done();
|
||||
// });
|
||||
it('[C277254] Should display tasks under new filter from newest to oldest when they are completed', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
let newFilter = new UserProcessInstanceFilterRepresentation();
|
||||
let newFilter: any = new UserProcessInstanceFilterRepresentation();
|
||||
newFilter.name = 'Newest first';
|
||||
newFilter.appId = appId;
|
||||
newFilter.icon = 'glyphicon-filter';
|
||||
@@ -129,7 +125,7 @@ describe('Task Filters Sorting', () => {
|
||||
|
||||
it('[C277255] Should display tasks under new filter from oldest to newest when they are completed', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
let newFilter = new UserProcessInstanceFilterRepresentation();
|
||||
let newFilter: any = new UserProcessInstanceFilterRepresentation();
|
||||
newFilter.name = 'Newest last';
|
||||
newFilter.appId = appId;
|
||||
newFilter.icon = 'glyphicon-filter';
|
||||
@@ -151,7 +147,7 @@ describe('Task Filters Sorting', () => {
|
||||
|
||||
it('[C277256] Should display tasks under new filter from closest due date to farthest when they are completed', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
let newFilter = new UserProcessInstanceFilterRepresentation();
|
||||
let newFilter: any = new UserProcessInstanceFilterRepresentation();
|
||||
newFilter.name = 'Due first';
|
||||
newFilter.appId = appId;
|
||||
newFilter.icon = 'glyphicon-filter';
|
||||
@@ -173,7 +169,7 @@ describe('Task Filters Sorting', () => {
|
||||
|
||||
it('[C277257] Should display tasks under new filter from farthest due date to closest when they are completed', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
let newFilter = new UserProcessInstanceFilterRepresentation();
|
||||
let newFilter: any = new UserProcessInstanceFilterRepresentation();
|
||||
newFilter.name = 'Due last';
|
||||
newFilter.appId = appId;
|
||||
newFilter.icon = 'glyphicon-filter';
|
||||
@@ -195,7 +191,7 @@ describe('Task Filters Sorting', () => {
|
||||
|
||||
it('[C277258] Should display tasks under new filter from newest to oldest when they are open ', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
let newFilter = new UserProcessInstanceFilterRepresentation();
|
||||
let newFilter: any = new UserProcessInstanceFilterRepresentation();
|
||||
newFilter.name = 'Newest first Open';
|
||||
newFilter.appId = appId;
|
||||
newFilter.icon = 'glyphicon-filter';
|
||||
@@ -217,7 +213,7 @@ describe('Task Filters Sorting', () => {
|
||||
|
||||
it('[C277259] Should display tasks under new filter from oldest to newest when they are open', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
let newFilter = new UserProcessInstanceFilterRepresentation();
|
||||
let newFilter: any = new UserProcessInstanceFilterRepresentation();
|
||||
newFilter.name = 'Newest last Open';
|
||||
newFilter.appId = appId;
|
||||
newFilter.icon = 'glyphicon-filter';
|
||||
@@ -239,7 +235,7 @@ describe('Task Filters Sorting', () => {
|
||||
|
||||
it('[C277260] Should display tasks under new filter from closest due date to farthest when they are open', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
let newFilter = new UserProcessInstanceFilterRepresentation();
|
||||
let newFilter: any = new UserProcessInstanceFilterRepresentation();
|
||||
newFilter.name = 'Due first Open';
|
||||
newFilter.appId = appId;
|
||||
newFilter.icon = 'glyphicon-filter';
|
||||
@@ -261,7 +257,7 @@ describe('Task Filters Sorting', () => {
|
||||
|
||||
it('[C277261] Should display tasks under new filter from farthest due date to closest when they are open', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
let newFilter = new UserProcessInstanceFilterRepresentation();
|
||||
let newFilter: any = new UserProcessInstanceFilterRepresentation();
|
||||
newFilter.name = 'Due last Open';
|
||||
newFilter.appId = appId;
|
||||
newFilter.icon = 'glyphicon-filter';
|
||||
|
@@ -1,8 +1,9 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"baseUrl": "./",
|
||||
"baseUrl": ".",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"types": [
|
||||
@@ -30,8 +31,14 @@
|
||||
"../lib/process-services-cloud"
|
||||
],
|
||||
"@alfresco/adf-testing": [
|
||||
"../../lib/testing"
|
||||
"../lib/testing"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
|
@@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { browser, protractor } from 'protractor';
|
||||
import * as moment from 'moment';
|
||||
import fs = require('fs');
|
||||
import path = require('path');
|
||||
import TestConfig = require('../test.config');
|
||||
|
Reference in New Issue
Block a user