Signed-off-by: Afreen Misbah <afreen@ibm.com>
}
<!-- Authentication details -->
+ @if (hostType === HOST_TYPE.SPECIFIC) {
<div cdsCol
[columnNumbers]="{sm: 4, md: 8, lg: 12}"
class="cds-mt-7">
i18n>No keys added</p>
}
</div>
+ }
</div>
});
it('should return correct auth type label', () => {
+ component.hostDchapKeyCount = 0;
+ expect(component.authTypeLabel).toContain('No authentication');
+
+ component.hostDchapKeyCount = 2;
+
component.authType = AUTHENTICATION.Bidirectional;
expect(component.authTypeLabel).toContain('Bidirectional');
}
get authTypeLabel(): string {
- if (this.authType === AUTHENTICATION.None) return NO_AUTH;
+ if (this.authType === AUTHENTICATION.None || this.hostDchapKeyCount === 0) return NO_AUTH;
return this.authType === AUTHENTICATION.Bidirectional
? $localize`Bidirectional`
: $localize`Unidirectional`;