From d985321ca4ab15fcbf6da1b42d28594499271fed Mon Sep 17 00:00:00 2001 From: Brian Love Date: Mon, 18 May 2026 16:50:22 -0700 Subject: [PATCH] test(examples-chat): add aimock fixture for contact-form welcome chip `lifecycle.spec.ts:61` ('selecting a welcome suggestion submits and clears welcome state') clicks the 'Demo: render a contact form' welcome chip, which sends the full chip value as the LLM prompt: 'Show me a contact form with fields for name, email address, subject, and a multi-line message, plus a Send button.' No fixture matched this prompt, so the test's fire-and-forget click left 4 'No fixture matched' / 'Background run failed' tracebacks in the langgraph backend log every CI run since the chip was added. The test itself passed because it didn't await the assistant response. Add a fixture matching the substring 'contact form' (aimock's userMessage match is includes-based) that returns a render_a2ui_surface tool call building the contact form spec the prompt asked for. Verified locally: lifecycle:61 now logs 'Background run succeeded' instead of the 404 cascade. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../angular/e2e/fixtures/contact-form.json | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 examples/chat/angular/e2e/fixtures/contact-form.json diff --git a/examples/chat/angular/e2e/fixtures/contact-form.json b/examples/chat/angular/e2e/fixtures/contact-form.json new file mode 100644 index 00000000..358da693 --- /dev/null +++ b/examples/chat/angular/e2e/fixtures/contact-form.json @@ -0,0 +1,119 @@ +{ + "fixtures": [ + { + "match": { + "userMessage": "contact form" + }, + "response": { + "toolCalls": [ + { + "name": "render_a2ui_surface", + "arguments": { + "envelopes": [ + { + "surfaceUpdate": { + "surfaceId": "contact-form", + "components": [ + { + "id": "root", + "component": { + "Column": { + "children": { + "explicitList": [ + "form-title", + "name-field", + "email-field", + "subject-field", + "message-field", + "send-button" + ] + }, + "alignment": "start" + } + } + }, + { + "id": "form-title", + "component": { + "Text": { + "text": { "literalString": "Contact Us" }, + "usageHint": "h1" + } + } + }, + { + "id": "name-field", + "component": { + "TextField": { + "label": { "literalString": "Name" }, + "text": { "literalString": "" }, + "textFieldType": "shortText" + } + } + }, + { + "id": "email-field", + "component": { + "TextField": { + "label": { "literalString": "Email address" }, + "text": { "literalString": "" }, + "textFieldType": "shortText" + } + } + }, + { + "id": "subject-field", + "component": { + "TextField": { + "label": { "literalString": "Subject" }, + "text": { "literalString": "" }, + "textFieldType": "shortText" + } + } + }, + { + "id": "message-field", + "component": { + "TextField": { + "label": { "literalString": "Message" }, + "text": { "literalString": "" }, + "textFieldType": "longText" + } + } + }, + { + "id": "send-button", + "component": { + "Button": { + "child": "send-text", + "action": { + "name": "submit_contact" + } + } + } + }, + { + "id": "send-text", + "component": { + "Text": { + "text": { "literalString": "Send" } + } + } + } + ] + } + }, + { + "beginRendering": { + "surfaceId": "contact-form", + "root": "root" + } + } + ] + } + } + ] + } + } + ] +}