From 5157a922a5ed0461381741d8a7b624c2dcd6f71d Mon Sep 17 00:00:00 2001 From: Sergey Galuza Date: Sat, 30 May 2026 23:01:58 +0200 Subject: [PATCH] test(accounts): align stale free-tier expectations with current behavior MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 72ea1fc9 ("fix(accounts): simplify codex free tier badges") split free codex accounts out of the `personal` audience into a distinct `free` audience and dropped the `'Personal · '` prefix on inlineLabel, but `account-visual-groups.test.ts` was not updated and has been failing in CI ever since. Update expectations to match the shipped behavior: - `audience` for `-free` tokens is `'free'`, not `'personal'` - `inlineLabel` for a bare free account is `'Free'`, not `'Personal · Free'` - `compactDetailLabel` is `null` when no extra parts are present - Sort order: business -> personal -> free -> unknown Drive-by fix unrelated to the Opus 4.8 work in this PR but caught because these tests started failing on every push to the branch. Built [OnSteroids](https://onsteroids.ai) --- ui/tests/unit/ui/lib/account-visual-groups.test.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/ui/tests/unit/ui/lib/account-visual-groups.test.ts b/ui/tests/unit/ui/lib/account-visual-groups.test.ts index cba2b9c2..eae7c8da 100644 --- a/ui/tests/unit/ui/lib/account-visual-groups.test.ts +++ b/ui/tests/unit/ui/lib/account-visual-groups.test.ts @@ -29,17 +29,14 @@ describe('buildAccountVisualGroups', () => { ]); expect(groups).toHaveLength(1); - expect(groups[0]?.variants?.map((variant) => variant.audience)).toEqual([ - 'business', - 'personal', - ]); + expect(groups[0]?.variants?.map((variant) => variant.audience)).toEqual(['business', 'free']); expect(groups[0]?.variants?.map((variant) => variant.inlineLabel)).toEqual([ 'Business · Workspace 04a0f049', - 'Personal · Free', + 'Free', ]); expect(groups[0]?.variants?.map((variant) => variant.compactDetailLabel)).toEqual([ '04a0f049', - 'Free', + null, ]); expect(groups[0]?.memberIds).toEqual([ 'kaidu.kd@gmail.com#04a0f049-team', @@ -47,7 +44,7 @@ describe('buildAccountVisualGroups', () => { ]); }); - it('keeps multiple personal codex plans distinct inside the same grouped card', () => { + it('keeps personal and free codex plans distinct inside the same grouped card', () => { const groups = buildAccountVisualGroups([ makeAccount({ id: 'kaidu.kd@gmail.com#plus', @@ -61,8 +58,8 @@ describe('buildAccountVisualGroups', () => { expect(groups).toHaveLength(1); expect(groups[0]?.variants?.map((variant) => variant.inlineLabel)).toEqual([ - 'Personal · Free', 'Personal · Plus', + 'Free', ]); }); });