summaryrefslogtreecommitdiff
path: root/test/snapshots/headersweep.snap
diff options
context:
space:
mode:
Diffstat (limited to 'test/snapshots/headersweep.snap')
-rw-r--r--test/snapshots/headersweep.snap67
1 files changed, 67 insertions, 0 deletions
diff --git a/test/snapshots/headersweep.snap b/test/snapshots/headersweep.snap
new file mode 100644
index 00000000..be070357
--- /dev/null
+++ b/test/snapshots/headersweep.snap
@@ -0,0 +1,67 @@
+# A middle sweep over a column's tag or the workspace's runs what it swept,
+# as it does over a pane's tag: highlighted while the button is held, run
+# when it comes up. Both headers used to run the word under the PRESS, on
+# the press, so a sweep of `echo SWEPT-COL` ran a bare `echo`. A right sweep
+# looks for what it swept the same way, and the other button cancels.
+file hay.txt ZQNEEDLE
+start 21 120 -n 3
+wait 8000 Newcol
+stable 700 20000
+# the column tag: type a command onto it, then sweep the whole command
+press left 50 2
+release left 50 2
+key space
+text echo SW''EPT-COL
+key esc
+settle 100
+press middle @echo 2
+drag middle @echo+8 2
+stable 300 5000
+snapstyle col-sweeping
+drag middle @echo+16 2
+release middle @echo+16 2
+wait 8000 SWEPT-COL
+stable 700 15000
+snap col-swept
+# the workspace tag, the same
+press left 110 1
+release left 110 1
+key space
+text echo SW''EPT-WS
+key esc
+settle 100
+press middle @echo 1
+drag middle @echo+15 1
+release middle @echo+15 1
+wait 8000 SWEPT-WS
+stable 700 15000
+snap ws-swept
+# a right sweep over part of a word looks for the part: `hay.txt` opens,
+# where a click would look for all of `xxhay.txtxx`
+press left 118 1
+release left 118 1
+key space
+text xxhay.txtxx
+key esc
+settle 100
+press right @xxhay.txtxx+2 1
+drag right @xxhay.txtxx+9 1
+release right @xxhay.txtxx+9 1
+wait 8000 ZQNEEDLE
+stable 700 15000
+snap ws-looked
+# the look button tapped during a middle sweep cancels it: nothing runs
+press middle @echo 2
+drag middle @echo+16 2
+press right @echo+16 2
+release right @echo+16 2
+release middle @echo+16 2
+stable 700 15000
+snap cancelled
+# for comparison, a select sweep over the second column's tag selects, in
+# the tag's selection colours, and runs nothing
+press left @Find#2 2
+drag left @Grep#2+4 2
+release left @Grep#2+4 2
+stable 700 15000
+snapstyle selected