mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-3638] - update priority option (#6423)
This commit is contained in:
@@ -1169,7 +1169,7 @@
|
|||||||
{
|
{
|
||||||
"key": "0",
|
"key": "0",
|
||||||
"value": "0",
|
"value": "0",
|
||||||
"label": "ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NOT_SET"
|
"label": "ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NONE"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "1",
|
"key": "1",
|
||||||
|
@@ -68,7 +68,7 @@ describe('Task Header cloud component', () => {
|
|||||||
let groupInfo: any;
|
let groupInfo: any;
|
||||||
let testUser: any;
|
let testUser: any;
|
||||||
let unclaimedTask: any;
|
let unclaimedTask: any;
|
||||||
const priority = 0; // Not set
|
const priority = 0;
|
||||||
const description = 'descriptionTask';
|
const description = 'descriptionTask';
|
||||||
const formatDate = 'MMM D, YYYY';
|
const formatDate = 'MMM D, YYYY';
|
||||||
const dateTimeFormat = 'MMM D, Y, H:mm';
|
const dateTimeFormat = 'MMM D, Y, H:mm';
|
||||||
@@ -146,7 +146,7 @@ describe('Task Header cloud component', () => {
|
|||||||
await expect(await taskHeaderCloudPage.getDescription())
|
await expect(await taskHeaderCloudPage.getDescription())
|
||||||
.toEqual(isValueInvalid(basicCreatedTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : basicCreatedTask.entry.description);
|
.toEqual(isValueInvalid(basicCreatedTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : basicCreatedTask.entry.description);
|
||||||
await expect(await taskHeaderCloudPage.getStatus()).toEqual('ASSIGNED');
|
await expect(await taskHeaderCloudPage.getStatus()).toEqual('ASSIGNED');
|
||||||
await expect(await taskHeaderCloudPage.getPriority()).toEqual('Not set');
|
await expect(await taskHeaderCloudPage.getPriority()).toEqual('None');
|
||||||
await expect(await taskHeaderCloudPage.getCategory()).toEqual(!basicCreatedTask.entry.category ?
|
await expect(await taskHeaderCloudPage.getCategory()).toEqual(!basicCreatedTask.entry.category ?
|
||||||
CONSTANTS.TASK_DETAILS.NO_CATEGORY : basicCreatedTask.entry.category);
|
CONSTANTS.TASK_DETAILS.NO_CATEGORY : basicCreatedTask.entry.category);
|
||||||
await expect(await taskHeaderCloudPage.getDueDate()).toEqual(isValueInvalid(basicCreatedTask.entry.dueDate) ?
|
await expect(await taskHeaderCloudPage.getDueDate()).toEqual(isValueInvalid(basicCreatedTask.entry.dueDate) ?
|
||||||
@@ -170,7 +170,7 @@ describe('Task Header cloud component', () => {
|
|||||||
await expect(await taskHeaderCloudPage.getDescription())
|
await expect(await taskHeaderCloudPage.getDescription())
|
||||||
.toEqual(isValueInvalid(completedTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : completedTask.entry.description);
|
.toEqual(isValueInvalid(completedTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : completedTask.entry.description);
|
||||||
await expect(await taskHeaderCloudPage.getStatus()).toEqual('COMPLETED');
|
await expect(await taskHeaderCloudPage.getStatus()).toEqual('COMPLETED');
|
||||||
await expect(await taskHeaderCloudPage.getReadonlyPriority()).toEqual('Not set');
|
await expect(await taskHeaderCloudPage.getReadonlyPriority()).toEqual('None');
|
||||||
await expect(await taskHeaderCloudPage.getCategory()).toEqual(!completedTask.entry.category ?
|
await expect(await taskHeaderCloudPage.getCategory()).toEqual(!completedTask.entry.category ?
|
||||||
CONSTANTS.TASK_DETAILS.NO_CATEGORY : completedTask.entry.category);
|
CONSTANTS.TASK_DETAILS.NO_CATEGORY : completedTask.entry.category);
|
||||||
await expect(await taskHeaderCloudPage.getDueDate()).toEqual(isValueInvalid(completedTask.entry.dueDate) ?
|
await expect(await taskHeaderCloudPage.getDueDate()).toEqual(isValueInvalid(completedTask.entry.dueDate) ?
|
||||||
@@ -194,7 +194,7 @@ describe('Task Header cloud component', () => {
|
|||||||
await expect(await taskHeaderCloudPage.getDescription())
|
await expect(await taskHeaderCloudPage.getDescription())
|
||||||
.toEqual(isValueInvalid(subTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : subTask.entry.description);
|
.toEqual(isValueInvalid(subTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : subTask.entry.description);
|
||||||
await expect(await taskHeaderCloudPage.getStatus()).toEqual('ASSIGNED');
|
await expect(await taskHeaderCloudPage.getStatus()).toEqual('ASSIGNED');
|
||||||
await expect(await taskHeaderCloudPage.getPriority()).toEqual('Not set');
|
await expect(await taskHeaderCloudPage.getPriority()).toEqual('None');
|
||||||
await expect(await taskHeaderCloudPage.getCategory()).toEqual(!subTask.entry.category ?
|
await expect(await taskHeaderCloudPage.getCategory()).toEqual(!subTask.entry.category ?
|
||||||
CONSTANTS.TASK_DETAILS.NO_CATEGORY : subTask.entry.category);
|
CONSTANTS.TASK_DETAILS.NO_CATEGORY : subTask.entry.category);
|
||||||
await expect(await taskHeaderCloudPage.getDueDate()).toEqual(isValueInvalid(subTask.entry.dueDate) ? CONSTANTS.TASK_DETAILS.NO_DATE : subTaskCreatedDate);
|
await expect(await taskHeaderCloudPage.getDueDate()).toEqual(isValueInvalid(subTask.entry.dueDate) ? CONSTANTS.TASK_DETAILS.NO_DATE : subTaskCreatedDate);
|
||||||
|
@@ -12,3 +12,4 @@
|
|||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 775 B After Width: | Height: | Size: 776 B |
@@ -95,7 +95,7 @@
|
|||||||
"JSON_CELL": "Json",
|
"JSON_CELL": "Json",
|
||||||
"COMPLETED_BY": "Completed By",
|
"COMPLETED_BY": "Completed By",
|
||||||
"PRIORITY_VALUES": {
|
"PRIORITY_VALUES": {
|
||||||
"NOT_SET": "Not set",
|
"NONE": "None",
|
||||||
"LOW": "Low",
|
"LOW": "Low",
|
||||||
"NORMAL": "Normal",
|
"NORMAL": "Normal",
|
||||||
"HIGH": "High"
|
"HIGH": "High"
|
||||||
|
@@ -27,7 +27,7 @@ export interface TaskPriorityOption {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const DEFAULT_TASK_PRIORITIES: TaskPriorityOption[] = [
|
export const DEFAULT_TASK_PRIORITIES: TaskPriorityOption[] = [
|
||||||
{ label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NOT_SET', value: '0', key: '0' },
|
{ label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NONE', value: '0', key: '0' },
|
||||||
{ label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.LOW', value: '1', key: '1' },
|
{ label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.LOW', value: '1', key: '1' },
|
||||||
{ label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NORMAL', value: '2', key: '2' },
|
{ label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NORMAL', value: '2', key: '2' },
|
||||||
{ label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.HIGH', value: '3', key: '3' }
|
{ label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.HIGH', value: '3', key: '3' }
|
||||||
|
@@ -95,7 +95,8 @@
|
|||||||
</mat-checkbox>
|
</mat-checkbox>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<adf-cloud-date-range-filter *ngIf="taskFilterProperty.type === 'date-range'"
|
<adf-cloud-date-range-filter #dateRange
|
||||||
|
*ngIf="taskFilterProperty.type === 'date-range'"
|
||||||
[processFilterProperty]="taskFilterProperty"
|
[processFilterProperty]="taskFilterProperty"
|
||||||
[options]="taskFilterProperty.dateFilterOptions"
|
[options]="taskFilterProperty.dateFilterOptions"
|
||||||
(dateTypeChange)="onDateTypeChange($event, taskFilterProperty)"
|
(dateTypeChange)="onDateTypeChange($event, taskFilterProperty)"
|
||||||
|
@@ -135,7 +135,7 @@ describe('TaskHeaderCloudComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
const options: any = fixture.debugElement.queryAll(By.css('mat-option'));
|
const options: any = fixture.debugElement.queryAll(By.css('mat-option'));
|
||||||
expect(options[0].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NOT_SET');
|
expect(options[0].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NONE');
|
||||||
expect(options[1].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.LOW');
|
expect(options[1].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.LOW');
|
||||||
expect(options[2].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NORMAL');
|
expect(options[2].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NORMAL');
|
||||||
expect(options[3].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.HIGH');
|
expect(options[3].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.HIGH');
|
||||||
|
@@ -187,12 +187,12 @@ export class DataTableComponentPage {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a.toLocaleLowerCase() === 'not set') {
|
if (a.toLocaleLowerCase() === 'none') {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a.toLocaleLowerCase() === 'low') {
|
if (a.toLocaleLowerCase() === 'low') {
|
||||||
if (b === 'not set') {
|
if (b === 'none') {
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user