fix: Gateway 화면에서 raw 프로필 ID 노출을 제거한다
불변 profileName은 라우팅과 저장 경계에 유지하고 사용자 출력은 공통 표시명을 사용한다. 기본 인스턴스 suffix를 숨기고 비기본 인스턴스만 사람이 읽을 수 있게 구분한다.
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
GATEWAY_PROFILE_KOREAN_NAMES,
|
||||
GATEWAY_PROFILE_ORDER,
|
||||
orderGatewayProfiles,
|
||||
resolveGatewayProfileDisplayName,
|
||||
resolveGatewayProfileKoreanName,
|
||||
} from '../src/profileOrder.js';
|
||||
|
||||
@@ -56,3 +57,12 @@ describe('resolveGatewayProfileKoreanName', () => {
|
||||
expect(resolveGatewayProfileKoreanName('custom')).toBe('custom');
|
||||
});
|
||||
});
|
||||
|
||||
describe('resolveGatewayProfileDisplayName', () => {
|
||||
it('hides the default instance key and distinguishes non-default instances', () => {
|
||||
expect(resolveGatewayProfileDisplayName('che', 'default')).toBe('체');
|
||||
expect(resolveGatewayProfileDisplayName('hwe', '2')).toBe('훼 [2]');
|
||||
expect(resolveGatewayProfileDisplayName('che', 'default', ' 천하서버 ')).toBe('천하서버');
|
||||
expect(resolveGatewayProfileDisplayName('custom', 'blue')).toBe('custom [blue]');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user