mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-10-27 16:02:05 +00:00
Added docs/TEST_INVENTORY.md as a central index for all tests and runners. Created scripts/interactive_agent_tui_test.py for password-free TUI v2 exploratory testing. Integrated standalone permission tests into main suite and fixed TUI v2 parity regression tests broken by auto-selection removal. Updated AGENTS.md and CLAUDE.md with strategic plan references.
2.0 KiB
2.0 KiB
Interactive Agent TUI Testing Protocol
This document defines how AI agents should perform exploratory and regression testing on the SeedPass TUI v2 using the scripts/interactive_agent_tui_test.py harness.
1. Overview
The testing harness uses Dependency Injection to replace the real SeedPass service layer with a MockService. This allows agents to:
- Bypass Encryption: Test the UI without knowing passwords or seeds.
- Avoid Side Effects: No changes are made to the real vault or filesystem.
- Simulate Edge Cases: Mock specific failures (e.g., sync errors) to see how the UI recovers.
2. How to Run
Execute the harness using the project's virtual environment:
.venv/bin/python scripts/interactive_agent_tui_test.py
3. How to Extend
To add a new test case:
- Update the Mock: If testing a new service method, add it to
AgentMockService. - Add a Step: In
run_full_walkthrough, useapp._run_palette_command("your-command")or direct action calls (e.g.,app.action_toggle_archive()). - Verify State: Use
pilot.pause()to let the TUI update, then query widgets:status = str(app.query_one("#status").render()) assert "Expected" in status
4. Key Testing Areas
- Palette Commands: Ensure
_run_palette_commandcorrectly routes inputs to services. - Selection Persistence: Verify that the "Selected Entry" remains correct after archiving or refreshing.
- Layout Adaptability: Test compact vs. comfortable density.
- Reactive UI: Verify that
_load_entriesis called automatically after mutations.
5. Agent Instructions for Future Runs
If you are an agent tasked with "looking for bugs":
- Run the script: Confirm the baseline walkthrough passes.
- Introduce Chaos: Modify the mock to throw exceptions randomly.
- Check Transitions: Rapidly switch between entries and layouts.
- Document Failures: If a widget isn't found or a status message is wrong, report the line number in
app.py.