aboutsummaryrefslogtreecommitdiff
path: root/tests/e2e.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/e2e.sh')
-rwxr-xr-xtests/e2e.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/e2e.sh b/tests/e2e.sh
index c4bcabb..670f84a 100755
--- a/tests/e2e.sh
+++ b/tests/e2e.sh
@@ -248,7 +248,11 @@ if [ -x "$MENUBAR" ]; then
hook "$A1" working; hook "$A1" idle
expect "A1 done" "opt $A1 @agent_state" done
expect "menu title" "mb --print | head -1" "title: ×1 ✓1"
- expect "menu rows: herdr priority, names as titles, harness when unnamed" \
+ expect "menu rows: herdr priority; idle most recent first (C1 since its jump in step 4, B1 since the start)" \
+ "mb --print | tail -n +2 | cut -f1,2 | tr '\t\n' '|;'" "× blocked|pi;✓ done|Deploy the widget;○ idle|pi;○ idle|Review PR 42;"
+ hook "$B1" working; hook "$B1" idle
+ expect "B1 finishes a turn while watched: idle" "opt $B1 @agent_state" idle
+ expect "and is now the most recent idle agent: listed first" \
"mb --print | tail -n +2 | cut -f1,2 | tr '\t\n' '|;'" "× blocked|pi;✓ done|Deploy the widget;○ idle|Review PR 42;○ idle|pi;"
expect "subtitle: location, harness, waiting time" "mb --print | grep 'Deploy the widget' | cut -f3" "a · wa1 · pi · done now"
expect "idle subtitle has no waiting time" "mb --print | grep 'Review PR 42' | cut -f3" "b · wb1 · pi"
@@ -302,9 +306,11 @@ if [ -x "$MENUBAR" ]; then
DINGGER_TMUX_SOCKET="$SOCK" "$DINGGER" focus --client "$CLIENT" --pane "$A2"
expect "A2 idle after the jump" "opt $A2 @agent_state" idle
expect "panel with nothing waiting" "mb --print-panel" "Nothing waiting · ○ 4 idle"
+ # Most recent first: A2 (just jumped to), A1 (clicked in step 11), B1 (finished
+ # in step 11, before that click), C1.
expect "full list: every agent, then the summary with the toggle" \
"mb --print-panel --full | cut -f1,2 | tr '\t\n' '|;'" \
- "○ idle|Deploy the widget;○ idle|pi;○ idle|Review PR 42;○ idle|pi;Nothing waiting · ○ 4 idle|[Show less ▴];"
+ "○ idle|pi;○ idle|Deploy the widget;○ idle|Review PR 42;○ idle|pi;Nothing waiting · ○ 4 idle|[Show less ▴];"
expect "compact in Always mode offers 'Show all'" "mb --print-panel --toggle" "Nothing waiting · ○ 4 idle [Show all ▾]"
hook "$A1" working; hook "$A1" idle
expect "A1 done" "opt $A1 @agent_state" done