Skip to content

test(e2e): standardize source plugin E2E ownership#5

Merged
gqcn merged 9 commits into
linaproai:mainfrom
wangle201210:feat/cms
May 11, 2026
Merged

test(e2e): standardize source plugin E2E ownership#5
gqcn merged 9 commits into
linaproai:mainfrom
wangle201210:feat/cms

Conversation

@wangle201210

@wangle201210 wangle201210 commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Standardize source plugin-owned E2E tests under each plugin's own hack/tests tree and update the shared E2E runner/governance rules accordingly.

Changes

  • Define source plugin E2E ownership as apps/lina-plugins/<plugin-id>/hack/tests/e2e/
  • Define plugin-owned POM and helpers as hack/tests/pages/ and hack/tests/support/
  • Update Lina E2E, feedback, review, and root AGENTS.md guidance to match the new layout
  • Update Playwright discovery, E2E validation, module scope handling, and TypeScript include paths for plugin-owned tests
  • Add plugin-demo-source smoke coverage to verify plugin test discovery
  • Restore the E2E PostgreSQL helper default password

Verification

  • pnpm -C hack/tests exec node scripts/validate-e2e.mjs
  • openspec validate multi-tenant --strict
  • Scanned for stale <plugin-id>/e2e, e2e-pages, and e2e-support standard references

wangle201210 and others added 7 commits May 10, 2026 14:45
- 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>
@wangle201210 wangle201210 reopened this May 11, 2026
@wangle201210 wangle201210 changed the title Feat/cms test(e2e): standardize source plugin E2E ownership May 11, 2026
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
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 gqcn merged commit 9d27419 into linaproai:main May 11, 2026
3 checks passed
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>
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.

2 participants