What a generated form test proves
A generated invitation form can look right and still send the wrong role. A select has to agree with the field description, the schema, the UI library and the submit handler. Each layer accepts a different representation of the same choice.
For example, an agent asks the MCP for a select with options: ["owner", "member"]. Those strings become a Zod enum. AutoForm needs an array of objects with separate label and value properties. A custom React form needs an option element for each choice. The application expects the string "member" when the user selects Member. A snapshot can record all those lines while missing a broken interaction.
Follow one choice through the form
| Question | A check that answers it |
|---|---|
| Does this description produce stable, reviewable code? | Generate the same description again and compare outputs. Review a representative snapshot when the template changes. |
| Can the application import and use that code? | Run TypeScript with the installed package declarations, React types and the application's Zod version. Include the generated component in the compilation. |
| Do the portable and runtime schemas agree on these examples? | Feed the same allowed and disallowed roles to the MCP sample checker and the exported Zod schema. Assert both results. |
| Can a person find the control and understand the failure? | Render the form, query by accessible name, submit invalid input, and check the field's error association. |
| Does the application receive the selected role? | Choose the second option and assert that the application's submit callback receives "member" exactly once. |
| Can an agent use the distributed server? | Install its local tarball in an isolated project, launch the bin over stdio and run a generation and repair sequence. |
For a transforming schema, make the output observably different. A quantity edited as "03" should remain a string in the field and reach the callback as 3. A test that checks only the screen, only the type declaration, or only that the callback fired would miss part of this contract.
Repeat the checks in this checkout
pnpm --filter el-form-mcp test
pnpm test:consumer
pnpm test:mcp-consumer
The first command exercises generated code and protocol behavior. The second compiles and runs a consumer of the locally packed React libraries across the pinned Zod versions. The third checks the installed MCP executable and its production dependencies. The agent walkthrough shows a consumer-level interaction test you can adapt to your own form.
To save a test with a generated form, set includeTest: true on el_form_scaffold_form. The returned verification includes the component and test filenames, a valid sample and the runnable test source. The test checks the actual submit callback in jsdom. Add your application assertion if you change the schema, controls or save behavior.
What remains application-specific
A passing form test covers the fields, inputs, package versions and environment it actually exercised. Add an application test for your own permissions, server responses, custom input components and failure messages. Test a real browser when native validity, focus order or keyboard interaction matters. Keep the field descriptions and failing samples so a regression can be replayed.
These checks can establish a first-attempt result for a particular generated form. Comparing libraries or agents would require running the same tasks, versions, starting information and success criteria across them.