feat(ui): Do not show Ultra users /upgrade hint (#22154) (#22156)

This commit is contained in:
Sehoon Shon
2026-03-12 09:46:58 -04:00
committed by GitHub
parent 45faf4d31b
commit 18e8dd768a
9 changed files with 137 additions and 2 deletions
@@ -37,6 +37,7 @@ describe('upgradeCommand', () => {
getContentGeneratorConfig: vi.fn().mockReturnValue({
authType: AuthType.LOGIN_WITH_GOOGLE,
}),
getUserTierName: vi.fn().mockReturnValue(undefined),
},
},
} as unknown as CommandContext);
@@ -115,4 +116,23 @@ describe('upgradeCommand', () => {
});
expect(openBrowserSecurely).not.toHaveBeenCalled();
});
it('should return info message for ultra tiers', async () => {
vi.mocked(mockContext.services.config!.getUserTierName).mockReturnValue(
'Advanced Ultra',
);
if (!upgradeCommand.action) {
throw new Error('The upgrade command must have an action.');
}
const result = await upgradeCommand.action(mockContext, '');
expect(result).toEqual({
type: 'message',
messageType: 'info',
content: 'You are already on the highest tier: Advanced Ultra.',
});
expect(openBrowserSecurely).not.toHaveBeenCalled();
});
});