Skip to content

refactor(e2e): 解耦 E2E 测试到 commands 层与共享 e2e 包#92

Closed
hopelynd wants to merge 4 commits into
mainfrom
feat/migrate-e2e
Closed

refactor(e2e): 解耦 E2E 测试到 commands 层与共享 e2e 包#92
hopelynd wants to merge 4 commits into
mainfrom
feat/migrate-e2e

Conversation

@hopelynd

Copy link
Copy Markdown
Collaborator

Summary

  • 新增 packages/e2e 共享基建(gating / runner / output / globalSetup),各包通过 workspace 依赖复用,不发布到 npm。
  • 将原 packages/cli/tests/e2e 下 ~30 个 topic 用例迁入 packages/commands/tests/e2e,通过自维护 harness(binName: "bl")执行;kscli knowledge live 合并为 knowledge chat/search 路径。
  • cli / kscli 仅保留 registry smoke;proxy.e2e 与 console 跨域 flag 拒绝迁入 packages/runtime/tests
  • 增加 e2e-command-map 契约测试与 tools/compare-e2e-command-map.ts advisory 脚本,更新 cli-e2e-tests.md / command-add-remove.md

Test plan

  • vp check 通过
  • vp test packages/commands/tests/e2e/ — 32 files, 298 passed
  • vp test packages/cli/tests/e2e/registry.smoke.e2e.test.ts — 100 passed
  • vp test packages/kscli/tests/e2e/registry.smoke.e2e.test.ts — 7 passed
  • vp test packages/runtime/tests/proxy.e2e.test.ts packages/runtime/tests/console-flags.e2e.test.ts — 7 passed
  • vp test packages/commands/tests/e2e/harness/e2e-command-map.contract.test.ts — 4 passed
  • node tools/compare-e2e-command-map.ts — cli map 与 harness map aligned

hopelynd added 4 commits July 10, 2026 11:46
- Added e2e package as a workspace dependency in pnpm-lock.yaml.
- Updated globalSetup path in vite.config.ts to point to the new e2e package location.
- Enhanced documentation for CLI E2E testing, including architecture layers and triggering conditions.
- Refactored test paths and commands in the documentation to align with the new structure.
- Removed outdated dataset and auth E2E tests to streamline the test suite.
- Updated command references and validation checks in the documentation to reflect recent changes.
Runtime pack build was pulling in e2e test imports and tsgo emitted
helpers.d.ts beside commands/tests; restrict runtime tsconfig to src and
ignore tests/**/*.d.ts in fmt/gitignore as a safety net.
Runtime tsconfig already limits pack to src, so tests/**/*.d.ts is never
emitted during build; the fmt ignore and gitignore entries are unnecessary.
@hopelynd hopelynd closed this Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant