diff --git a/src/app/component/activity-description/activity-description.component.html b/src/app/component/activity-description/activity-description.component.html index 484fcfa1..c71c118e 100644 --- a/src/app/component/activity-description/activity-description.component.html +++ b/src/app/component/activity-description/activity-description.component.html @@ -183,6 +183,20 @@

  • {{ iso22 }}
  • + + + + {{ openCREVersion }} + + + +

    diff --git a/src/app/component/activity-description/activity-description.component.spec.ts b/src/app/component/activity-description/activity-description.component.spec.ts index 1997878a..a19e887f 100644 --- a/src/app/component/activity-description/activity-description.component.spec.ts +++ b/src/app/component/activity-description/activity-description.component.spec.ts @@ -124,13 +124,17 @@ describe('ActivityDescriptionComponent', () => { ); }); - it('check if references is being genenrated', () => { + it('check if references is being generated', () => { const testSAMM = [' Sample SAMM ']; const testISO = [' Sample ISO']; const testISO22 = [' Sample ISO22']; + const uuid = 'abcd'; // for openCRE + component.currentActivity.samm = testSAMM; component.currentActivity.iso = testISO; component.currentActivity.iso22 = testISO22; + component.currentActivity.uuid = uuid; + fixture.detectChanges(); const HTMLElement: HTMLElement = fixture.nativeElement; const contentDisplayedinParagraphTag = HTMLElement.querySelectorAll('p')!; @@ -140,7 +144,9 @@ describe('ActivityDescriptionComponent', () => { component.ISOVersion + testISO[0] + component.ISO22Version + - testISO22[0] + testISO22[0] + + component.openCREVersion + + uuid ); }); }); diff --git a/src/app/component/activity-description/activity-description.component.ts b/src/app/component/activity-description/activity-description.component.ts index c9a09fc0..d5857711 100644 --- a/src/app/component/activity-description/activity-description.component.ts +++ b/src/app/component/activity-description/activity-description.component.ts @@ -24,6 +24,7 @@ export interface activityDescription { iso: string[]; iso22: string[]; samm: string[]; + openCRE: string[]; knowledge: number; resources: number; time: number; @@ -57,6 +58,7 @@ export class ActivityDescriptionComponent implements OnInit { samm: [''], iso: [''], iso22: [''], + openCRE: [''], knowledge: -1, resources: -1, time: -1, @@ -78,6 +80,7 @@ export class ActivityDescriptionComponent implements OnInit { SAMMVersion: string = 'OWASP SAMM VERSION 2'; ISOVersion: string = 'ISO 27001:2017'; ISO22Version: string = 'ISO 27001:2022'; + openCREVersion: string = 'OpenCRE'; @ViewChildren(MatAccordion) accordion!: QueryList; constructor(private route: ActivatedRoute, private yaml: ymlService) {} @@ -170,6 +173,10 @@ export class ActivityDescriptionComponent implements OnInit { data['references']['samm2'], [] ); + this.currentActivity.openCRE = this.defineStringArrayValues( + data['references']['openCRE'], + [] + ); } catch { console.log('references does not exist'); }