mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
ESLint: cleanup await expect from protractor tests (#9630)
This commit is contained in:
@@ -77,11 +77,9 @@ describe('Comment component for Processes', () => {
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
|
||||
await commentsPage.getTotalNumberOfComments('Comments (' + addedComment.total + ')');
|
||||
await expect(await commentsPage.getMessage(0)).toEqual(addedComment.data[0].message);
|
||||
await expect(await commentsPage.getUserName(0)).toEqual(
|
||||
addedComment.data[0].createdBy.firstName + ' ' + addedComment.data[0].createdBy.lastName
|
||||
);
|
||||
await expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
expect(await commentsPage.getMessage(0)).toEqual(addedComment.data[0].message);
|
||||
expect(await commentsPage.getUserName(0)).toEqual(addedComment.data[0].createdBy.firstName + ' ' + addedComment.data[0].createdBy.lastName);
|
||||
expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
});
|
||||
|
||||
it('[C260465] Should not be able to view process comment on included task', async () => {
|
||||
@@ -97,7 +95,7 @@ describe('Comment component for Processes', () => {
|
||||
const taskId = taskQuery.data[0].id;
|
||||
|
||||
const taskComments = await commentsApi.getTaskComments(taskId, { latestFirst: true });
|
||||
await expect(taskComments.total).toEqual(0);
|
||||
expect(taskComments.total).toEqual(0);
|
||||
});
|
||||
|
||||
it('[C260466] Should be able to display comments from Task on the related Process', async () => {
|
||||
@@ -117,10 +115,10 @@ describe('Comment component for Processes', () => {
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
|
||||
await commentsPage.getTotalNumberOfComments('Comments (' + addedTaskComment.total + ')');
|
||||
await expect(await commentsPage.getMessage(0)).toEqual(addedTaskComment.data[0].message);
|
||||
await expect(await commentsPage.getUserName(0)).toEqual(
|
||||
expect(await commentsPage.getMessage(0)).toEqual(addedTaskComment.data[0].message);
|
||||
expect(await commentsPage.getUserName(0)).toEqual(
|
||||
addedTaskComment.data[0].createdBy.firstName + ' ' + addedTaskComment.data[0].createdBy.lastName
|
||||
);
|
||||
await expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -107,9 +107,9 @@ describe('Sorting for process filters', () => {
|
||||
state: 'running',
|
||||
sort: 'created-asc'
|
||||
});
|
||||
await expect(processesQuery.data[0].name).toEqual(firstProc.name);
|
||||
await expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||
await expect(processesQuery.data[2].name).toEqual(thirdProc.name);
|
||||
expect(processesQuery.data[0].name).toEqual(firstProc.name);
|
||||
expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||
expect(processesQuery.data[2].name).toEqual(thirdProc.name);
|
||||
});
|
||||
|
||||
it('[C260477] Should be able to create a filter on APS for completed processes - Oldest first and check on ADF', async () => {
|
||||
@@ -141,9 +141,9 @@ describe('Sorting for process filters', () => {
|
||||
state: 'completed',
|
||||
sort: 'created-asc'
|
||||
});
|
||||
await expect(processesQuery.data[0].name).toEqual(firstProc.name);
|
||||
await expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||
await expect(processesQuery.data[2].name).toEqual(thirdProc.name);
|
||||
expect(processesQuery.data[0].name).toEqual(firstProc.name);
|
||||
expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||
expect(processesQuery.data[2].name).toEqual(thirdProc.name);
|
||||
});
|
||||
|
||||
it('[C260478] Should be able to create a filter on APS for all processes - Oldest first and check on ADF', async () => {
|
||||
@@ -179,12 +179,12 @@ describe('Sorting for process filters', () => {
|
||||
state: 'all',
|
||||
sort: 'created-asc'
|
||||
});
|
||||
await expect(processesQuery.data[0].name).toEqual(firstProc.name);
|
||||
await expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||
await expect(processesQuery.data[2].name).toEqual(thirdProc.name);
|
||||
await expect(processesQuery.data[3].name).toEqual(deleteFirstProc.name);
|
||||
await expect(processesQuery.data[4].name).toEqual(deleteSecondProc.name);
|
||||
await expect(processesQuery.data[5].name).toEqual(deleteThirdProc.name);
|
||||
expect(processesQuery.data[0].name).toEqual(firstProc.name);
|
||||
expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||
expect(processesQuery.data[2].name).toEqual(thirdProc.name);
|
||||
expect(processesQuery.data[3].name).toEqual(deleteFirstProc.name);
|
||||
expect(processesQuery.data[4].name).toEqual(deleteSecondProc.name);
|
||||
expect(processesQuery.data[5].name).toEqual(deleteThirdProc.name);
|
||||
});
|
||||
|
||||
it('[C260479] Should be able to create a filter on APS for running processes - Newest first and check on ADF', async () => {
|
||||
@@ -212,9 +212,9 @@ describe('Sorting for process filters', () => {
|
||||
state: 'running',
|
||||
sort: 'created-desc'
|
||||
});
|
||||
await expect(processesQuery.data[0].name).toEqual(thirdProc.name);
|
||||
await expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||
await expect(processesQuery.data[2].name).toEqual(firstProc.name);
|
||||
expect(processesQuery.data[0].name).toEqual(thirdProc.name);
|
||||
expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||
expect(processesQuery.data[2].name).toEqual(firstProc.name);
|
||||
});
|
||||
|
||||
it('[C260480] Should be able to create a filter on APS for completed processes - Newest first and check on ADF', async () => {
|
||||
@@ -245,9 +245,9 @@ describe('Sorting for process filters', () => {
|
||||
state: 'completed',
|
||||
sort: 'created-desc'
|
||||
});
|
||||
await expect(processesQuery.data[0].name).toEqual(thirdProc.name);
|
||||
await expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||
await expect(processesQuery.data[2].name).toEqual(firstProc.name);
|
||||
expect(processesQuery.data[0].name).toEqual(thirdProc.name);
|
||||
expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||
expect(processesQuery.data[2].name).toEqual(firstProc.name);
|
||||
});
|
||||
|
||||
it('[C260481] Should be able to create a filter on APS for all processes - Newest first and check on ADF', async () => {
|
||||
@@ -283,12 +283,12 @@ describe('Sorting for process filters', () => {
|
||||
state: 'all',
|
||||
sort: 'created-desc'
|
||||
});
|
||||
await expect(processesQuery.data[0].name).toEqual(deleteThirdProc.name);
|
||||
await expect(processesQuery.data[1].name).toEqual(deleteSecondProc.name);
|
||||
await expect(processesQuery.data[2].name).toEqual(deleteFirstProc.name);
|
||||
await expect(processesQuery.data[3].name).toEqual(thirdProc.name);
|
||||
await expect(processesQuery.data[4].name).toEqual(secondProc.name);
|
||||
await expect(processesQuery.data[5].name).toEqual(firstProc.name);
|
||||
expect(processesQuery.data[0].name).toEqual(deleteThirdProc.name);
|
||||
expect(processesQuery.data[1].name).toEqual(deleteSecondProc.name);
|
||||
expect(processesQuery.data[2].name).toEqual(deleteFirstProc.name);
|
||||
expect(processesQuery.data[3].name).toEqual(thirdProc.name);
|
||||
expect(processesQuery.data[4].name).toEqual(secondProc.name);
|
||||
expect(processesQuery.data[5].name).toEqual(firstProc.name);
|
||||
});
|
||||
|
||||
it('[C272815] Should be able to create a filter on APS for completed processes - Completed most recently and check on ADF', async () => {
|
||||
@@ -320,9 +320,9 @@ describe('Sorting for process filters', () => {
|
||||
state: 'completed',
|
||||
sort: 'ended-asc'
|
||||
});
|
||||
await expect(processesQuery.data[0].name).toEqual(secondProc.name);
|
||||
await expect(processesQuery.data[1].name).toEqual(firstProc.name);
|
||||
await expect(processesQuery.data[2].name).toEqual(thirdProc.name);
|
||||
expect(processesQuery.data[0].name).toEqual(secondProc.name);
|
||||
expect(processesQuery.data[1].name).toEqual(firstProc.name);
|
||||
expect(processesQuery.data[2].name).toEqual(thirdProc.name);
|
||||
});
|
||||
|
||||
it('[C272816] Should be able to create a filter on APS for completed processes - Completed least recently and check on ADF', async () => {
|
||||
@@ -354,8 +354,8 @@ describe('Sorting for process filters', () => {
|
||||
state: 'completed',
|
||||
sort: 'ended-desc'
|
||||
});
|
||||
await expect(processesQuery.data[0].name).toEqual(thirdProc.name);
|
||||
await expect(processesQuery.data[1].name).toEqual(firstProc.name);
|
||||
await expect(processesQuery.data[2].name).toEqual(secondProc.name);
|
||||
expect(processesQuery.data[0].name).toEqual(thirdProc.name);
|
||||
expect(processesQuery.data[1].name).toEqual(firstProc.name);
|
||||
expect(processesQuery.data[2].name).toEqual(secondProc.name);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -59,8 +59,8 @@ describe('Empty Process List Test', () => {
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
await processServicesPage.checkApsContainer();
|
||||
await (await processServicesPage.goToApp(appWithProcess.title)).clickProcessButton();
|
||||
await expect(await processListPage.getDisplayedProcessListTitle()).toEqual('No Processes Found');
|
||||
await expect(await processDetailsPage.checkProcessDetailsMessage()).toEqual('No process details found');
|
||||
expect(await processListPage.getDisplayedProcessListTitle()).toEqual('No Processes Found');
|
||||
expect(await processDetailsPage.checkProcessDetailsMessage()).toEqual('No process details found');
|
||||
|
||||
await processFiltersPage.clickCreateProcessButton();
|
||||
await processFiltersPage.clickNewProcessDropdown();
|
||||
@@ -68,14 +68,14 @@ describe('Empty Process List Test', () => {
|
||||
await startProcessPage.selectFromProcessDropdown(appWithProcess.process_wse_name);
|
||||
await startProcessPage.clickStartProcessButton();
|
||||
|
||||
await expect(await processFiltersPage.numberOfProcessRows()).toEqual(1);
|
||||
expect(await processFiltersPage.numberOfProcessRows()).toEqual(1);
|
||||
|
||||
await processDetailsPage.propertiesList.waitVisible();
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
await processServicesPage.checkApsContainer();
|
||||
await (await processServicesPage.goToApp(simpleAppWithUserForm.title)).clickProcessButton();
|
||||
await expect(await processListPage.getDisplayedProcessListTitle()).toEqual('No Processes Found');
|
||||
await expect(await processDetailsPage.checkProcessDetailsMessage()).toEqual('No process details found');
|
||||
expect(await processListPage.getDisplayedProcessListTitle()).toEqual('No Processes Found');
|
||||
expect(await processDetailsPage.checkProcessDetailsMessage()).toEqual('No process details found');
|
||||
|
||||
await processFiltersPage.clickCreateProcessButton();
|
||||
await processFiltersPage.clickNewProcessDropdown();
|
||||
@@ -83,7 +83,7 @@ describe('Empty Process List Test', () => {
|
||||
await startProcessPage.selectFromProcessDropdown(simpleAppWithUserForm.processName);
|
||||
await startProcessPage.clickStartProcessButton();
|
||||
|
||||
await expect(await processFiltersPage.numberOfProcessRows()).toEqual(1);
|
||||
expect(await processFiltersPage.numberOfProcessRows()).toEqual(1);
|
||||
|
||||
await processDetailsPage.propertiesList.waitVisible();
|
||||
});
|
||||
|
||||
@@ -71,11 +71,11 @@ describe('Process List - Pagination when adding processes', () => {
|
||||
await processFiltersPage.dataTable.waitTillContentLoaded();
|
||||
await processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
|
||||
await expect(await paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
await expect(await paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue * page + ' of 20');
|
||||
await expect(await processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.fifteenValue);
|
||||
expect(await paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(await paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue * page + ' of 20');
|
||||
expect(await processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.fifteenValue);
|
||||
await paginationPage.checkNextPageButtonIsEnabled();
|
||||
await paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
|
||||
@@ -87,11 +87,11 @@ describe('Process List - Pagination when adding processes', () => {
|
||||
await paginationPage.clickOnNextPage();
|
||||
await processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
await processFiltersPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
await expect(await paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 16-25 of 25');
|
||||
await expect(await processFiltersPage.numberOfProcessRows()).toBe(10);
|
||||
expect(await paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(await paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(await paginationPage.getPaginationRange()).toEqual('Showing 16-25 of 25');
|
||||
expect(await processFiltersPage.numberOfProcessRows()).toBe(10);
|
||||
await paginationPage.checkNextPageButtonIsDisabled();
|
||||
await paginationPage.checkPreviousPageButtonIsEnabled();
|
||||
});
|
||||
|
||||
@@ -66,7 +66,7 @@ describe('Process Filters Test', () => {
|
||||
it('[C260387] Should the running process be displayed when clicking on Running filter', async () => {
|
||||
await processServicesPage.goToApp(app.title);
|
||||
await processServiceTabBarPage.clickProcessButton();
|
||||
await expect(await processListPage.isProcessListDisplayed()).toEqual(true);
|
||||
expect(await processListPage.isProcessListDisplayed()).toEqual(true);
|
||||
|
||||
await processFiltersPage.clickCreateProcessButton();
|
||||
await processFiltersPage.clickNewProcessDropdown();
|
||||
@@ -96,7 +96,7 @@ describe('Process Filters Test', () => {
|
||||
it('[C280063] Should both the new created process and a completed one to be displayed when clicking on All filter', async () => {
|
||||
await processServicesPage.goToApp(app.title);
|
||||
await processServiceTabBarPage.clickProcessButton();
|
||||
await expect(await processListPage.isProcessListDisplayed()).toEqual(true);
|
||||
expect(await processListPage.isProcessListDisplayed()).toEqual(true);
|
||||
|
||||
await processFiltersPage.clickAllFilterButton();
|
||||
await processFiltersPage.selectFromProcessList(processTitle.running);
|
||||
@@ -107,7 +107,7 @@ describe('Process Filters Test', () => {
|
||||
it('[C280064] Should the completed process be displayed when clicking on Completed filter', async () => {
|
||||
await processServicesPage.goToApp(app.title);
|
||||
await processServiceTabBarPage.clickProcessButton();
|
||||
await expect(await processListPage.isProcessListDisplayed()).toEqual(true);
|
||||
expect(await processListPage.isProcessListDisplayed()).toEqual(true);
|
||||
|
||||
await processFiltersPage.clickCompletedFilterButton();
|
||||
await processFiltersPage.selectFromProcessList(processTitle.completed);
|
||||
@@ -117,7 +117,7 @@ describe('Process Filters Test', () => {
|
||||
it('[C260463] Should Cancel process be displayed in Completed process filters', async () => {
|
||||
await processServicesPage.goToApp(app.title);
|
||||
await processServiceTabBarPage.clickProcessButton();
|
||||
await expect(await processListPage.isProcessListDisplayed()).toEqual(true);
|
||||
expect(await processListPage.isProcessListDisplayed()).toEqual(true);
|
||||
|
||||
await processFiltersPage.clickCreateProcessButton();
|
||||
await processFiltersPage.clickNewProcessDropdown();
|
||||
|
||||
@@ -61,7 +61,7 @@ describe('Process Instance Details', () => {
|
||||
await processServicesPage.checkApsContainer();
|
||||
await processServicesPage.goToApp(app.title);
|
||||
await processServiceTabBarPage.clickProcessButton();
|
||||
await expect(await processListPage.isProcessListDisplayed()).toEqual(true);
|
||||
expect(await processListPage.isProcessListDisplayed()).toEqual(true);
|
||||
|
||||
process = await processApi.getProcessInstance(processModel.id);
|
||||
});
|
||||
|
||||
@@ -191,12 +191,12 @@ describe('Process List Test', () => {
|
||||
|
||||
const sortedProcessListNamesAsc = await processListDemoPage.getDisplayedProcessesNames();
|
||||
|
||||
await expect(JSON.stringify(processList) === JSON.stringify(sortedProcessListNamesAsc)).toBe(true);
|
||||
expect(JSON.stringify(processList) === JSON.stringify(sortedProcessListNamesAsc)).toBe(true);
|
||||
|
||||
await processListDemoPage.selectSorting('desc');
|
||||
await processListDemoPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
const sortedProcessListNamesDesc = await processListDemoPage.getDisplayedProcessesNames();
|
||||
await expect(JSON.stringify(processList.reverse()) === JSON.stringify(sortedProcessListNamesDesc)).toBe(true);
|
||||
expect(JSON.stringify(processList.reverse()) === JSON.stringify(sortedProcessListNamesDesc)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
*/
|
||||
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { createApiService,
|
||||
import {
|
||||
createApiService,
|
||||
ApplicationsUtil,
|
||||
FileBrowserUtil,
|
||||
LoginPage, ModelsActions,
|
||||
LoginPage,
|
||||
ModelsActions,
|
||||
ProcessInstanceTasksPage,
|
||||
StartProcessPage,
|
||||
StringUtil,
|
||||
@@ -137,7 +139,7 @@ describe('Start Process Component', () => {
|
||||
await processFiltersPage.clickCreateProcessButton();
|
||||
await processFiltersPage.clickNewProcessDropdown();
|
||||
await startProcessPage.selectFromProcessDropdown(browser.params.resources.Files.APP_WITH_PROCESSES.process_wse_name);
|
||||
await expect(await startProcessPage.getDefaultName()).toEqual('My Default Name');
|
||||
expect(await startProcessPage.getDefaultName()).toEqual('My Default Name');
|
||||
});
|
||||
|
||||
it('[C260445] Should require process definition and be possible to click cancel button', async () => {
|
||||
@@ -179,12 +181,12 @@ describe('Start Process Component', () => {
|
||||
await processFiltersPage.clickCreateProcessButton();
|
||||
await processFiltersPage.clickNewProcessDropdown();
|
||||
|
||||
await expect(await startProcessPage.checkSelectProcessPlaceholderIsDisplayed()).toBe('');
|
||||
expect(await startProcessPage.checkSelectProcessPlaceholderIsDisplayed()).toBe('');
|
||||
|
||||
await startProcessPage.selectFromProcessDropdown(browser.params.resources.Files.APP_WITH_PROCESSES.process_wse_name);
|
||||
|
||||
await expect(await startProcessPage.getDefaultName()).toEqual('My Default Name');
|
||||
await expect(await startProcessPage.isStartProcessButtonEnabled()).toEqual(true);
|
||||
expect(await startProcessPage.getDefaultName()).toEqual('My Default Name');
|
||||
expect(await startProcessPage.isStartProcessButtonEnabled()).toEqual(true);
|
||||
});
|
||||
|
||||
it('[C260449] Should be possible to start a process with start event', async () => {
|
||||
@@ -201,14 +203,14 @@ describe('Start Process Component', () => {
|
||||
const processId = await processDetailsPage.getId();
|
||||
const response = await processApi.getProcessInstance(processId);
|
||||
|
||||
await expect(await processDetailsPage.getProcessStatus()).toEqual(CONSTANTS.PROCESS_STATUS.RUNNING);
|
||||
await expect(await processDetailsPage.getEndDate()).toEqual(CONSTANTS.PROCESS_END_DATE);
|
||||
await expect(await processDetailsPage.getProcessCategory()).toEqual(CONSTANTS.PROCESS_CATEGORY);
|
||||
await expect(await processDetailsPage.getBusinessKey()).toEqual(CONSTANTS.PROCESS_BUSINESS_KEY);
|
||||
await expect(await processDetailsPage.getCreatedBy()).toEqual(`${response.startedBy.firstName} ${response.startedBy.lastName}`);
|
||||
await expect(await processDetailsPage.getId()).toEqual(response.id);
|
||||
await expect(await processDetailsPage.getProcessDescription()).toEqual(CONSTANTS.PROCESS_DESCRIPTION);
|
||||
await expect(await processDetailsPage.checkProcessTitleIsDisplayed()).toEqual(response.name);
|
||||
expect(await processDetailsPage.getProcessStatus()).toEqual(CONSTANTS.PROCESS_STATUS.RUNNING);
|
||||
expect(await processDetailsPage.getEndDate()).toEqual(CONSTANTS.PROCESS_END_DATE);
|
||||
expect(await processDetailsPage.getProcessCategory()).toEqual(CONSTANTS.PROCESS_CATEGORY);
|
||||
expect(await processDetailsPage.getBusinessKey()).toEqual(CONSTANTS.PROCESS_BUSINESS_KEY);
|
||||
expect(await processDetailsPage.getCreatedBy()).toEqual(`${response.startedBy.firstName} ${response.startedBy.lastName}`);
|
||||
expect(await processDetailsPage.getId()).toEqual(response.id);
|
||||
expect(await processDetailsPage.getProcessDescription()).toEqual(CONSTANTS.PROCESS_DESCRIPTION);
|
||||
expect(await processDetailsPage.checkProcessTitleIsDisplayed()).toEqual(response.name);
|
||||
});
|
||||
|
||||
it('[C286503] Should NOT display any process definition when typing a non-existent one', async () => {
|
||||
@@ -230,7 +232,7 @@ describe('Start Process Component', () => {
|
||||
await startProcessPage.checkProcessOptionIsDisplayed(browser.params.resources.Files.APP_WITH_PROCESSES.process_wse_name);
|
||||
await startProcessPage.checkProcessOptionIsDisplayed(browser.params.resources.Files.APP_WITH_PROCESSES.process_se_name);
|
||||
await startProcessPage.selectProcessOption(browser.params.resources.Files.APP_WITH_PROCESSES.process_wse_name);
|
||||
await expect(await startProcessPage.isStartProcessButtonEnabled()).toEqual(true);
|
||||
expect(await startProcessPage.isStartProcessButtonEnabled()).toEqual(true);
|
||||
});
|
||||
|
||||
it('[C286508] Should display only one option when typing an existent process definition', async () => {
|
||||
@@ -242,7 +244,7 @@ describe('Start Process Component', () => {
|
||||
await startProcessPage.checkProcessOptionIsDisplayed(browser.params.resources.Files.APP_WITH_PROCESSES.process_wse_name);
|
||||
await startProcessPage.checkProcessOptionIsNotDisplayed(browser.params.resources.Files.APP_WITH_PROCESSES.process_se_name);
|
||||
await startProcessPage.selectProcessOption(browser.params.resources.Files.APP_WITH_PROCESSES.process_wse_name);
|
||||
await expect(await startProcessPage.isStartProcessButtonEnabled()).toEqual(true);
|
||||
expect(await startProcessPage.isStartProcessButtonEnabled()).toEqual(true);
|
||||
});
|
||||
|
||||
it('[C286509] Should select automatically the processDefinition when the app contains only one', async () => {
|
||||
@@ -250,8 +252,8 @@ describe('Start Process Component', () => {
|
||||
await processServiceTabBarPage.clickProcessButton();
|
||||
await processFiltersPage.clickCreateProcessButton();
|
||||
await processFiltersPage.clickNewProcessDropdown();
|
||||
await expect(await startProcessPage.getProcessDefinitionValue()).toBe(simpleApp.title);
|
||||
await expect(await startProcessPage.isStartProcessButtonEnabled()).toEqual(true);
|
||||
expect(await startProcessPage.getProcessDefinitionValue()).toBe(simpleApp.title);
|
||||
expect(await startProcessPage.isStartProcessButtonEnabled()).toEqual(true);
|
||||
});
|
||||
|
||||
it('[C286511] Should be able to type the process definition and start a process', async () => {
|
||||
@@ -262,10 +264,8 @@ describe('Start Process Component', () => {
|
||||
await startProcessPage.typeProcessDefinition(browser.params.resources.Files.APP_WITH_PROCESSES.process_wse_name);
|
||||
await startProcessPage.selectProcessOption(browser.params.resources.Files.APP_WITH_PROCESSES.process_wse_name);
|
||||
await startProcessPage.enterProcessName('Type');
|
||||
await expect(await startProcessPage.isStartProcessButtonEnabled()).toEqual(true);
|
||||
await expect(await startProcessPage.getProcessDefinitionValue()).toBe(
|
||||
browser.params.resources.Files.APP_WITH_PROCESSES.process_wse_name
|
||||
);
|
||||
expect(await startProcessPage.isStartProcessButtonEnabled()).toEqual(true);
|
||||
expect(await startProcessPage.getProcessDefinitionValue()).toBe(browser.params.resources.Files.APP_WITH_PROCESSES.process_wse_name);
|
||||
await startProcessPage.clickStartProcessButton();
|
||||
await processFiltersPage.clickRunningFilterButton();
|
||||
await processFiltersPage.selectFromProcessList('Type');
|
||||
@@ -279,9 +279,7 @@ describe('Start Process Component', () => {
|
||||
await startProcessPage.typeProcessDefinition('process');
|
||||
|
||||
await startProcessPage.pressDownArrowAndEnter();
|
||||
await expect(await startProcessPage.getProcessDefinitionValue()).toBe(
|
||||
browser.params.resources.Files.APP_WITH_PROCESSES.process_wse_name
|
||||
);
|
||||
expect(await startProcessPage.getProcessDefinitionValue()).toBe(browser.params.resources.Files.APP_WITH_PROCESSES.process_wse_name);
|
||||
});
|
||||
|
||||
it('[C286514] Should the process definition input be cleared when clicking on options drop down ', async () => {
|
||||
@@ -291,12 +289,10 @@ describe('Start Process Component', () => {
|
||||
await processFiltersPage.clickNewProcessDropdown();
|
||||
await startProcessPage.typeProcessDefinition('process');
|
||||
await startProcessPage.selectProcessOption(browser.params.resources.Files.APP_WITH_PROCESSES.process_wse_name);
|
||||
await expect(await startProcessPage.getProcessDefinitionValue()).toBe(
|
||||
browser.params.resources.Files.APP_WITH_PROCESSES.process_wse_name
|
||||
);
|
||||
expect(await startProcessPage.getProcessDefinitionValue()).toBe(browser.params.resources.Files.APP_WITH_PROCESSES.process_wse_name);
|
||||
await startProcessPage.clickProcessDropdownArrow();
|
||||
|
||||
await expect(await startProcessPage.getProcessDefinitionValue()).toBe('');
|
||||
expect(await startProcessPage.getProcessDefinitionValue()).toBe('');
|
||||
});
|
||||
|
||||
it('[C260453] Should be possible to add a comment on an active process', async () => {
|
||||
@@ -440,7 +436,7 @@ describe('Start Process Component', () => {
|
||||
|
||||
await startProcessPage.enterProcessName(processName255Characters);
|
||||
await startProcessPage.selectFromProcessDropdown(browser.params.resources.Files.APP_WITH_PROCESSES.process_wse_name);
|
||||
await expect(await startProcessPage.isStartProcessButtonEnabled()).toEqual(true);
|
||||
expect(await startProcessPage.isStartProcessButtonEnabled()).toEqual(true);
|
||||
|
||||
await startProcessPage.enterProcessName(processNameBiggerThen255Characters);
|
||||
await startProcessPage.checkValidationErrorIsDisplayed(lengthValidationError);
|
||||
@@ -455,15 +451,15 @@ describe('Start Process Component', () => {
|
||||
await startProcessPage.enterProcessName('DateFormProcess');
|
||||
await startProcessPage.formFields().checkWidgetIsVisible('testdate');
|
||||
await widget.dateWidget().setDateInput('testdate', '15-7-2019');
|
||||
await expect(await startProcessPage.isStartFormProcessButtonEnabled()).toEqual(true);
|
||||
expect(await startProcessPage.isStartFormProcessButtonEnabled()).toEqual(true);
|
||||
await startProcessPage.clickFormStartProcessButton();
|
||||
|
||||
await processFiltersPage.clickRunningFilterButton();
|
||||
await processFiltersPage.selectFromProcessList('DateFormProcess');
|
||||
await processInstanceTasksPage.clickOnStartForm();
|
||||
await processInstanceTasksPage.checkStartProcessDialogIsDisplayed();
|
||||
await expect(await processInstanceTasksPage.getTitle()).toBe('Start Form');
|
||||
await expect(await widget.dateWidget().getDateInput('testdate')).toBe('15-7-2019');
|
||||
expect(await processInstanceTasksPage.getTitle()).toBe('Start Form');
|
||||
expect(await widget.dateWidget().getDateInput('testdate')).toBe('15-7-2019');
|
||||
await processInstanceTasksPage.clickCloseButton();
|
||||
await processInstanceTasksPage.checkStartProcessDialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user