[go: nahoru, domu]

Skip to content

Commit

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

Fixes-20537 SBOM tab should not exist when the artifact is helm package #20538

Signed-off-by: xuelichao <xuel@vmware.com>
  • Loading branch information
xuelichao committed Jun 3, 2024
1 parent 2b27170 commit 81fcc0a
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 81fcc0a

Please sign in to comment.