Skip to content

Commit 060acc1

Browse files
committed
Display uuid on task description
1 parent d784535 commit 060acc1

3 files changed

Lines changed: 24 additions & 1 deletion

File tree

src/app/component/task-description/task-description.component.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ <h1>
1010
</div>
1111

1212
<mat-accordion multi="true">
13+
<mat-expansion-panel>
14+
<mat-expansion-panel-header>
15+
<mat-panel-title>
16+
<b>UUID</b>
17+
</mat-panel-title>
18+
</mat-expansion-panel-header>
19+
<p [innerHTML]="currentTask.uuid"></p>
20+
</mat-expansion-panel>
21+
1322
<mat-expansion-panel [expanded]="true">
1423
<mat-expansion-panel-header>
1524
<mat-panel-title>

src/app/component/task-description/task-description.component.spec.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,18 @@ describe('TaskDescriptionComponent', () => {
4040
expect(heading.textContent).toContain(testSubDimension);
4141
});
4242

43-
it('check if description is being genenrated', () => {
43+
it('check if UUID is being genenrated', () => {
44+
const testUUID = '00000000-0000-0000-0000-000000000000';
45+
component.currentTask.description = testUUID;
46+
fixture.detectChanges();
47+
const HTMLElement: HTMLElement = fixture.nativeElement;
48+
const contentDisplayedinParagraphTag = HTMLElement.querySelectorAll('p')!;
49+
expect(contentDisplayedinParagraphTag[0].textContent).toContain(
50+
testUUID
51+
);
52+
});
53+
54+
it('check if description is being genenrated', () => {
4455
const testDescription = 'Sample Description';
4556
component.currentTask.description = testDescription;
4657
fixture.detectChanges();

src/app/component/task-description/task-description.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export interface taskDescription {
1515
subDimension: string;
1616
level: string;
1717
taskName: string;
18+
uuid: string;
1819
description: string;
1920
risk: string;
2021
measure: string;
@@ -45,6 +46,7 @@ export class TaskDescriptionComponent implements OnInit {
4546
subDimension: '',
4647
level: '',
4748
taskName: '',
49+
uuid: '',
4850
description: '',
4951
risk: '',
5052
measure: '',
@@ -105,6 +107,7 @@ export class TaskDescriptionComponent implements OnInit {
105107
data['description'],
106108
''
107109
);
110+
this.currentTask.uuid = this.defineStringValues(data['uuid'], '');
108111
this.currentTask.risk = this.defineStringValues(data['risk'], '');
109112
this.currentTask.measure = this.defineStringValues(data['measure'], '');
110113
try {

0 commit comments

Comments
 (0)