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/trackpad.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/trackpad.snap')
| -rw-r--r-- | test/macos-snapshots/trackpad.snap | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/test/macos-snapshots/trackpad.snap b/test/macos-snapshots/trackpad.snap new file mode 100644 index 00000000..05f46e1f --- /dev/null +++ b/test/macos-snapshots/trackpad.snap @@ -0,0 +1,91 @@ +# The trackpad features, asserted without a trackpad, plus the rest of the +# pointer vocabulary. +# +# Trackpad.button(fingers:) is pure policy with no NSEvent in it, so a script +# can name how many fingers were resting and get back the button a hand would +# have produced: two is acme's button 3 (Look), three or more is button 2 +# (Exec), and a deep press is button 2 by another route. pardes_take_haptic is +# the other half — it is how the pulse the core armed is read back on a machine +# with nothing to feel it with. +# +# Coordinates are 0-based cells, which is what pardes_mouse takes. The tty +# suite's press/release are 1-based SGR and so read one higher. +start 30 100 +wait 8000 New Newcol +wait 8000 $ +stable 700 20000 +# something to look at; split so the echoed command line is not the match +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 +# A raw pane hands clicks to the program on the other end. Normal mode is where +# the three buttons mean Select, Exec and Look. +key c-b +stable 600 8000 +snap ready +# THE ADAPTER ITSELF, before any of the decoded paths below. `nsclick` builds a +# real NSEvent and hands it to the view's own rightMouseDown, so this is the one +# command that exercises the code between AppKit and the entry points. It is +# here because an adapter that silently dropped every mouse event once passed +# this entire suite: everything else calls the entry points directly. +nsclick right 4 3 +wait 10000 @p0: +stable 700 15000 +haptic look +snap adapter +# Back to a clean slate for the finger-count cases below. +haptic none +# TWO FINGERS RESTING = button 3 = Look. MARK names no file, so looking at it +# searches, and the hits land in a +Search buffer split under the shell. +fingers 2 4 3 +wait 10000 @p0: +stable 700 15000 +haptic look +snap look +# ...and taking the pulse cleared it +haptic none +# The three press phases one at a time rather than through `click`, which is +# what proves press, drag and release are separate entry points and not a lump. +mouse left press 2 3 +mouse left drag 9 3 +mouse left release 9 3 +stable 700 10000 +snap dragged +# ponytail: `y` here would yank that selection into the core's register and +# fire set_clipboard, which is what the harness's `clipboard <text>` asserts. +# It is not scripted because the expected text has to be READ off this golden +# first — a guessed span would hand the next person a failing script instead of +# a capture. Add the two lines once `snap dragged` shows what got selected. +# A button-less hover: the core tracks it for the link and definition underline. +mouse none motion 4 5 +stable 400 5000 +snap hover +# A trackpad's precise scroll is fractional rows the core accumulates into whole +# wheel presses; a real mouse notch skips the smoothing and arrives as an +# ordinary button. Both spellings, so the two paths stay distinguishable. +scroll -3 4 5 +stable 700 10000 +snap scrolled +wheel wheeldown 4 5 +stable 700 10000 +snap notched +# THREE FINGERS = button 2 = Exec. `New` in the top tag is a builtin, so this +# spawns a pane rather than running something the machine would have to own. +fingers 3 1 0 +stable 700 20000 +haptic exec +snap exec +# A DEEP PRESS is the same button 2 by another route; `Newcol` proves it went +# somewhere different from the click above. +force 5 0 +stable 700 20000 +haptic exec +snap force +# One finger is still an ordinary left press, and selecting is not a verb the +# hand should feel. +fingers 1 4 3 +stable 700 10000 +haptic none +snap select +draw trackpad |
