[AAE-9200] - Be able to customise task/process list and header date f… (#7711)

* [AAE-9200] - Be able to customise task/process list and header date formats

* Update json schema

* Revert schema changes

* Update task and process name translation values

* move task/process header date formats inside header config

* Add documentation

* Update documentation

* Use a fixed timezone for unit tests of core and cloud

* Fix e2e due to column rename

* More e2e fixes due to column rename, remove test covered by unit test
This commit is contained in:
Ardit Domi
2022-07-19 15:46:31 +02:00
committed by GitHub
parent 46926ed818
commit fa587510bd
21 changed files with 171 additions and 54 deletions

View File

@@ -20,7 +20,6 @@ import { createApiService,
AppListCloudPage,
GroupIdentityService,
IdentityService,
LocalStorageUtil,
LoginPage,
StringUtil,
TaskHeaderCloudPage,
@@ -68,7 +67,6 @@ describe('Task Header cloud component', () => {
let subTask: any;
let subTaskCreatedDate: string;
let completedEndDate: string;
let defaultDate: string;
let groupInfo: any;
let testUser: any;
let unclaimedTask: any;
@@ -76,7 +74,6 @@ describe('Task Header cloud component', () => {
const description = 'descriptionTask';
const formatDate = 'MMM D, YYYY';
const dateTimeFormat = 'MMM D, Y, H:mm';
const defaultFormat = 'M/D/YY';
const createCompletedTask = async function () {
const completedTaskId = await tasksService.createStandaloneTask(completedTaskName,
@@ -117,7 +114,6 @@ describe('Task Header cloud component', () => {
completedCreatedDate = moment(completedTask.entry.createdDate).format(formatDate);
dueDate = moment(completedTask.entry.dueDate).format(dateTimeFormat);
completedEndDate = moment(completedTask.entry.endDate).format(formatDate);
defaultDate = moment(completedTask.entry.createdDate).format(defaultFormat);
subTask = await createSubTask(createdTaskId);
subTaskCreatedDate = moment(subTask.entry.createdDate).format(formatDate);
@@ -241,29 +237,4 @@ describe('Task Header cloud component', () => {
await peopleCloudComponentPage.searchAssignee('modeler');
await peopleCloudComponentPage.checkNoResultsFoundError();
});
describe('Default Date format', () => {
beforeEach(async () => {
await LocalStorageUtil.setConfigField('dateValues', '{' +
'"defaultDateFormat": "shortDate",' +
'"defaultDateTimeFormat": "M/d/yy, h:mm a",' +
'"defaultLocale": "uk"' +
'}');
await navigationBarPage.navigateToProcessServicesCloudPage();
await appListCloudComponent.checkApsContainer();
await appListCloudComponent.goToApp(simpleApp);
});
it('[C311280] Should pick up the default date format from the app configuration', async () => {
await taskFilter.clickTaskFilter('completed-tasks');
await taskList.getDataTable().waitTillContentLoaded();
await taskList.checkContentIsDisplayedByName(completedTaskName);
await taskList.selectRow(completedTaskName);
await tasksCloudDemoPage.waitTillContentLoaded();
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
await expect(await taskHeaderCloudPage.getCreated()).toEqual(defaultDate);
});
});
});

View File

@@ -142,10 +142,10 @@ describe('Edit task filters and task list properties', () => {
await editTaskFilter.setSortFilterDropDown('name');
await editTaskFilter.setOrderFilterDropDown(SORT_ORDER.ASC);
await expect(await taskList.getDataTable().checkListIsSorted(SORT_ORDER.ASC, 'Name')).toBe(true);
await expect(await taskList.getDataTable().checkListIsSorted(SORT_ORDER.ASC, 'Task Name')).toBe(true);
await editTaskFilter.setOrderFilterDropDown(SORT_ORDER.DESC);
await expect(await taskList.getDataTable().checkListIsSorted(SORT_ORDER.DESC, 'Name')).toBe(true);
await expect(await taskList.getDataTable().checkListIsSorted(SORT_ORDER.DESC, 'Task Name')).toBe(true);
});
it('[C290156] Should display tasks ordered by id when Id is selected from sort dropdown', async () => {