aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/companion/test_mood.js
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-24 12:08:49 +0200
committerDanilo M. <danix@danix.xyz>2026-10-24 12:08:49 +0200
commitadb81f6d21b8152114b62acbfc6fa78c9ecec29f (patch)
tree649ca1736f3768b44efcfec4adb0a154e94bd7f5 /desktop/companion/test_mood.js
parentef75bb03861b4cab59038846fcff7f6137c639b2 (diff)
downloadquickshell-adb81f6d21b8152114b62acbfc6fa78c9ecec29f.tar.gz
quickshell-adb81f6d21b8152114b62acbfc6fa78c9ecec29f.zip
companion: seatFrame, the sitting version of a frame
Pure, so the seat's frame choice is tested with the rest of Mood rather than by eye. Frames without a sitting version fall to the plain sit: a standing frame on the card's edge would float above it. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/companion/test_mood.js')
-rw-r--r--desktop/companion/test_mood.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/desktop/companion/test_mood.js b/desktop/companion/test_mood.js
index 3439f7c..3dd3dba 100644
--- a/desktop/companion/test_mood.js
+++ b/desktop/companion/test_mood.js
@@ -19,7 +19,7 @@ const assert = require("assert");
const src = fs.readFileSync(__dirname + "/Mood.js", "utf8")
.replace(/^\.pragma library$/m, "");
const M = new Function(src +
- "\nreturn { T, click, clickFrame, pick, outfit, mockAllowed, canSpeak, monologue, admireAllowed };")();
+ "\nreturn { T, click, clickFrame, pick, outfit, mockAllowed, canSpeak, monologue, admireAllowed, seatFrame };")();
const lsrc = fs.readFileSync(__dirname + "/ListFile.js", "utf8")
.replace(/^\.pragma library$/m, "");
const L = new Function(lsrc + "\nreturn { parse, toggle, outputs };")();
@@ -175,4 +175,17 @@ assert.deepStrictEqual(L.outputs("# x\nOUTPUT_H=DP-1\nOUTPUT_V=DP-3\nDEFAULT_H=~
{ "DP-1": "H", "DP-3": "V" });
assert.deepStrictEqual(L.outputs(""), {});
+// Seated on the assistant's card: each standing frame to its sitting one,
+// the goodbye's sway to the one wave, and anything else to the plain sit.
+assert.strictEqual(M.seatFrame("watch"), "sit-read");
+assert.strictEqual(M.seatFrame("point"), "sit-point");
+assert.strictEqual(M.seatFrame("smirk"), "sit-smirk");
+assert.strictEqual(M.seatFrame("think"), "sit-think");
+assert.strictEqual(M.seatFrame("listen"), "sit-listen");
+assert.strictEqual(M.seatFrame("wave"), "sit-wave");
+assert.strictEqual(M.seatFrame("wave-l"), "sit-wave");
+assert.strictEqual(M.seatFrame("wave-r"), "sit-wave");
+assert.strictEqual(M.seatFrame("dj-scratch"), "sit");
+assert.strictEqual(M.seatFrame("base"), "sit");
+
console.log("ok");