mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 06:16:37 +00:00
test(accounts): align stale free-tier expectations with current grouping
72ea1fc9 added a 'free' audience to AUDIENCE_ORDER in account-visual-groups.ts
but left the unit test asserting the old 'personal'/'Personal · Free' labels,
so the suite fails on dev. Realign the two assertions to the current source
output: free-tier codex variants resolve to audience 'free', inline label
'Free', and null compact detail label.
This commit is contained in:
@@ -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',
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user