feat: aimock scaffold generator + helper consolidation (Task #15)#472
Merged
Conversation
Task #15 in the pre-batching cleanup arc. Single-cap throwaway generator (scripts/generate-aimock-scaffold.ts) reads the registry and emits e2e/ files + project.json edit + ci.yml matrix entry. Also consolidates the duplicate submit-and-wait helpers in libs/e2e-harness/ — migrate 3 cockpit cap specs to submitAndWaitForResponse and remove sendPromptAndWait. After this PR, Task #4 batching becomes mechanical. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7-task plan: migrate 3 specs, delete sendPromptAndWait from harness + barrel, create generator script, verify via c-messages generation + revert, commit/push/PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Ships scripts/generate-aimock-scaffold.ts — a single-cap throwaway generator that reads apps/cockpit/scripts/capability-registry.ts and emits a cap's e2e/ directory (5 files) plus the project.json e2e target plus a ci.yml matrix entry. Validates all preconditions before writing; refuses on any pre-existing target. Unblocks Task #4 batch. Consolidates the duplicate submit-and-wait helpers: - Migrate streaming.spec.ts, c-tool-calls.spec.ts, c-subagents.spec.ts from sendPromptAndWait → submitAndWaitForResponse (mechanical swap; semantically equivalent for composed-<chat> caps). - Remove sendPromptAndWait + SendPromptAndWaitOptions from libs/e2e-harness/src/{test-helpers,index}.ts. - Keep sendPromptAndWaitForInterrupt + clickInterruptActionAndWaitFinal (interrupt-flow specific; c-interrupts depends on them). - Update libs/e2e-harness/README.md to drop stale references. After this PR, batching the 7 chat caps in Task #4 is mechanical: run the generator per cap → hand-author fixture + spec assertions. Note: examples/chat/angular/e2e/test-helpers.ts has its own local sendPromptAndWait — left untouched (separate ownership boundary; follow-up task if consolidation desired). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced May 19, 2026
blove
added a commit
that referenced
this pull request
May 21, 2026
…egy (#499) The spec imported `SendPromptAndWaitOptions` which was removed in PR #472 (harness helper consolidation), leaving a tsc error in the lint target that has been silently failing the Library — lint gate. The chat-sidenav- scrim no-output-native noise (resolved by #485) was masking it; subsequent admin-merges let it through. Two-part fix: 1. Delete the spec. Its original purpose ("locks in the type contract") was already covered by tsc itself; the deleted type meant the spec was just verifying a removed API. 2. Document the testing strategy in a header block on test-helpers.ts so future contributors know the absence of unit tests is intentional: - The 3 Playwright-dependent helpers are exercised end-to-end by the 24 cockpit cap aimock e2es in the matrix. - `startAimock` (the only helper testable without a Page) has its own aimock-runner.spec.ts in the same directory. Identified during the post-Task-#4 e2e audit (item #8). 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
Wins
Files
Test plan
Follow-ups (out of scope)
🤖 Generated with Claude Code