fix(accounts): prefer live codex plan over stale free tags

This commit is contained in:
Tam Nhu Tran committed 2026-04-14 21:23:13 -04:00
1 parent 25aa8bdb16
commit 0bfdc522d5
3 files changed
+92 -5

No files matched your search

@@ -127,4 +127,23 @@ describe('AccountSurfaceCard', () => {
expect(screen.getByText('Pers')).toBeInTheDocument();
expect(screen.getByText('Pro')).toBeInTheDocument();
});
it('lets live paid Codex plans override stale free identity badges', () => {
render(
<AccountSurfaceCard
mode="compact"
provider="codex"
accountId="user@example.com#free"
email="user@example.com"
displayEmail="user@example.com"
tokenFile="codex-user@example.com-free.json"
quota={createCodexQuotaResult({ planType: 'plus' })}
showQuota={false}
/>
);
expect(screen.getByText('Pers')).toBeInTheDocument();
expect(screen.getByText('Plus')).toBeInTheDocument();
expect(screen.queryByTitle('Free')).not.toBeInTheDocument();
});
});