Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(navConfig): update tests for nav tab and avatar menu changes

Steven Enamakeld0efd3792d3a
diff --git a/app/src/config/__tests__/navConfig.test.ts b/app/src/config/__tests__/navConfig.test.ts
index 4dea3a15bc..f0c0d41e54 100644
--- a/app/src/config/__tests__/navConfig.test.ts
+++ b/app/src/config/__tests__/navConfig.test.ts
@@ -3,49 +3,48 @@ import { describe, expect, it } from 'vitest';
import { AVATAR_MENU_ITEMS, NAV_TABS } from '../navConfig';
describe('NAV_TABS', () => {
- it('has exactly 6 entries', () => {
- expect(NAV_TABS).toHaveLength(5);
+ it('has exactly 4 entries', () => {
+ expect(NAV_TABS).toHaveLength(4);
});
it('has the correct ids in order', () => {
- expect(NAV_TABS.map(t => t.id)).toEqual(['chat', 'human', 'brain', 'flows', 'connections']);
+ expect(NAV_TABS.map(t => t.id)).toEqual(['chat', 'flows', 'connections', 'rewards']);
});
it('has the correct paths', () => {
- expect(NAV_TABS.map(t => t.path)).toEqual([
- '/chat',
- '/human',
- '/brain',
- '/flows',
- '/connections',
- ]);
+ expect(NAV_TABS.map(t => t.path)).toEqual(['/chat', '/flows', '/connections', '/rewards']);
});
it('has the correct labelKeys', () => {
expect(NAV_TABS.map(t => t.labelKey)).toEqual([
'nav.chat',
- 'nav.human',
- 'nav.brain',
'nav.flows',
'nav.connections',
+ 'nav.rewards',
]);
});
it('has the correct walkthroughAttrs', () => {
expect(NAV_TABS.map(t => t.walkthroughAttr)).toEqual([
'tab-chat',
- 'tab-human',
- 'tab-brain',
'tab-flows',
'tab-connections',
+ 'tab-rewards',
]);
});
- it('keeps Human as a first-class tab alongside the chat mascot', () => {
- // Both surfaces show the mascot on purpose: /human is the dedicated stage,
- // /chat carries it docked on the composer. They share one set of mascot
- // preferences, so having both cannot make them disagree.
- expect(NAV_TABS.find(t => t.id === 'human')?.path).toBe('/human');
+ it('gates only rewards on a cloud session', () => {
+ expect(NAV_TABS.filter(t => t.cloudOnly).map(t => t.id)).toEqual(['rewards']);
+ });
+
+ it('no longer contains a human tab (reached from the composer idle button)', () => {
+ // `/human` is still a live route; the composer's primary slot opens it when
+ // there is nothing to send, so a sidebar row would be a second door.
+ expect(NAV_TABS.find(t => t.id === 'human')).toBeUndefined();
+ });
+
+ it('no longer contains a brain tab (reached from the surfaces that link into it)', () => {
+ expect(NAV_TABS.find(t => t.id === 'brain')).toBeUndefined();
});
it('no longer contains a top-level orchestration tab (folded under Brain)', () => {
@@ -65,10 +64,6 @@ describe('NAV_TABS', () => {
expect(NAV_TABS.find(t => t.id === 'activity')).toBeUndefined();
});
- it('does not contain a rewards tab', () => {
- expect(NAV_TABS.find(t => t.id === 'rewards')).toBeUndefined();
- });
-
it('does not contain an intelligence or skills tab id', () => {
expect(NAV_TABS.find(t => t.id === 'intelligence')).toBeUndefined();
expect(NAV_TABS.find(t => t.id === 'skills')).toBeUndefined();
@@ -76,23 +71,21 @@ describe('NAV_TABS', () => {
});
describe('AVATAR_MENU_ITEMS', () => {
- it('has exactly 5 entries', () => {
- expect(AVATAR_MENU_ITEMS).toHaveLength(5);
+ it('has exactly 4 entries', () => {
+ expect(AVATAR_MENU_ITEMS).toHaveLength(4);
});
it('has the correct ids in order', () => {
- expect(AVATAR_MENU_ITEMS.map(i => i.id)).toEqual([
- 'account',
- 'billing',
- 'rewards',
- 'invites',
- 'wallet',
- ]);
+ expect(AVATAR_MENU_ITEMS.map(i => i.id)).toEqual(['account', 'billing', 'invites', 'wallet']);
+ });
+
+ it('no longer offers rewards (it is a primary nav destination now)', () => {
+ expect(AVATAR_MENU_ITEMS.find(i => i.id === 'rewards')).toBeUndefined();
});
- it('billing, rewards, and invites are cloudOnly; account and wallet are not', () => {
+ it('billing and invites are cloudOnly; account and wallet are not', () => {
const cloudOnly = AVATAR_MENU_ITEMS.filter(i => i.cloudOnly).map(i => i.id);
- expect(cloudOnly).toEqual(['billing', 'rewards', 'invites']);
+ expect(cloudOnly).toEqual(['billing', 'invites']);
});
it('billing uses openUrl; all others use navigate', () => {