feat(ui): display user tier in about command (#17400)

This commit is contained in:
Sehoon Shon
2026-01-23 16:03:53 -05:00
committed by GitHub
parent 6e202aeb6e
commit 68c5a9dc41
18 changed files with 108 additions and 10 deletions
@@ -39,6 +39,7 @@ describe('aboutCommand', () => {
config: {
getModel: vi.fn(),
getIdeMode: vi.fn().mockReturnValue(true),
getUserTierName: vi.fn().mockReturnValue(undefined),
},
settings: {
merged: {
@@ -97,6 +98,7 @@ describe('aboutCommand', () => {
gcpProject: 'test-gcp-project',
ideClient: 'test-ide',
userEmail: 'test-email@example.com',
tier: undefined,
});
});
@@ -156,4 +158,21 @@ describe('aboutCommand', () => {
}),
);
});
it('should display the tier when getUserTierName returns a value', async () => {
vi.mocked(mockContext.services.config!.getUserTierName).mockReturnValue(
'Enterprise Tier',
);
if (!aboutCommand.action) {
throw new Error('The about command must have an action.');
}
await aboutCommand.action(mockContext, '');
expect(mockContext.ui.addItem).toHaveBeenCalledWith(
expect.objectContaining({
tier: 'Enterprise Tier',
}),
);
});
});