From 37666ee0f4372f1727f75ede9ce7612acc55fb4a Mon Sep 17 00:00:00 2001 From: Aryan Date: Sat, 5 Nov 2022 18:42:23 +0530 Subject: [PATCH] Minor test fixes --- .../task-description/task-description.component.html | 4 ++-- .../task-description/task-description.component.spec.ts | 5 ++--- .../component/task-description/task-description.component.ts | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/component/task-description/task-description.component.html b/src/app/component/task-description/task-description.component.html index 55287de74..5ee7c9fd8 100644 --- a/src/app/component/task-description/task-description.component.html +++ b/src/app/component/task-description/task-description.component.html @@ -145,7 +145,7 @@

- OWASP SAMM VERSION 2 + {{ SAMMVersion }}
    @@ -155,7 +155,7 @@

    - ISO27001 2017 + {{ ISOVersion }}
      diff --git a/src/app/component/task-description/task-description.component.spec.ts b/src/app/component/task-description/task-description.component.spec.ts index 3acf6d158..1d83459b0 100644 --- a/src/app/component/task-description/task-description.component.spec.ts +++ b/src/app/component/task-description/task-description.component.spec.ts @@ -110,11 +110,11 @@ describe('TaskDescriptionComponent', () => { fixture.detectChanges(); const HTMLElement: HTMLElement = fixture.nativeElement; const contentDisplayedinParagraphTag = HTMLElement.querySelectorAll('p')!; - console.log(contentDisplayedinParagraphTag); expect(contentDisplayedinParagraphTag[10].textContent).toContain( testComments ); }); + it('check if references is being genenrated', () => { const testSAMM = [' Sample SAMM ']; const testISO = [' Sample ISO']; @@ -123,9 +123,8 @@ describe('TaskDescriptionComponent', () => { fixture.detectChanges(); const HTMLElement: HTMLElement = fixture.nativeElement; const contentDisplayedinParagraphTag = HTMLElement.querySelectorAll('p')!; - console.log(contentDisplayedinParagraphTag); expect(contentDisplayedinParagraphTag[9].textContent).toContain( - 'OWASP SAMM VERSION 2' + testSAMM[0] + 'ISO27001 2017' + testISO[0] + component.SAMMVersion + testSAMM[0] + component.ISOVersion + testISO[0] ); }); }); diff --git a/src/app/component/task-description/task-description.component.ts b/src/app/component/task-description/task-description.component.ts index 66fdab9ec..9f66b94c8 100644 --- a/src/app/component/task-description/task-description.component.ts +++ b/src/app/component/task-description/task-description.component.ts @@ -67,7 +67,8 @@ export class TaskDescriptionComponent implements OnInit { KnowledgeLabels: string[] = []; rowIndex: number = 0; markdown: md = md(); - + SAMMVersion: string = 'OWASP SAMM VERSION 2'; + ISOVersion: string = 'ISO27001 2017'; @ViewChildren(MatAccordion) accordion!: QueryList; constructor(private route: ActivatedRoute, private yaml: ymlService) {}