Test harness & developer-docs foundation for topics 4-7#31
Open
Cyclodex wants to merge 40 commits into
Open
Conversation
… / sidePanel-import projects
… convertPopover tests cover real conversion
…t, side panel mounts)
…s; testing.md: correct vitest config reference, note optional UI
…ioProjectList + e2e tests to use the real renderHtml
…importieren modal open); extend projectTable_TextCell test loop; rewrite the kb_invoice doc sections — the path is verified, just moved to Positionen → Weitere Positionen → Zeit/Leistung
This was referenced May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Establishes a reproducible Vitest test harness (plus a thin opt-in Playwright extension-smoke layer) and a
docs/architecture/knowledge base for the four targeted topics: tooltip replacement, the form-manipulation layer (selectors/*,trigger*,waitFor*,fillForm), theshared/storage wrappers, and the build/release tooling. Tests pin current behaviour — bugs included, flagged// KNOWN ISSUE:and mirrored in the relevant doc.No runtime behaviour in
packages/shared/**orpackages/chrome-extension/src/**is changed; only TSDoc comments are added there. Fixing the known issues and TS-ifying the loose.jsfiles are explicit follow-ups (separate specs).Spec:
docs/superpowers/specs/2026-05-12-test-harness-and-docs-foundation-design.mdPlan:
docs/superpowers/plans/2026-05-13-test-harness-and-docs-foundation.mdWhat's in it
vitest.config.tswith three workspace projects (shared/ node,chrome-extension/ jsdom,sidePanel-import/ node), an in-memorychrome.storage+chrome.runtimefake (throws on un-faked members), aloadFixturehelper, andnpm test/test:fast/test:watch/test:e2escripts..mdprovenance siblings underpackages/chrome-extension/test/fixtures/bexio/. Raw originals stay under git-ignored_raw/; a_raw/__build-fixtures.cjs(also git-ignored) documents the trim + anonymise pipeline.shared/storage + helpers, the form-layer (selectors, trigger*, waitFor*, fillForm, readFormData, loader/delay/trimAll/pressEnter/generateHash), tooltip replacement (projectTable_TextCell,convertPopover,bexioProjectListhappy + negative path),updateManifest.js(temp-dir), and a slow build smoke test (*.slow.test.ts).unpacked/into Chromium and asserts themonitoring/editcontent script injects#SoulcodeExtensionTemplates, themonitoring/listcontent script injects#PopoverTextSwitchernext to.globalsearch, and the side-panel React app mounts.docs/architecture/{storage,form-layer,tooltip-replacement,build-and-release,testing}.md, an "Architecture deep-dives" section inCLAUDE.md, and TSDoc comments on the non-obvious source functions.Known issues pinned (NOT fixed in this PR — follow-up specs)
chromeStorage.update/chromeStorage.removearray-only quirks (unknown-id update setsarr[-1]; non-array →[]).Build.ps1swallows sub-build errors incatchblocks (a "successful" run can leaveunpacked/stale).triggerCheckboxnever dispatches achangeevent.waitFor*helpers (ortriggerContactField) have a timeout — they poll forever (10k-iteration safety guard).trimAll(null)throwsTypeError.pressEnteris constructed withkeyCode: 13butkey: "".deleteImportDatais a no-op (ImportDataisstring[], not objects with.id).renderHtml()crashes silently when.globalsearchis absent — pinned as both a success-path and a negative test.kb_invoicemodal-table selector is order-dependent — currently works becausegetElementsByClassName("list block")is order-independent, but a refactor to a CSS selector.list.blockwould silently break it.Verification
npm test→ 23 files, 114 tests passed (incl. the slow build smoke test).npm run test:fast→ 22 files, 112 passed (excludes the slow build test).npm run test:e2e→ 3 passed, 0 skipped (Playwright runsheadless: falsebecause MV3 service workers don't surface headlessly in the installed Chromium — documented intesting.md; CI can wrap withxvfb).Test Plan / how to review
npm install && npm test→ 114 pass.npx playwright install chromium && npm run test:e2e→ 3 pass.docs/architecture/testing.mdfor the manual real-bexio walkthrough checklist.packages/chrome-extension/test/fixtures/bexio/*.htmlfor any leftover real names — should all be anonymised (Doe/Roe/Acme/Globex/Initech/Project Falcon placeholders).packages/shared/**orpackages/chrome-extension/src/**(only TSDoc):git diff main...HEAD -- packages/shared packages/chrome-extension/srcshould be comment-only.Out of scope (follow-up specs)
updateManifest.js,service_worker.js, and the implicit-anyspots inconvertPopover.ts/onMessage.ts.packages/sidePanel-import/src/utils/csvParser.tsandAutoMapTemplatesV3.ts.@swc/coredep if confirmed unused.