2026-04-30 06:45:56 +00:00
|
|
|
{
|
|
|
|
|
"version": 1,
|
|
|
|
|
"defaultCategories": ["unit", "component", "contract"],
|
|
|
|
|
"categories": {
|
|
|
|
|
"unit": {
|
|
|
|
|
"description": "Pure logic tests with no Obsidian runtime, filesystem, process, or provider boundary.",
|
|
|
|
|
"files": [
|
|
|
|
|
"anchor.test.js",
|
|
|
|
|
"cards-nav.test.js",
|
|
|
|
|
"direct-batch.test.js",
|
|
|
|
|
"direct-generation.test.js",
|
|
|
|
|
"direct-i18n.test.js",
|
|
|
|
|
"direct-markdown.test.js",
|
|
|
|
|
"direct-prompt.test.js",
|
|
|
|
|
"direct-settings-extra.test.js",
|
|
|
|
|
"direct-settings.test.js",
|
|
|
|
|
"direct-streaming.test.js",
|
|
|
|
|
"i18n.test.js",
|
|
|
|
|
"markdown.test.js",
|
|
|
|
|
"schema.test.js",
|
|
|
|
|
"scroll.test.js",
|
|
|
|
|
"settings.test.js",
|
|
|
|
|
"streaming.test.js",
|
|
|
|
|
"vault-batch.test.js"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"component": {
|
|
|
|
|
"description": "Tests that exercise plugin components with controlled adapters, job managers, or Obsidian shims.",
|
|
|
|
|
"files": [
|
|
|
|
|
"cache.test.js",
|
|
|
|
|
"direct-cache.test.js",
|
|
|
|
|
"generation-job-manager.test.js",
|
feat: toggle right sidebar instead of detaching tab + component tests
UX change:
- The "open Parallel Reader" command now toggles the right sidebar's
collapsed state instead of detaching the leaf. The tab and its content
are preserved across hide/show, matching standard Obsidian behaviour
for File Explorer and friends. Detaching the tab on every second
press destroyed cached cards and forced re-generation.
Behaviour:
- No leaf yet → create + reveal
- Leaf exists, right sidebar collapsed → reveal (expands sidebar)
- Leaf exists, right sidebar expanded → collapse(); tab is preserved
- No right sidebar (mobile / unusual layout) → reveal as fallback
Tests:
- New tests/view-render.test.js (18 cases) covering the component layer
that was previously a gap. The 1.0.12 → 1.0.13 sidebar regression
could not have been caught by any existing pure-function test; this
file fills that gap by mocking app.workspace + view spies and running
real runForFile / refreshViewAfterCache* / toggleParallelView.
- shouldRender matrix (4 cases): silentView × sourceFile state — the
exact regression introduced in PR2 where guards were over-applied.
- toggleParallelView (4 cases): no-leaf opens, expanded → collapse,
collapsed → reveal, no-rightSplit fallback.
- refreshViewAfterCacheDelete + Clear (4 cases): matching file vs
different file vs no-view, plus clear-all always renderEmpty.
- runForFile outcome enum mapping (6 cases): already-running early
return, already-running from catch, cancelled, generic error,
regenerate-confirm cancellation, skipEditConfirm bypass — these
drive batch statistics and were untested before.
- view.deleteCard / updateCard cardPersistFailed path (3 cases):
exposes ParallelReaderView via test-exports for instantiation;
mocks cacheReplaceCards returning false to verify the failure
notice path lands and the public method returns false.
src/test-exports.ts: export ParallelReaderView for component tests.
tests/catalog.json: register view-render.test.js under component.
Change-Id: I439b5fca07b0928e6fe44d9025c2421c71c6cb28
2026-05-02 07:38:41 +00:00
|
|
|
"plugin-batch.test.js",
|
|
|
|
|
"view-render.test.js"
|
2026-04-30 06:45:56 +00:00
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"contract": {
|
|
|
|
|
"description": "Tests for provider protocols, CLI command contracts, exported test surfaces, and architecture invariants.",
|
|
|
|
|
"files": [
|
|
|
|
|
"architecture.test.js",
|
2026-05-09 03:49:23 +00:00
|
|
|
"backend-test.test.js",
|
2026-04-30 06:45:56 +00:00
|
|
|
"cli.test.js",
|
|
|
|
|
"direct-providers.test.js",
|
|
|
|
|
"providers.test.js",
|
|
|
|
|
"test-exports.test.js"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"externalCategories": {
|
|
|
|
|
"e2e": {
|
|
|
|
|
"description": "Headless product-shell smoke using the built plugin package and a disposable Vault filesystem.",
|
|
|
|
|
"command": "npm run test:e2e"
|
|
|
|
|
},
|
|
|
|
|
"live": {
|
|
|
|
|
"description": "Opt-in check against a real local Vault plugin install. Does not launch Obsidian or call a provider.",
|
|
|
|
|
"command": "TEST_LIVE=1 npm run test:live"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|