21
group: 'Core concepts',
22
folder: 'Authentication',
23
depth: 2,
24
- position: 7,
24
+ position: index['/docs/authentication/controlling-scopes'].position + 1,
25
});
26
27
expect(index['/docs/extending-sessions/shared-connections']).toEqual({
28
group: 'Guides',
29
folder: 'Extend sessions',
30
depth: 2,
31
- position: 3,
31
+ position: index['/docs/extending-sessions/custom-tools-and-toolkits'].position + 1,
32
});
33
});
34
37
group: 'Get Started',
38
folder: null,
39
depth: 1,
40
- position: 2,
40
+ position: index['/docs'].position + 1,
41
});
42
});
43
46
group: 'Core concepts',
47
folder: 'Authentication',
48
depth: 1,
49
- position: 3,
49
+ position: index['/docs/configuring-sessions'].position + 1,
50
});
51
});
52
53
test('position resets at the next separator', () => {
54
+ // Core concepts opens a new group, so its first entry restarts at 1 rather
55
+ // than continuing Get Started's numbering.
56
expect(index['/docs'].position).toBe(1);
55
- expect(index['/docs/quickstart'].position).toBe(2);
57
expect(index['/docs/how-composio-works'].position).toBe(1);
58
});
59
62
expect(index['/docs/extending-sessions/proxy-execute'].position).toBe(1);
63
});
64
64
- test('a folder counts as one row for its siblings', () => {
65
- // Authentication is row 3 in Core concepts and holds 7 children. Counting
66
- // through them would report Triggers as row 11 while it renders as row 4.
67
- expect(index['/docs/triggers'].position).toBe(4);
68
- expect(index['/docs/skills'].position).toBe(5);
65
+ test('a folder counts as one entry for its siblings', () => {
66
+ // Authentication holds 7 children, so a counter that threaded through them
67
+ // would put Triggers 7 sibling slots later than Authentication instead of
68
+ // directly after it.
69
+ expect(index['/docs/triggers'].position).toBe(index['/docs/authentication'].position + 1);
70
+ expect(index['/docs/skills'].position).toBe(index['/docs/triggers'].position + 1);
71
});
72
73
test('nested folders restart the sequence at each level', () => {
75
group: 'Get Started',
76
folder: 'Custom providers',
77
depth: 2,
76
- position: 12,
78
+ position: index['/docs/providers/mastra'].position + 1,
79
});
80
expect(index['/docs/providers/custom-providers/typescript'].position).toBe(1);
81
});