Skip to content

Commit

Permalink
Fixes-20537 SBOM tab should not exist when the artifact is helm packa…
Browse files Browse the repository at this point in the history
…ge (#20538)

Fixes-20537 SBOM tab should not exist when the artifact is oci-compliant helm-chart

Signed-off-by: xuelichao <xuel@vmware.com>
  • Loading branch information
xuelichao authored Jun 3, 2024
1 parent 74f4a35 commit 115827c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 115827c

Please sign in to comment.