Skip to content

T1: Test foundation — pytest suite with fake sinks #7

Description

@jonocodes

Parent

#6

What to build

Promote scripts/smoke.py into a proper pytest-asyncio test suite under tests/. The suite tests the daemon's observable behaviour at the WebSocket boundary — a fake WS client connects, sends messages, and asserts daemon responses and side effects via fake sinks.

Add FakePointerSink (records emitted pointer/key events), extend the existing FakeScrollSink, and add FakeFocusBackend (an async iterator that tests drive by pushing AppInfo values). All subsequent tickets add their assertions here.

Acceptance criteria

  • tests/ directory exists with pytest-asyncio configured
  • Existing smoke coverage (server startup, layout push on connect, button press → shell dispatch, jog → scroll, page navigation, layout reload) passes as pytest tests
  • FakePointerSink, FakeScrollSink, and FakeFocusBackend are importable test fixtures
  • just test (or equivalent) runs the suite and exits green

Blocked by

None — can start immediately.

Activity

  1. jonocodes commented on Jul 16, 2026

    @jonocodes
    OwnerAuthor

    Implemented in 8eb3d36. 8 pytest-asyncio tests at the WS boundary, FakeScrollSink/FakePointerSink/FakeFocusBackend fixtures, just test recipe.

  2. added a commit that references this issue on Jul 16, 2026
    8eb3d36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    milestoneMilestone work item (post-spike)ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions