You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(showcase/langgraph-python): rewrite open-gen-ui and open-gen-ui-advanced to iframe-presence assertions
Drop the 5 cross-origin contentFrame() / page.on('console', ...) skipped
assertions across the two specs — sandbox=allow-scripts only blocks host
introspection of the iframe DOM, and console-spying on the host page
catches no inner-iframe logs. Replace with iframe-presence assertions:
each pill click must produce iframe[sandbox*='allow-scripts'] with a
non-empty srcdoc (or src) attribute. That is the load-bearing signal
that the open-generative-ui pipeline mounted SOMETHING.
Rewrite each suggestion message string as a short verbatim label that
doubles as a deterministic aimock fixture key (paired with the new
fixtures in showcase/aimock/d5-all.json). Drop pill-title parentheticals
per the cosmetic note in lgp-test-genuine-pass.md so titles read as
natural human prompts; keep the message field aligned with the fixture
key.
Final test counts: 5 minimal (page-load + 4 pill-iframe), 4 advanced
(page-load + 3 pill-iframe). All .skip() removed. The sandbox-function
round-trip (evaluateExpression / notifyHost) is intentionally not
asserted here — that requires a same-origin sandbox option or a
host-side spy on the runtime's sandbox-function-call event, both
deferred to a follow-up.
// Suggestion `message` strings double as deterministic aimock fixture keys.
4
+
// Keep them short, distinctive, and aligned with the fixture entries in
5
+
// `showcase/aimock/d5-all.json` so each pill click produces a stable
6
+
// `generateSandboxedUi` tool call (rather than getting absorbed by a
7
+
// generic catch-all fixture). Titles below the message use the same
8
+
// short label so the pill copy reads as a natural human prompt.
3
9
constminimalSuggestions=[
4
10
{
5
-
title: "3D axis visualization (model airplane)",
6
-
message:
7
-
"Visualize pitch, yaw, and roll using a 3D model airplane. Render a simple airplane silhouette (SVG or CSS-3D) at the origin, with three labelled axes (X=pitch, Y=yaw, Z=roll). Animate the airplane cycling through each rotation in turn — rotate about X, pause, rotate about Y, pause, rotate about Z, pause — with a legend showing which axis is active. Label each axis and add a short caption explaining each degree of freedom.",
'Animate how a simple feed-forward neural network processes an input. Show 3 layers (input 4 nodes, hidden 5 nodes, output 2 nodes) with connections whose thickness encodes weight magnitude. Animate activations pulsing forward from input -> hidden -> output in a loop, brightening each node as it fires. Label each layer and add a short caption ("Forward pass"). Use indigo for active signal, slate for quiescent.',
16
+
message: "How a neural network works",
13
17
},
14
18
{
15
19
title: "Quicksort visualization",
16
-
message:
17
-
'Visualize quicksort on an array of ~10 bars of varying heights. At each step highlight the pivot in amber, elements being compared in indigo, and swapped elements in emerald; fade sorted elements to slate. Auto-advance through the sort in a loop (~600ms per step) with a caption showing the current operation ("Partition around pivot = 47", "Swap", "Recurse left"). Show the array as SVG rects so heights read cleanly.',
20
+
message: "Quicksort visualization",
18
21
},
19
22
{
20
23
title: "Fourier: square wave from sines",
21
-
message:
22
-
'Visualize how a square wave is built from the sum of odd-harmonic sine waves. Show 3 rotating circles on the left (epicycles at frequencies 1, 3, 5 with amplitudes 1, 1/3, 1/5), the running sum traced as a point, and the resulting waveform scrolling to the right over time. Label each harmonic with its frequency and amplitude; add a legend and a title "Fourier series: square wave". Loop continuously.',
0 commit comments