enable prefer-const rule for tslint, fix issues (#4409)

* enable prefer-const rule for tslint, fix issues

* Update content-node-selector.component.spec.ts

* Update content-node-selector.component.spec.ts

* fix const

* fix lint issues

* update tests

* update tests

* update tests

* fix code

* fix page class
This commit is contained in:
Denys Vuika
2019-03-25 12:19:33 +00:00
committed by Eugenio Romano
parent 26c5982a1a
commit a7a48e8b2b
581 changed files with 5435 additions and 5402 deletions

View File

@@ -31,9 +31,9 @@ describe('Edit process filters cloud', () => {
const settingsPage = new SettingsPage();
const loginSSOPage = new LoginSSOPage();
const navigationBarPage = new NavigationBarPage();
let appListCloudComponent = new AppListCloudPage();
let tasksCloudDemoPage = new TasksCloudDemoPage();
let processCloudDemoPage = new ProcessCloudDemoPage();
const appListCloudComponent = new AppListCloudPage();
const tasksCloudDemoPage = new TasksCloudDemoPage();
const processCloudDemoPage = new ProcessCloudDemoPage();
let silentLogin;
const simpleApp = 'simple-app';

View File

@@ -33,8 +33,8 @@ describe('Edit task filters cloud', () => {
const settingsPage = new SettingsPage();
const loginSSOPage = new LoginSSOPage();
const navigationBarPage = new NavigationBarPage();
let appListCloudComponent = new AppListCloudPage();
let tasksCloudDemoPage = new TasksCloudDemoPage();
const appListCloudComponent = new AppListCloudPage();
const tasksCloudDemoPage = new TasksCloudDemoPage();
const tasksService: Tasks = new Tasks();
let silentLogin;

View File

@@ -38,9 +38,9 @@ describe('Process list cloud', () => {
const settingsPage = new SettingsPage();
const loginSSOPage = new LoginSSOPage();
const navigationBarPage = new NavigationBarPage();
let appListCloudComponent = new AppListCloudPage();
let processCloudDemoPage = new ProcessCloudDemoPage();
let tasksCloudDemoPage = new TasksCloudDemoPage();
const appListCloudComponent = new AppListCloudPage();
const processCloudDemoPage = new ProcessCloudDemoPage();
const tasksCloudDemoPage = new TasksCloudDemoPage();
const tasksService: Tasks = new Tasks();
const processDefinitionService: ProcessDefinitions = new ProcessDefinitions();
@@ -70,7 +70,7 @@ describe('Process list cloud', () => {
configEditorPage.clickSaveButton();
await processDefinitionService.init(user, password);
let processDefinition = await processDefinitionService.getProcessDefinitions(simpleApp);
const processDefinition = await processDefinitionService.getProcessDefinitions(simpleApp);
await processInstancesService.init(user, password);
await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
runningProcessInstance = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
@@ -78,9 +78,9 @@ describe('Process list cloud', () => {
completedProcess = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
await queryService.init(user, password);
let task = await queryService.getProcessInstanceTasks(completedProcess.entry.id, simpleApp);
const task = await queryService.getProcessInstanceTasks(completedProcess.entry.id, simpleApp);
await tasksService.init(user, password);
let claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, simpleApp);
const claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, simpleApp);
await tasksService.completeTask(claimedTask.entry.id, simpleApp);
});
@@ -97,14 +97,14 @@ describe('Process list cloud', () => {
processCloudDemoPage.editProcessFilterCloudComponent().clickCustomiseFilterHeader().setStatusFilterDropDown('RUNNING')
.setSortFilterDropDown('Name').setOrderFilterDropDown('ASC');
processCloudDemoPage.processListCloudComponent().getAllRowsNameColumn().then(function (list) {
let initialList = list.slice(0);
const initialList = list.slice(0);
list.sort();
expect(JSON.stringify(initialList) === JSON.stringify(list)).toEqual(true);
});
processCloudDemoPage.editProcessFilterCloudComponent().setOrderFilterDropDown('DESC');
processCloudDemoPage.processListCloudComponent().getAllRowsNameColumn().then(function (list) {
let initialList = list.slice(0);
const initialList = list.slice(0);
list.sort();
list.reverse();
expect(JSON.stringify(initialList) === JSON.stringify(list)).toEqual(true);
@@ -116,7 +116,7 @@ describe('Process list cloud', () => {
.setSortFilterDropDown('Id').setOrderFilterDropDown('ASC');
processCloudDemoPage.processListCloudComponent().getDataTable().checkSpinnerIsDisplayed().checkSpinnerIsNotDisplayed();
processCloudDemoPage.getAllRowsByIdColumn().then(function (list) {
let initialList = list.slice(0);
const initialList = list.slice(0);
list.sort(function (firstStr, secondStr) {
return firstStr.localeCompare(secondStr);
});
@@ -126,7 +126,7 @@ describe('Process list cloud', () => {
processCloudDemoPage.editProcessFilterCloudComponent().setOrderFilterDropDown('DESC');
processCloudDemoPage.processListCloudComponent().getDataTable().checkSpinnerIsDisplayed().checkSpinnerIsNotDisplayed();
processCloudDemoPage.getAllRowsByIdColumn().then(function (list) {
let initialList = list.slice(0);
const initialList = list.slice(0);
list.sort(function (firstStr, secondStr) {
return firstStr.localeCompare(secondStr);
});

View File

@@ -36,9 +36,9 @@ describe('Process filters cloud', () => {
const settingsPage = new SettingsPage();
const loginSSOPage = new LoginSSOPage();
const navigationBarPage = new NavigationBarPage();
let appListCloudComponent = new AppListCloudPage();
let processCloudDemoPage = new ProcessCloudDemoPage();
let tasksCloudDemoPage = new TasksCloudDemoPage();
const appListCloudComponent = new AppListCloudPage();
const processCloudDemoPage = new ProcessCloudDemoPage();
const tasksCloudDemoPage = new TasksCloudDemoPage();
const tasksService: Tasks = new Tasks();
const processDefinitionService: ProcessDefinitions = new ProcessDefinitions();
@@ -58,15 +58,15 @@ describe('Process filters cloud', () => {
loginSSOPage.loginSSOIdentityService(user, password);
await processDefinitionService.init(user, password);
let processDefinition = await processDefinitionService.getProcessDefinitions(simpleApp);
const processDefinition = await processDefinitionService.getProcessDefinitions(simpleApp);
await processInstancesService.init(user, password);
runningProcess = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
completedProcess = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
await queryService.init(user, password);
let task = await queryService.getProcessInstanceTasks(completedProcess.entry.id, simpleApp);
const task = await queryService.getProcessInstanceTasks(completedProcess.entry.id, simpleApp);
await tasksService.init(user, password);
let claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, simpleApp);
const claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, simpleApp);
await tasksService.completeTask(claimedTask.entry.id, simpleApp);
});

View File

@@ -35,8 +35,8 @@ describe('Process list cloud', () => {
const loginSSOPage = new LoginSSOPage();
const navigationBarPage = new NavigationBarPage();
const configEditor = new ConfigEditorPage();
let appListCloudComponent = new AppListCloudPage();
let processCloudDemoPage = new ProcessCloudDemoPage();
const appListCloudComponent = new AppListCloudPage();
const processCloudDemoPage = new ProcessCloudDemoPage();
const processDefinitionService: ProcessDefinitions = new ProcessDefinitions();
const processInstancesService: ProcessInstances = new ProcessInstances();
@@ -55,14 +55,14 @@ describe('Process list cloud', () => {
loginSSOPage.loginSSOIdentityService(user, password);
await processDefinitionService.init(user, password);
let processDefinition = await processDefinitionService.getProcessDefinitions(simpleApp);
const processDefinition = await processDefinitionService.getProcessDefinitions(simpleApp);
await processInstancesService.init(user, password);
runningProcess = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
});
beforeEach(async (done) => {
let processListCloudConfiguration = new ProcessListCloudConfiguration();
const processListCloudConfiguration = new ProcessListCloudConfiguration();
jsonFile = processListCloudConfiguration.getConfiguration();
done();
navigationBarPage.clickConfigEditorButton();

View File

@@ -156,7 +156,7 @@ describe('Start Task', () => {
.setStatusFilterDropDown('CREATED');
tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(unassignedTaskName);
let taskId = tasksCloudDemoPage.taskListCloudComponent().getIdCellValue(unassignedTaskName);
const taskId = tasksCloudDemoPage.taskListCloudComponent().getIdCellValue(unassignedTaskName);
tasksCloudDemoPage.taskListCloudComponent().selectRow(unassignedTaskName);
expect(taskHeaderCloudPage.getTaskDetailsHeader()).toContain(taskId);
expect(taskHeaderCloudPage.getAssignee()).toBe('No assignee');

View File

@@ -33,12 +33,12 @@ import { browser } from 'protractor';
describe('Task Header cloud component', () => {
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
let basicCreatedTaskName = Util.generateRandomString(), completedTaskName = Util.generateRandomString();
const basicCreatedTaskName = Util.generateRandomString(), completedTaskName = Util.generateRandomString();
let basicCreatedTask, basicCreatedDate, completedTask, completedCreatedDate, subTask, subTaskCreatedDate;
const simpleApp = 'simple-app';
let priority = 30, description = 'descriptionTask', formatDate = 'MMM DD YYYY';
const priority = 30, description = 'descriptionTask', formatDate = 'MMM DD YYYY';
let taskHeaderCloudPage = new TaskHeaderCloudPage();
const taskHeaderCloudPage = new TaskHeaderCloudPage();
const settingsPage = new SettingsPage();
const loginSSOPage = new LoginSSOPage();
@@ -57,19 +57,19 @@ describe('Task Header cloud component', () => {
loginSSOPage.loginSSOIdentityService(user, password);
await tasksService.init(user, password);
let createdTaskId = await tasksService.createStandaloneTask(basicCreatedTaskName, simpleApp);
const createdTaskId = await tasksService.createStandaloneTask(basicCreatedTaskName, simpleApp);
await tasksService.claimTask(createdTaskId.entry.id, simpleApp);
basicCreatedTask = await tasksService.getTask(createdTaskId.entry.id, simpleApp);
basicCreatedDate = moment(basicCreatedTask.entry.createdDate).format(formatDate);
let completedTaskId = await tasksService.createStandaloneTask(completedTaskName,
const completedTaskId = await tasksService.createStandaloneTask(completedTaskName,
simpleApp, {priority: priority, description: description, dueDate: basicCreatedTask.entry.createdDate});
await tasksService.claimTask(completedTaskId.entry.id, simpleApp);
await tasksService.completeTask(completedTaskId.entry.id, simpleApp);
completedTask = await tasksService.getTask(completedTaskId.entry.id, simpleApp);
completedCreatedDate = moment(completedTask.entry.createdDate).format(formatDate);
let subTaskId = await tasksService.createStandaloneSubtask(createdTaskId.entry.id, simpleApp, Util.generateRandomString());
const subTaskId = await tasksService.createStandaloneSubtask(createdTaskId.entry.id, simpleApp, Util.generateRandomString());
await tasksService.claimTask(subTaskId.entry.id, simpleApp);
subTask = await tasksService.getTask(subTaskId.entry.id, simpleApp);
subTaskCreatedDate = moment(subTask.entry.createdDate).format(formatDate);

View File

@@ -32,8 +32,8 @@ describe('Task filters cloud', () => {
const settingsPage = new SettingsPage();
const loginSSOPage = new LoginSSOPage();
const navigationBarPage = new NavigationBarPage();
let appListCloudComponent = new AppListCloudPage();
let tasksCloudDemoPage = new TasksCloudDemoPage();
const appListCloudComponent = new AppListCloudPage();
const tasksCloudDemoPage = new TasksCloudDemoPage();
const tasksService: Tasks = new Tasks();
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
@@ -63,7 +63,7 @@ describe('Task filters cloud', () => {
it('[C290009] Should display default filters and created task', async () => {
await tasksService.init(user, password);
let task = await tasksService.createStandaloneTask(newTask, simpleApp);
const task = await tasksService.createStandaloneTask(newTask, simpleApp);
await tasksService.claimTask(task.entry.id, simpleApp);
tasksCloudDemoPage.completedTasksFilter().clickTaskFilter();
@@ -78,7 +78,7 @@ describe('Task filters cloud', () => {
it('[C289955] Should display task in Complete Tasks List when task is completed', async () => {
await tasksService.init(user, password);
let task = await tasksService.createStandaloneTask(completedTask, simpleApp);
const task = await tasksService.createStandaloneTask(completedTask, simpleApp);
await tasksService.claimTask(task.entry.id, simpleApp);
await tasksService.completeTask(task.entry.id, simpleApp);

View File

@@ -42,29 +42,29 @@ describe('Edit task filters and task list properties', () => {
const settingsPage = new SettingsPage();
const loginSSOPage = new LoginSSOPage();
const navigationBarPage = new NavigationBarPage();
let appListCloudComponent = new AppListCloudPage();
let tasksCloudDemoPage = new TasksCloudDemoPage();
const appListCloudComponent = new AppListCloudPage();
const tasksCloudDemoPage = new TasksCloudDemoPage();
const tasksService: Tasks = new Tasks();
const processDefinitionService: ProcessDefinitions = new ProcessDefinitions();
const processInstancesService: ProcessInstances = new ProcessInstances();
let notificationPage = new NotificationPage();
const notificationPage = new NotificationPage();
let silentLogin;
const simpleApp = 'simple-app';
const candidateUserApp = 'candidateuserapp';
let noTasksFoundMessage = 'No Tasks Found';
const noTasksFoundMessage = 'No Tasks Found';
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
let createdTask, notAssigned, notDisplayedTask, processDefinition, processInstance, priorityTask, subTask;
let priority = 30;
const priority = 30;
let beforeDate = moment().add(-1, 'days').format('DD/MM/YYYY');
let currentDate = DateUtil.formatDate('DD/MM/YYYY');
let afterDate = moment().add(1, 'days').format('DD/MM/YYYY');
const beforeDate = moment().add(-1, 'days').format('DD/MM/YYYY');
const currentDate = DateUtil.formatDate('DD/MM/YYYY');
const afterDate = moment().add(1, 'days').format('DD/MM/YYYY');
beforeAll(async (done) => {
silentLogin = false;
let jsonFile = new TaskListCloudConfiguration().getConfiguration();
const jsonFile = new TaskListCloudConfiguration().getConfiguration();
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;

View File

@@ -32,16 +32,17 @@ describe('Task list cloud - selection', () => {
const settingsPage = new SettingsPage();
const loginSSOPage = new LoginSSOPage();
const navigationBarPage = new NavigationBarPage();
let appListCloudComponent = new AppListCloudPage();
let tasksCloudDemoPage = new TasksCloudDemoPage();
const appListCloudComponent = new AppListCloudPage();
const tasksCloudDemoPage = new TasksCloudDemoPage();
const tasksService: Tasks = new Tasks();
let silentLogin;
const simpleApp = 'simple-app';
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
let noOfTasks = 3, response;
let tasks = [];
const noOfTasks = 3;
let response;
const tasks = [];
beforeAll(async (done) => {
silentLogin = false;

View File

@@ -49,8 +49,9 @@ describe('Task filters cloud', () => {
const simpleApp = 'simple-app';
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
let assignedTask, deletedTask, suspendedTasks;
let orderByNameAndPriority = ['cCreatedTask', 'dCreatedTask', 'eCreatedTask'];
let priority = 30, nrOfTasks = 3;
const orderByNameAndPriority = ['cCreatedTask', 'dCreatedTask', 'eCreatedTask'];
let priority = 30;
const nrOfTasks = 3;
beforeAll(async () => {
silentLogin = false;
@@ -73,10 +74,10 @@ describe('Task filters cloud', () => {
}
await processDefinitionService.init(user, password);
let processDefinition = await processDefinitionService.getProcessDefinitions(simpleApp);
const processDefinition = await processDefinitionService.getProcessDefinitions(simpleApp);
await processInstancesService.init(user, password);
let processInstance = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
let secondProcessInstance = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
const processInstance = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
const secondProcessInstance = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
await queryService.init(user, password);
suspendedTasks = await queryService.getProcessInstanceTasks(processInstance.entry.id, simpleApp);
await queryService.getProcessInstanceTasks(secondProcessInstance.entry.id, simpleApp);
@@ -147,7 +148,7 @@ describe('Task filters cloud', () => {
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkSpinnerIsDisplayed();
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkSpinnerIsNotDisplayed();
tasksCloudDemoPage.taskListCloudComponent().getAllRowsNameColumn().then( (list) => {
let initialList = list.slice(0);
const initialList = list.slice(0);
list.sort(function (firstStr, secondStr) {
return firstStr.localeCompare(secondStr);
});
@@ -158,7 +159,7 @@ describe('Task filters cloud', () => {
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkSpinnerIsDisplayed();
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkSpinnerIsNotDisplayed();
tasksCloudDemoPage.taskListCloudComponent().getAllRowsNameColumn().then( (list) => {
let initialList = list.slice(0);
const initialList = list.slice(0);
list.sort(function (firstStr, secondStr) {
return firstStr.localeCompare(secondStr);
});
@@ -174,7 +175,7 @@ describe('Task filters cloud', () => {
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkSpinnerIsNotDisplayed();
tasksCloudDemoPage.getAllRowsByIdColumn().then((list) => {
let initialList = list.slice(0);
const initialList = list.slice(0);
list.sort(function (firstStr, secondStr) {
return firstStr.localeCompare(secondStr);
});
@@ -185,7 +186,7 @@ describe('Task filters cloud', () => {
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkSpinnerIsDisplayed();
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkSpinnerIsNotDisplayed();
tasksCloudDemoPage.getAllRowsByIdColumn().then((list) => {
let initialList = list.slice(0);
const initialList = list.slice(0);
list.sort(function (firstStr, secondStr) {
return firstStr.localeCompare(secondStr);
});