e0a5f57793
Vendor the rebranded BoosAPI Desktop client (Tauri + Vue) into metapi as a monorepo subdirectory under desktop/. Source only — node_modules, dist, Cargo target and the upstream .git history are excluded. desktop/ keeps its own independent Cargo workspace (desktop/src-tauri with crates/*); it is not part of the backend boosapi crate, so a `cargo check` at the metapi root still compiles only the backend. Build the desktop app from desktop/src-tauri per desktop/README.md. Note: app icons are still placeholder assets pending the final BoosAPI logo. The updater signing keys live outside the repo and are not included.
2.4 KiB
2.4 KiB
E2E Testing Report
中文版请查看 E2E 测试报告(中文)。
This document summarizes the end-to-end markdown parsing tests added to this repository.
Purpose
Provide a small, reproducible E2E test harness that validates the parser and renderer handle common markdown constructs and to serve as a base for future coverage expansion.
What was added
-
test/fixtures/— directory with representative markdown fixtures:headings.mdcode-diff.mdtable.mdadmonition.mdmath.mdfootnotes.mdimage-link.mdcheckbox.mdmermaid.md
-
test/e2e.markdown.test.ts— a Vitest test that:- reads each fixture
- parses it via
parseMarkdownToStructure(usinggetMarkdowninstance) - serializes a minimal stable structure and asserts a snapshot per fixture
- includes a small
renderMarkdownassertion for inline math/code block rendering
-
Snapshots — generated by Vitest (placed in the default snapshot location).
-
.github/workflows/ci.yml— GitHub Actions workflow that runs onpushandpull_requestto:- install dependencies
- run
pnpm test - run
pnpm typecheck - run
pnpm lint
How to run locally
Run tests (and update snapshots if you intentionally changed output):
pnpm test -- -u
Run tests without updating snapshots:
pnpm test
Typecheck and lint:
pnpm typecheck
pnpm lint
Quality gates (local validation)
- Tests: PASS (73 passed locally)
- Typecheck: PASS
- Lint: PASS
Recommendations / Next steps
- Convert snapshots to include more detailed fields in
minimalserialization (for example, includechildrentext snippets or nodemeta), to catch regressions in node payloads. - Add fixtures for edge cases:
- Unclosed fences
- Complex nested lists with markup inside
- Escaped bracket edge-cases
- Streaming fence edgecases
- Add integration tests for rendering plugins that require DOM or workers (Mermaid, KaTeX worker, Monaco). Consider adding a browser-based test job (Playwright) for those.
- Configure CI to run snapshots or a visual regression step if the renderer's HTML output becomes more important.
If you want, I can:
- Expand snapshots to include richer metadata (children snippets, meta fields).
- Add the proposed edge-case fixtures and assertions.
- Draft a Playwright-based CI job for DOM-heavy plugins.
Let me know which option you’d prefer next。