mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
e2e: Improve cloud custom filters
* Improve cloud custom filters
This commit is contained in:
@@ -174,7 +174,9 @@ describe('Process filters cloud', () => {
|
||||
it('[C306889] Should be able to see "No process found" when using an app with no processes in the appName field', async () => {
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.setAppNameDropDown('subprocessapp');
|
||||
await processList.getDataTable().waitTillContentLoaded();
|
||||
await editProcessFilter.setInitiator(`${testUser.firstName} ${testUser.lastName}`);
|
||||
await processList.getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await processListPage.getDisplayedProcessListTitle()).toEqual('No Processes Found');
|
||||
});
|
||||
@@ -191,9 +193,11 @@ describe('Process filters cloud', () => {
|
||||
it('[C311315] Should be able to filter by process definition id', async () => {
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.setProperty('processDefinitionId', processDefinition.entry.id);
|
||||
await processList.getDataTable().waitTillContentLoaded();
|
||||
await processList.checkContentIsDisplayedByName(runningProcessInstance.entry.name);
|
||||
|
||||
await editProcessFilter.setProperty('processDefinitionId', anotherProcessDefinition.entry.id);
|
||||
await processList.getDataTable().waitTillContentLoaded();
|
||||
await processList.checkContentIsDisplayedByName(anotherProcessInstance.entry.name);
|
||||
await processList.checkContentIsNotDisplayedByName(runningProcessInstance.entry.name);
|
||||
});
|
||||
@@ -203,11 +207,13 @@ describe('Process filters cloud', () => {
|
||||
await editProcessFilter.setProperty('processDefinitionKey', processDefinition.entry.key);
|
||||
await processList.getDataTable().waitTillContentLoaded();
|
||||
await editProcessFilter.setProcessName(runningProcessInstance.entry.name);
|
||||
await processList.getDataTable().waitTillContentLoaded();
|
||||
await processList.checkContentIsDisplayedByName(runningProcessInstance.entry.name);
|
||||
|
||||
await editProcessFilter.setProcessName(anotherProcessInstance.entry.name);
|
||||
await processList.getDataTable().waitTillContentLoaded();
|
||||
await editProcessFilter.setProperty('processDefinitionKey', anotherProcessDefinition.entry.key);
|
||||
await processList.getDataTable().waitTillContentLoaded();
|
||||
await processList.checkContentIsDisplayedByName(anotherProcessInstance.entry.name);
|
||||
await processList.checkContentIsNotDisplayedByName(runningProcessInstance.entry.name);
|
||||
});
|
||||
|
@@ -124,7 +124,7 @@ describe('Process Task - Attach content file', () => {
|
||||
await processCloudDemoPage.processFilterCloudComponent.clickRunningProcessesFilter();
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.setProcessName('upload process');
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.closeFilter();
|
||||
await expect(await processCloudDemoPage.processFilterCloudComponent.getActiveFilterName()).toBe(CONSTANTS.PROCESS_FILTERS.RUNNING);
|
||||
|
||||
await processList.checkContentIsDisplayedById(processInstance.entry.id);
|
||||
@@ -160,7 +160,7 @@ describe('Process Task - Attach content file', () => {
|
||||
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.setProcessName('upload process');
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.closeFilter();
|
||||
|
||||
await expect(await processCloudDemoPage.processFilterCloudComponent.getActiveFilterName()).toBe(CONSTANTS.PROCESS_FILTERS.COMPLETED);
|
||||
await processList.checkContentIsDisplayedById(processInstance.entry.id);
|
||||
|
@@ -264,8 +264,6 @@ describe('Start Task Form', () => {
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.setProcessName(startEventFormProcess);
|
||||
|
||||
await browser.sleep(1000);
|
||||
|
||||
await processList.getDataTable().waitTillContentLoaded();
|
||||
await processList.checkContentIsDisplayedByName(startEventFormProcess);
|
||||
|
||||
|
@@ -71,7 +71,6 @@ describe('Edit process filters cloud', () => {
|
||||
await processFilter.clickOnProcessFilters();
|
||||
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.checkHeaderIsExpanded();
|
||||
await processFilter.clickAllProcessesFilter();
|
||||
});
|
||||
|
||||
@@ -119,16 +118,11 @@ describe('Edit process filters cloud', () => {
|
||||
|
||||
await expect(await processFilter.getActiveFilterName()).toBe('New');
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.checkHeaderIsExpanded();
|
||||
await editProcessFilter.setSortFilterDropDown('Process Name');
|
||||
await expect(await editProcessFilter.getSortFilterDropDownValue()).toEqual('Process Name');
|
||||
await editProcessFilter.clickSaveButton();
|
||||
await editProcessFilter.openFilter();
|
||||
|
||||
await editProcessFilter.checkHeaderIsExpanded();
|
||||
|
||||
await browser.driver.sleep(1000);
|
||||
|
||||
await expect(await processFilter.getActiveFilterName()).toBe('New');
|
||||
await expect(await editProcessFilter.getSortFilterDropDownValue()).toEqual('Process Name');
|
||||
await editProcessFilter.clickDeleteButton();
|
||||
@@ -163,26 +157,19 @@ describe('Edit process filters cloud', () => {
|
||||
await processFilter.clickAllProcessesFilter();
|
||||
await expect(await processFilter.getActiveFilterName()).toEqual(PROCESSES.ALL);
|
||||
await expect(await editProcessFilter.getSortFilterDropDownValue()).toEqual('Start Date');
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.closeFilter();
|
||||
});
|
||||
|
||||
it('[C291811] Save button of process filter dialog should be disabled when process name is empty', async () => {
|
||||
it('[C291811] Save button of process filter dialog should be disabled when process name is empty ', async () => {
|
||||
await editProcessFilter.setSortFilterDropDown('Id');
|
||||
await editProcessFilter.clickSaveAsButton();
|
||||
|
||||
const dialog = editProcessFilter.editProcessFilterDialog();
|
||||
await dialog.clearFilterName();
|
||||
|
||||
await expect(await dialog.getFilterName()).toEqual('');
|
||||
await expect(await dialog.checkSaveButtonIsEnabled()).toEqual(false);
|
||||
await expect(await dialog.checkCancelButtonIsEnabled()).toEqual(true);
|
||||
await dialog.clickOnCancelButton();
|
||||
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.checkHeaderIsExpanded();
|
||||
await editProcessFilter.setSortFilterDropDown('Start Date');
|
||||
await expect(await editProcessFilter.getSortFilterDropDownValue()).toEqual('Start Date');
|
||||
await editProcessFilter.clickSaveButton();
|
||||
});
|
||||
|
||||
it('[C291809] Process filter dialog is displayed when clicking on Save As button', async () => {
|
||||
@@ -192,9 +179,9 @@ describe('Edit process filters cloud', () => {
|
||||
const dialog = editProcessFilter.editProcessFilterDialog();
|
||||
|
||||
await expect(await dialog.checkCancelButtonIsEnabled()).toEqual(true);
|
||||
await expect(await dialog.checkSaveButtonIsEnabled()).toEqual(true);
|
||||
await expect(await dialog.checkSaveButtonIsEnabled()).toEqual(false);
|
||||
await expect(await dialog.getTitle()).toEqual('Save filter as');
|
||||
await expect(await dialog.getFilterName()).toEqual(PROCESSES.ALL);
|
||||
await expect(await dialog.getFilterName()).toEqual('');
|
||||
await dialog.clickOnCancelButton();
|
||||
});
|
||||
|
||||
|
@@ -50,10 +50,6 @@ describe('Edit task filters cloud', () => {
|
||||
const completedTaskName = StringUtil.generateRandomString(),
|
||||
assignedTaskName = StringUtil.generateRandomString();
|
||||
|
||||
async function openFilter() {
|
||||
await editTaskFilter.openFilter();
|
||||
}
|
||||
|
||||
async function clickTaskFilter(name: string) {
|
||||
await taskFilter.clickTaskFilter(name);
|
||||
}
|
||||
@@ -94,7 +90,7 @@ describe('Edit task filters cloud', () => {
|
||||
});
|
||||
|
||||
it('[C291785] All the filters property should be set up accordingly with the Query Param', async () => {
|
||||
await openFilter();
|
||||
await editTaskFilter.openFilter();
|
||||
await clickTaskFilter('my-tasks');
|
||||
await waitTillContentLoaded();
|
||||
|
||||
@@ -116,14 +112,14 @@ describe('Edit task filters cloud', () => {
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(assignedTaskName);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(completedTaskName);
|
||||
await openFilter();
|
||||
await editTaskFilter.closeFilter();
|
||||
});
|
||||
|
||||
it('[C306896] Delete Save and Save as actions should be displayed and disabled when clicking on default filter header', async () => {
|
||||
await clickTaskFilter('my-tasks');
|
||||
await waitTillContentLoaded();
|
||||
|
||||
await openFilter();
|
||||
await editTaskFilter.openFilter();
|
||||
await clickTaskFilter('my-tasks');
|
||||
await waitTillContentLoaded();
|
||||
|
||||
@@ -136,7 +132,7 @@ describe('Edit task filters cloud', () => {
|
||||
await expect(await editTaskFilter.checkSaveButtonIsEnabled()).toEqual(false);
|
||||
await expect(await editTaskFilter.checkSaveAsButtonIsEnabled()).toEqual(false);
|
||||
await expect(await editTaskFilter.checkDeleteButtonIsEnabled()).toEqual(false);
|
||||
await openFilter();
|
||||
await editTaskFilter.closeFilter();
|
||||
});
|
||||
|
||||
it('[C586756] Delete, Save and Save as actions should be displayed and enabled when clicking on custom filter header', async () => {
|
||||
@@ -145,7 +141,7 @@ describe('Edit task filters cloud', () => {
|
||||
await clickTaskFilter('custom-new');
|
||||
await waitTillContentLoaded();
|
||||
|
||||
await openFilter();
|
||||
await editTaskFilter.openFilter();
|
||||
await clickTaskFilter('custom-new');
|
||||
await waitTillContentLoaded();
|
||||
|
||||
@@ -164,7 +160,7 @@ describe('Edit task filters cloud', () => {
|
||||
it('[C291795] New filter is added when clicking Save As button', async () => {
|
||||
await createNewCustomFilter('New');
|
||||
await expect(await taskFilter.getActiveFilterName()).toBe('New');
|
||||
await openFilter();
|
||||
await editTaskFilter.openFilter();
|
||||
await expect(await editTaskFilter.checkSaveButtonIsEnabled()).toEqual(false);
|
||||
await expect(await editTaskFilter.getSortFilterDropDownValue()).toEqual('id');
|
||||
await expect(await editTaskFilter.checkSaveAsButtonIsEnabled()).toEqual(false);
|
||||
@@ -197,7 +193,7 @@ describe('Edit task filters cloud', () => {
|
||||
await editTaskFilterDialog.clickOnSaveButton();
|
||||
|
||||
await expect(await taskFilter.getActiveFilterName()).toBe('New');
|
||||
await openFilter();
|
||||
await editTaskFilter.openFilter();
|
||||
|
||||
await expect(await editTaskFilter.getSortFilterDropDownValue()).toEqual('id');
|
||||
await editTaskFilter.setSortFilterDropDown('priority');
|
||||
@@ -206,13 +202,13 @@ describe('Edit task filters cloud', () => {
|
||||
await editTaskFilter.editTaskFilterDialog().clickOnSaveButton();
|
||||
|
||||
await expect(await taskFilter.getActiveFilterName()).toBe('New');
|
||||
await openFilter();
|
||||
await editTaskFilter.openFilter();
|
||||
await expect(await editTaskFilter.getSortFilterDropDownValue()).toEqual('priority');
|
||||
await editTaskFilter.clickDeleteButton();
|
||||
await clickTaskFilter('custom-new');
|
||||
await waitTillContentLoaded();
|
||||
|
||||
await openFilter();
|
||||
await editTaskFilter.openFilter();
|
||||
await expect(await editTaskFilter.getSortFilterDropDownValue()).toEqual('id');
|
||||
await editTaskFilter.clickDeleteButton();
|
||||
});
|
||||
@@ -234,11 +230,11 @@ describe('Edit task filters cloud', () => {
|
||||
await editTaskFilterDialog.clickOnSaveButton();
|
||||
|
||||
await expect(await taskFilter.getActiveFilterName()).toBe('New');
|
||||
await openFilter();
|
||||
await editTaskFilter.openFilter();
|
||||
await expect(await editTaskFilter.getSortFilterDropDownValue()).toEqual('id');
|
||||
await editTaskFilter.setSortFilterDropDown('name');
|
||||
await editTaskFilter.clickSaveButton();
|
||||
await openFilter();
|
||||
await editTaskFilter.openFilter();
|
||||
|
||||
await expect(await taskFilter.getActiveFilterName()).toBe('New');
|
||||
await expect(await editTaskFilter.getSortFilterDropDownValue()).toEqual('name');
|
||||
@@ -262,7 +258,7 @@ describe('Edit task filters cloud', () => {
|
||||
await editTaskFilterDialog.clickOnSaveButton();
|
||||
|
||||
await expect(await taskFilter.getActiveFilterName()).toBe('New');
|
||||
await openFilter();
|
||||
await editTaskFilter.openFilter();
|
||||
await expect(await editTaskFilter.getSortFilterDropDownValue()).toEqual('id');
|
||||
await editTaskFilter.clickDeleteButton();
|
||||
|
||||
@@ -294,12 +290,12 @@ describe('Edit task filters cloud', () => {
|
||||
await waitTillContentLoaded();
|
||||
await clickTaskFilter('my-tasks');
|
||||
await waitTillContentLoaded();
|
||||
await openFilter();
|
||||
await editTaskFilter.openFilter();
|
||||
|
||||
await expect(await taskFilter.getActiveFilterName()).toBe('My Tasks');
|
||||
await expect(await editTaskFilter.getSortFilterDropDownValue()).toEqual('createdDate');
|
||||
|
||||
await openFilter();
|
||||
await editTaskFilter.closeFilter();
|
||||
});
|
||||
|
||||
it('[C291801] Save button of task filter dialog should be disabled when task name is empty', async () => {
|
||||
|
@@ -306,8 +306,6 @@ describe('Task form cloud component', () => {
|
||||
await expect(await taskFilter.getActiveFilterName()).toBe('My Tasks');
|
||||
await editTaskFilter.openFilter();
|
||||
|
||||
await browser.driver.sleep(1000);
|
||||
|
||||
await editTaskFilter.clearAssignee();
|
||||
await editTaskFilter.setStatusFilterDropDown('Created');
|
||||
|
||||
|
@@ -266,13 +266,13 @@ describe('Task claim/release', () => {
|
||||
await editTaskFilter.setStatusFilterDropDown(status);
|
||||
|
||||
await editTaskFilter.setProcessInstanceId(processInstanceId);
|
||||
await editTaskFilter.openFilter();
|
||||
await editTaskFilter.closeFilter();
|
||||
}
|
||||
|
||||
async function setStatusStandaloneTaskFilter(status: StatusType) {
|
||||
await editTaskFilter.openFilter();
|
||||
await editTaskFilter.clearAssignee();
|
||||
await editTaskFilter.setStatusFilterDropDown(status);
|
||||
await editTaskFilter.openFilter();
|
||||
await editTaskFilter.closeFilter();
|
||||
}
|
||||
});
|
||||
|
@@ -5,5 +5,8 @@
|
||||
"C279931": "login problem APS not basic",
|
||||
"C279930": "login problem APS not basic",
|
||||
"C269081": "https://alfresco.atlassian.net/browse/ADF-5385",
|
||||
"C272819": "https://alfresco.atlassian.net/browse/ADF-5385"
|
||||
"C272819": "https://alfresco.atlassian.net/browse/ADF-5385",
|
||||
"C290069": "https://alfresco.atlassian.net/browse/ADF-5387",
|
||||
"C291811": "https://alfresco.atlassian.net/browse/ADF-5405",
|
||||
"C291809": "https://alfresco.atlassian.net/browse/ADF-5405"
|
||||
}
|
||||
|
Reference in New Issue
Block a user