diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-additions.component.ts b/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-additions.component.ts index a0f5007b8..9845fc7f9 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-additions.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-additions.component.ts @@ -59,7 +59,10 @@ export class ArtifactAdditionsComponent implements AfterViewChecked, OnInit { } hasScannerSupportSBOM(): boolean { - return this.artifactListPageService.hasScannerSupportSBOM(); + if (this.additionLinks && this.additionLinks[ADDITIONS.SBOMS]) { + return true; + } + return false; } getVulnerability(): AdditionLink { diff --git a/src/portal/src/app/base/project/repository/artifact/sbom-scanning/sbom-scan.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/sbom-scanning/sbom-scan.component.spec.ts index 34c17cf35..a8f41df22 100644 --- a/src/portal/src/app/base/project/repository/artifact/sbom-scanning/sbom-scan.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/sbom-scanning/sbom-scan.component.spec.ts @@ -179,8 +179,8 @@ describe('ResultSbomComponent (inline template)', () => { component.artifactDigest = mockedSbomDigest; component.sbomDigest = mockedSbomDigest; component.accessories = mockedAccessories; + fixture.detectChanges(); fixture.whenStable().then(() => { - fixture.detectChanges(); const el: HTMLElement = fixture.nativeElement.querySelector('.tip-block'); expect(el).not.toBeNull();