mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-03 04:17:54 +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).toHaveLength(1);
|
||||||
expect(groups[0]?.variants?.map((variant) => variant.audience)).toEqual([
|
expect(groups[0]?.variants?.map((variant) => variant.audience)).toEqual(['business', 'free']);
|
||||||
'business',
|
|
||||||
'personal',
|
|
||||||
]);
|
|
||||||
expect(groups[0]?.variants?.map((variant) => variant.inlineLabel)).toEqual([
|
expect(groups[0]?.variants?.map((variant) => variant.inlineLabel)).toEqual([
|
||||||
'Business · Workspace 04a0f049',
|
'Business · Workspace 04a0f049',
|
||||||
'Personal · Free',
|
'Free',
|
||||||
]);
|
]);
|
||||||
expect(groups[0]?.variants?.map((variant) => variant.compactDetailLabel)).toEqual([
|
expect(groups[0]?.variants?.map((variant) => variant.compactDetailLabel)).toEqual([
|
||||||
'04a0f049',
|
'04a0f049',
|
||||||
'Free',
|
null,
|
||||||
]);
|
]);
|
||||||
expect(groups[0]?.memberIds).toEqual([
|
expect(groups[0]?.memberIds).toEqual([
|
||||||
'kaidu.kd@gmail.com#04a0f049-team',
|
'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([
|
const groups = buildAccountVisualGroups([
|
||||||
makeAccount({
|
makeAccount({
|
||||||
id: 'kaidu.kd@gmail.com#plus',
|
id: 'kaidu.kd@gmail.com#plus',
|
||||||
@@ -61,8 +58,8 @@ describe('buildAccountVisualGroups', () => {
|
|||||||
|
|
||||||
expect(groups).toHaveLength(1);
|
expect(groups).toHaveLength(1);
|
||||||
expect(groups[0]?.variants?.map((variant) => variant.inlineLabel)).toEqual([
|
expect(groups[0]?.variants?.map((variant) => variant.inlineLabel)).toEqual([
|
||||||
'Personal · Free',
|
|
||||||
'Personal · Plus',
|
'Personal · Plus',
|
||||||
|
'Free',
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user