test(e2e): standardize source plugin E2E ownership#5
Merged
Conversation
- Align host and plugin TC regex on TC{NNNN}-{name}.ts in execution-governance and playwright testMatch
- Split listPluginE2EFiles from listPluginTcFiles so validator rejects misplaced files under plugin e2e dirs
- Simplify run-suite plugin scope hint with explicit isPluginScope check
- Document testDir repo-root rationale and label apps/lina-plugins workspace package
- Add plugin-demo-source TC0221 smoke to close the source-plugin E2E discovery loop
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
gqcn
requested changes
May 11, 2026
Address PR #5 review feedback by replacing specific host paths with the generalized "宿主的 e2e 测试脚本目录下" phrasing for source plugin E2E ownership rules. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
gqcn
approved these changes
May 11, 2026
5 tasks
gqcn
pushed a commit
that referenced
this pull request
May 11, 2026
## Summary
- Moves the framework's built-in source-plugin E2E tests
(`content-notice`, `monitor-{loginlog,online,operlog,server}`,
`org-center`) into each plugin's own `hack/tests/{e2e,pages,support}`
directory, completing the source-plugin E2E ownership standard
introduced in #5.
- Introduces `@host-tests/*` and `xlsx` path aliases in
`hack/tests/tsconfig.json` and wires Playwright via the new top-level
`tsconfig` option so plugin-owned tests reference host
fixtures/pages/support through stable aliases instead of 6–7 level
relative paths.
- Updates `hack/tests/config/execution-manifest.json` module scopes,
legacy directory map, and `serialIsolation` for the new plugin-owned
locations; tightens the `e2e/content` reason text to match what remains
under the host tree.
- Updates host i18n regressions `TC0108` / `TC0110` to import
`NoticePage` / `DeptPage` / `PostPage` from the new plugin locations.
- Ticks `FB-3` in `openspec/changes/multi-tenant/tasks.md`.
## Verification
- `pnpm exec tsc --noEmit` (from `hack/tests`)
- `node hack/tests/scripts/validate-e2e.mjs` — 165 files / 30 scopes
- `openspec validate multi-tenant --strict`
- `pnpm test` full suite — **471 pass / 12 skipped / 1 pre-existing
TC-67k 60s timeout**; all 108 plugin-owned tests resolved the
`@host-tests/*` aliases at runtime.
## Test plan
- [x] Type check
- [x] E2E validator
- [x] OpenSpec validator
- [x] Full Playwright suite (parallel + serial)
- [x] Retry of previously-failing TCs confirms 6/7 were environment /
pre-existing flakes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Standardize source plugin-owned E2E tests under each plugin's own
hack/teststree and update the shared E2E runner/governance rules accordingly.Changes
apps/lina-plugins/<plugin-id>/hack/tests/e2e/hack/tests/pages/andhack/tests/support/AGENTS.mdguidance to match the new layoutplugin-demo-sourcesmoke coverage to verify plugin test discoveryVerification
pnpm -C hack/tests exec node scripts/validate-e2e.mjsopenspec validate multi-tenant --strict<plugin-id>/e2e,e2e-pages, ande2e-supportstandard references