Skip to content

Commit eb62102

Browse files
Staacksclaude
andcommitted
Add the graph-interaction row and its fixture
Nothing exercised the maximized graph's tools on either platform, which is how Android 1.2.1 shipped a crash in the pick handler. The new fixture is a straight line y = 2x + 1 with pick outputs, so that picking, the difference and slope read-out, the linear fit and pan/zoom all have exact expected values, plus a graph over empty containers that has to survive every gesture. The row is planned until iOS carries the tag; Android implements it (T0 geometry on Robolectric, T1 chrome on the emulator). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 61cb62d commit eb62102

3 files changed

Lines changed: 53 additions & 1 deletion

File tree

fixtures/views/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# View fixtures
22

33
The fixture set behind the view-element suites (test-matrix rows
4-
`view-snapshots`, `graph-snapshots`, `view-behavior`): one experiment per
4+
`view-snapshots`, `graph-snapshots`, `view-behavior`, `graph-interaction`): one experiment per
55
element family, every configuration worth a golden, all data fixed by
66
container `init` values — loading one of these renders a deterministic
77
screen with no sensors and no analysis.
@@ -12,6 +12,13 @@ screen with no sensors and no analysis.
1212
- `graphs-styles`, `graphs-axes`, `graphs-special` — the OpenGL-rendered
1313
graphs (row `graph-snapshots`, T1: emulator + PixelCopy on Android,
1414
GLKView.snapshot in the simulator on iOS).
15+
- `graphs-interaction` — behavior only, no goldens (row `graph-interaction`,
16+
T1): a straight line y = 2x + 1 with pick outputs, so that picking a
17+
point, dragging for the difference and slope, the linear fit and
18+
pan/zoom all have exact expected values, plus a graph over empty
19+
containers that has to survive every one of those gestures (the
20+
1.2.1 crash). The touch geometry itself runs at T0 on Android
21+
(GraphView is a plain canvas view; only the curve needs GL).
1522
- `init-vs-default` — behavior only, no goldens: every input control once
1623
over a container that already holds a value and once over an empty one.
1724
The spec says a default fills an EMPTY buffer and never overwrites one,
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<phyphox xmlns="http://phyphox.org/xml" version="1.20" locale="en">
2+
<title>fixture: graph interaction</title>
3+
<category>View fixtures</category>
4+
<description>The maximized graph's tools on fixed data: a straight line (y = 2x + 1) to pick, drag, pan, zoom and fit, with pick outputs so that a pick has a buffer effect, and a graph over empty containers, which has to survive every gesture.</description>
5+
<data-containers>
6+
<container size="9" init="0,1,2,3,4,5,6,7,8">x</container>
7+
<container size="9" init="1,3,5,7,9,11,13,15,17">y</container>
8+
<container size="100">nothing</container>
9+
<container size="1">picked_x</container>
10+
<container size="1">picked_y</container>
11+
</data-containers>
12+
<views>
13+
<view label="Interaction">
14+
<graph label="line" labelX="x" unitX="s" labelY="y" unitY="m" pickLabel="Pick">
15+
<input axis="x">x</input>
16+
<input axis="y">y</input>
17+
<output axis="x" label="Pick x">picked_x</output>
18+
<output axis="y" label="Pick y">picked_y</output>
19+
</graph>
20+
<graph label="empty" labelX="x" labelY="y">
21+
<input axis="x">nothing</input>
22+
<input axis="y">nothing</input>
23+
</graph>
24+
</view>
25+
</views>
26+
</phyphox>

test-matrix.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,25 @@ tests:
202202
Android: emulator + PixelCopy; iOS: GLKView snapshot in the
203203
simulator. Goldens live in the app repos.
204204
205+
- id: graph-interaction
206+
area: ui
207+
tier: T1
208+
platforms: [android, ios]
209+
status: planned
210+
description: >-
211+
The maximized graph's tools over fixtures/views/graphs-interaction.phyphox:
212+
maximizing and restoring a graph, picking a point (read-out values
213+
and the pick outputs written to their containers, asserted through
214+
the remote API), dragging for the difference and slope read-out,
215+
the linear fit (a = 2, b = 1 on the fixture's line), panning and the
216+
zoom reset - and every one of those gestures on a graph over empty
217+
containers, which crashed Android 1.2.1 (a null buffer in the pick
218+
handler). Android splits the row: the touch geometry (pick, drag,
219+
pan, pinch, empty buffers) runs at T0 on Robolectric against
220+
GraphView directly, the chrome around it (markers, read-outs, tools
221+
menu, outputs) on the emulator. Added 2026-09-12 after the 1.2.1
222+
crash review; iOS side pending (iOS-TODO.md).
223+
205224
- id: view-behavior
206225
area: ui
207226
tier: T1

0 commit comments

Comments
 (0)