sync: update from private repo (9a86f49b)
CI / build-and-test (push) Successful in 9m8s
CI / build-and-test (pull_request) Successful in 9m42s

This commit is contained in:
oss-sync
2026-07-12 23:51:48 +00:00
parent a67c40d33c
commit ed3dc5529a
159 changed files with 11696 additions and 1600 deletions
@@ -1,6 +1,6 @@
import { describe, it, expect } from 'vitest';
import { CONFIG_GROUPS } from './SettingsSidebar';
import { buildSettingsSearchIndex, searchSettings } from './settingsSearchIndex';
import { buildSettingsFieldSearchIndex, buildSettingsSearchIndex, searchSettings } from './settingsSearchIndex';
describe('searchSettings', () => {
it('finds a section by a config-key keyword buried in a form', () => {
@@ -37,6 +37,15 @@ describe('searchSettings', () => {
});
});
describe('field search index', () => {
it('finds a fixed field by its config key and keeps the target section', () => {
const results = searchSettings('searxng_url', buildSettingsFieldSearchIndex());
expect(results).toEqual(expect.arrayContaining([
expect.objectContaining({ sectionId: 'tools-web', fieldId: 'tools.searxngUrl' }),
]));
});
});
describe('index integrity (drift guard)', () => {
const allIds = CONFIG_GROUPS.flatMap(g => g.sections.map(s => s.id));