Skip to content

Commit 37666ee

Browse files
committed
Minor test fixes
1 parent cee6f63 commit 37666ee

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ <h1>
145145
<mat-expansion-panel>
146146
<mat-expansion-panel-header>
147147
<mat-panel-title>
148-
<b>OWASP SAMM VERSION 2</b>
148+
<b>{{ SAMMVersion }}</b>
149149
</mat-panel-title>
150150
</mat-expansion-panel-header>
151151
<ul *ngFor="let samm of currentTask.samm">
@@ -155,7 +155,7 @@ <h1>
155155
<mat-expansion-panel>
156156
<mat-expansion-panel-header>
157157
<mat-panel-title>
158-
<b>ISO27001 2017</b>
158+
<b>{{ ISOVersion }}</b>
159159
</mat-panel-title>
160160
</mat-expansion-panel-header>
161161
<ul *ngFor="let iso of currentTask.iso">

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ describe('TaskDescriptionComponent', () => {
110110
fixture.detectChanges();
111111
const HTMLElement: HTMLElement = fixture.nativeElement;
112112
const contentDisplayedinParagraphTag = HTMLElement.querySelectorAll('p')!;
113-
console.log(contentDisplayedinParagraphTag);
114113
expect(contentDisplayedinParagraphTag[10].textContent).toContain(
115114
testComments
116115
);
117116
});
117+
118118
it('check if references is being genenrated', () => {
119119
const testSAMM = [' Sample SAMM '];
120120
const testISO = [' Sample ISO'];
@@ -123,9 +123,8 @@ describe('TaskDescriptionComponent', () => {
123123
fixture.detectChanges();
124124
const HTMLElement: HTMLElement = fixture.nativeElement;
125125
const contentDisplayedinParagraphTag = HTMLElement.querySelectorAll('p')!;
126-
console.log(contentDisplayedinParagraphTag);
127126
expect(contentDisplayedinParagraphTag[9].textContent).toContain(
128-
'OWASP SAMM VERSION 2' + testSAMM[0] + 'ISO27001 2017' + testISO[0]
127+
component.SAMMVersion + testSAMM[0] + component.ISOVersion + testISO[0]
129128
);
130129
});
131130
});

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ export class TaskDescriptionComponent implements OnInit {
6767
KnowledgeLabels: string[] = [];
6868
rowIndex: number = 0;
6969
markdown: md = md();
70-
70+
SAMMVersion: string = 'OWASP SAMM VERSION 2';
71+
ISOVersion: string = 'ISO27001 2017';
7172
@ViewChildren(MatAccordion) accordion!: QueryList<MatAccordion>;
7273
constructor(private route: ActivatedRoute, private yaml: ymlService) {}
7374

0 commit comments

Comments
 (0)