- testcases/*.md: declarative test definitions (send, expect_response, expect_state, expect_actions, action) - runtime_test.py: standalone runner + pytest integration via conftest.py - /tests route: web UI showing last run results from results.json - /api/tests: serves results JSON - Two initial testcases: counter_state (UI actions) and pub_conversation (multi-turn, language switch, tool use, memorizer state) - pub_conversation: 19/20 passed on first run - Fix nm-text vertical overflow in node metrics bar Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
953 B
953 B
Counter State
Tests that Thinker can instruct UI to create stateful controls, and that UI handles local actions without round-tripping to Thinker.
Setup
- clear history
Steps
1. Create counter
- send: create a counter starting at 0 with increment and decrement buttons
- expect_response: contains "counter" or "count"
- expect_actions: length >= 2
- expect_actions: any action contains "increment" or "inc"
- expect_actions: any action contains "decrement" or "dec"
2. Check state
- expect_state: topic contains "counter" or "count" or "button"
3. Ask for current value
- send: what is the current count?
- expect_response: contains "0"
4. Increment
- action: increment
- expect_response: contains "1"
5. Increment again
- action: increment
- expect_response: contains "2"
6. Decrement
- action: decrement
- expect_response: contains "1"
7. Verify memorizer tracks it
- expect_state: topic contains "count"