diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-10 09:58:31 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-11 09:58:59 -0300 |
| commit | eb11ab331b4e13e2b9e5a673a4c012d22fdd1d9c (patch) | |
| tree | cc993ad239451adb6f23645ee5ca001802832ed0 /test/macos-snapshots/rotate.snap | |
| parent | 38e9919a9ea9055538409b388d580c4e4c838434 (diff) | |
| download | pardes-eb11ab331b4e13e2b9e5a673a4c012d22fdd1d9c.tar.gz pardes-eb11ab331b4e13e2b9e5a673a4c012d22fdd1d9c.zip | |
macos: the AppKit shell, its icon, and the offscreen e2e harness
Diffstat (limited to 'test/macos-snapshots/rotate.snap')
| -rw-r--r-- | test/macos-snapshots/rotate.snap | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/test/macos-snapshots/rotate.snap b/test/macos-snapshots/rotate.snap new file mode 100644 index 00000000..17b239f4 --- /dev/null +++ b/test/macos-snapshots/rotate.snap @@ -0,0 +1,63 @@ +# pardes_rotate spends a two-finger twist as the search-step keys. +# +# AppKit reports rotation counterclockwise-positive and the core reads clockwise +# as `n`, so a NEGATIVE delta is the FORWARD step. That inversion is exactly the +# kind of thing a unit test on the accumulator cannot catch and a golden can: +# what the screen does is the assertion. +# +# One notch is 20 degrees (rotation_notch_degrees in src/macos.zig) and the +# remainder is banked, which makes the pair below exact rather than approximate: +# -25 spends one notch and banks -5, then +25 lands on 20 and spends one back. +start 30 100 +wait 8000 New Newcol +wait 8000 $ +stable 700 20000 +text printf 'x MA''RK a\nzz\nx MA''RK b\nzz\nx MA''RK c\n' +key enter +wait 10000 MARK c +stable 700 10000 +key c-b +stable 600 8000 +# `/` types the pattern into the tag; Enter searches the pane's scrollback and +# writes the three hits into a +Search buffer, which is what n/N walk. +text / +stable 400 5000 +text MARK +stable 400 5000 +key enter +wait 10000 @p0: +stable 700 15000 +snap results +# A gesture beginning re-zeros the dial, so travel left over from an earlier +# twist cannot make the first degree of this one jump a match. +rotate 0 +# Clockwise: one notch of `n`, forward onto the first hit and selecting it. +rotate -25 +stable 700 15000 +snap forward +# ...and again, onto the second. Two steps out rather than one, because the +# first hit is where the list already starts: stepping BACK from it has nowhere +# to go, and a golden that cannot move is a golden that proves nothing about +# which way the dial turns. +rotate -25 +stable 700 15000 +snap forward2 +# A new gesture, because the dial banks its remainder exactly like the scroll +# accumulator does: two 25-degree notches leave -10 behind, so reversing INSIDE +# the same twist would have to spend that first and 25 back would move nothing. +# That hysteresis is wanted — it is what stops a thumb resettling on a notch +# boundary from flip-flopping between two matches — and lifting the fingers is +# how a hand clears it. +rotate 0 +# Counterclockwise: `N`. This must land back exactly on `forward`. +rotate 25 +stable 700 15000 +snap back +# And the other half of the contract: a twist IS the keystroke, so typing the +# key the dial claims to send must go the same way the dial went. `n` here must +# reproduce `forward2` — if the dial were sending something else, or the sign +# were inverted, these two would part company. +text n +stable 700 15000 +snap forward_by_key +draw rotate |
