@f5-sales-demo/docs-theme 4.11.1 → 4.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/config.ts CHANGED
@@ -304,6 +304,12 @@ export const defaultMegaMenuItems: MegaMenuItem[] = [
304
304
  href: 'https://f5-sales-demo.github.io/observability/',
305
305
  icon: resolveMegaMenuIcon('f5xc:observability'),
306
306
  },
307
+ {
308
+ label: 'Statistics',
309
+ description: 'API metrics, access logs, and security events',
310
+ href: 'https://f5-sales-demo.github.io/statistics/en/',
311
+ icon: resolveMegaMenuIcon('f5xc:data-intelligence'),
312
+ },
307
313
  {
308
314
  label: 'Administration',
309
315
  translations: itemLabels.Administration,
@@ -631,6 +637,7 @@ export const federatedSearchSites = [
631
637
  { repo: 'administration', label: 'Administration' },
632
638
  { repo: 'nginx', label: 'NGINX' },
633
639
  { repo: 'observability', label: 'Observability' },
640
+ { repo: 'statistics', label: 'Statistics' },
634
641
  { repo: 'was', label: 'Web App Scanning' },
635
642
  { repo: 'multi-cloud-networking', label: 'Multi-Cloud Networking' },
636
643
  { repo: 'canada', label: 'Canada Topology' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@f5-sales-demo/docs-theme",
3
- "version": "4.11.1",
3
+ "version": "4.11.3",
4
4
  "description": "F5 Distributed Cloud branded Starlight documentation theme",
5
5
  "type": "module",
6
6
  "engines": {
@@ -0,0 +1,33 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { defaultMegaMenuItems, federatedSearchBundlePaths, federatedSearchSites } from '../../config';
3
+ import { localizeEcosystemHref } from './localize-ecosystem-href';
4
+
5
+ describe('Statistics discovery', () => {
6
+ it('lists Statistics beside monitoring tools exactly once', () => {
7
+ const networking = defaultMegaMenuItems.find((item) => item.label === 'Networking');
8
+ const category = networking?.content?.categories?.find((item) => item.title === 'Manage & Monitor');
9
+ const statistics = category?.items?.filter((item) => item.label === 'Statistics');
10
+ expect(statistics).toHaveLength(1);
11
+ expect(statistics?.[0]).toMatchObject({
12
+ href: 'https://f5-sales-demo.github.io/statistics/en/',
13
+ description: 'API metrics, access logs, and security events',
14
+ });
15
+ expect(category?.items?.map((item) => item.label)).toEqual(['Observability', 'Statistics', 'Administration']);
16
+ });
17
+ it('adds Statistics to federated search and avoids self-index duplication', () => {
18
+ expect(federatedSearchSites.filter((item) => item.repo === 'statistics')).toHaveLength(1);
19
+ expect(federatedSearchBundlePaths('https://f5-sales-demo.github.io', '/')).toContain(
20
+ 'https://f5-sales-demo.github.io/statistics/pagefind/',
21
+ );
22
+ expect(federatedSearchBundlePaths('https://f5-sales-demo.github.io', '/statistics')).not.toContain(
23
+ 'https://f5-sales-demo.github.io/statistics/pagefind/',
24
+ );
25
+ });
26
+ it('keeps the published English destination for every reader locale', () => {
27
+ for (const locale of ['en', 'fr', 'ja']) {
28
+ expect(localizeEcosystemHref('https://f5-sales-demo.github.io/statistics/en/', locale)).toBe(
29
+ 'https://f5-sales-demo.github.io/statistics/en/',
30
+ );
31
+ }
32
+ });
33
+ });