diff --git a/docs/process-services-cloud/components/task-header-cloud.component.md b/docs/process-services-cloud/components/task-header-cloud.component.md
index 6fb0f0b02b..86ce975c9b 100644
--- a/docs/process-services-cloud/components/task-header-cloud.component.md
+++ b/docs/process-services-cloud/components/task-header-cloud.component.md
@@ -27,6 +27,7 @@ Shows all the information related to a task.
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| appName | `string` | "" | (Required) The name of the application. |
+| showTitle | `boolean` | true | Show/Hide the task title |
| taskId | `string` | | (Required) The id of the task. |
### Events
diff --git a/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.html b/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.html
index 9de0215103..53bad84f0a 100644
--- a/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.html
+++ b/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.html
@@ -1,9 +1,10 @@
-
{{ taskDetails?.name }}
+{{ taskDetails?.name }}
+
+
+
+
diff --git a/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.scss b/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.scss
index 6f440a3cdc..8da05a7e79 100644
--- a/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.scss
+++ b/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.scss
@@ -22,6 +22,11 @@
&-claim-controls {
color: rgb(131, 131, 131);
}
+
+ &-task-header-loading {
+ display: flex;
+ justify-content: center;
+ }
}
@media screen and ($mat-small) {
@@ -32,3 +37,8 @@
}
}
}
+
+.adf-task-header-loading {
+ display: flex;
+ justify-content: center;
+}
diff --git a/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.spec.ts
index 533f49fd68..56dd4db0aa 100644
--- a/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.spec.ts
+++ b/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.spec.ts
@@ -73,6 +73,18 @@ describe('TaskHeaderCloudComponent', () => {
component.ngOnChanges();
});
+ it('should hide the title if showTitle is false', () => {
+ component.showTitle = false;
+ fixture.detectChanges();
+ let taskTitle = fixture.debugElement.query(By.css('.adf-task-title'));
+ expect(taskTitle).toBeNull();
+
+ component.showTitle = true;
+ fixture.detectChanges();
+ taskTitle = fixture.debugElement.query(By.css('.adf-task-title'));
+ expect(taskTitle).toBeTruthy();
+ });
+
it('should fectch task details when appName and taskId defined', async(() => {
fixture.detectChanges();
fixture.whenStable().then(() => {
@@ -188,6 +200,13 @@ describe('TaskHeaderCloudComponent', () => {
description = fixture.debugElement.query(By.css('[data-automation-id="card-textitem-value-description"]'));
expect(description.nativeElement.value.trim()).toEqual('This is the description');
});
+
+ it('should show loading spinner when properties are not loaded', () => {
+ component.properties = null;
+ fixture.detectChanges();
+ const loading = fixture.debugElement.query(By.css('.adf-task-header-loading'));
+ expect(loading).toBeTruthy();
+ });
});
describe('Task with parentTaskId', () => {
diff --git a/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.ts
index f6c4a1c861..4da0f52b5d 100644
--- a/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.ts
+++ b/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.ts
@@ -50,6 +50,10 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges {
@Input()
taskId: string;
+ /** Show/Hide the task title */
+ @Input()
+ showTitle: boolean = true;
+
/** Emitted when the task is claimed. */
@Output()
claim: EventEmitter = new EventEmitter();