mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-11-05 20:32:05 +00:00
tests: cover keyboard reveal/qr flow for managed accounts
This commit is contained in:
1 parent
0bbf271154
commit
44784a950a
2 files changed
+47
No files matched your search
@@ -562,3 +562,14 @@
|
||||
- `scripts/ai_tui_agent_test.py --scenario extended --verbose`: PASS.
|
||||
- Added release note document: `docs/beta_hardening_2026-03-02.md` with checklist commands, results, and residual operational warning about stale launcher binaries on PATH.
|
||||
- Practical note: Installer repeatedly warns about stale `/home/user/.local/bin/seedpass` entries; this does not fail install but can obscure which binary users are executing.
|
||||
|
||||
## 2026-03-02 Next parity slice: keyboard-path managed-account sensitive actions
|
||||
- Added explicit keyboard-path TUI v2 regression coverage for managed-account sensitive actions.
|
||||
- New test in `src/tests/test_tui_v2_textual_interactions.py`:
|
||||
- `test_tui2_textual_managed_account_keyboard_reveal_and_qr`
|
||||
- Validates pressing `v` triggers confirmation-required reveal messaging for managed-account entries.
|
||||
- Validates pressing `g` renders managed-account QR payload after list focus is set.
|
||||
- Note on test ergonomics:
|
||||
- Search input can capture keystrokes by default; test now focuses `#entry-list` before keybinding presses to exercise app-level binding path reliably.
|
||||
- Validation run:
|
||||
- `pytest -q src/tests/test_tui_v2_textual_interactions.py src/tests/test_tui_v2_action_matrix.py src/tests/test_tui_v2_helpers.py` -> `34 passed`.
|
||||
@@ -712,6 +712,42 @@ async def test_tui2_textual_reveal_and_qr_flow() -> None:
|
||||
assert "TOTP #3 QR" in _widget_text(app, "#secret-detail")
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_tui2_textual_managed_account_keyboard_reveal_and_qr() -> None:
|
||||
service = FakeEntryService(
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"kind": "managed_account",
|
||||
"label": "Acct 1",
|
||||
"seed_phrase": (
|
||||
"legal winner thank year wave sausage worth useful "
|
||||
"legal winner thank yellow"
|
||||
),
|
||||
}
|
||||
]
|
||||
)
|
||||
app = _build_app(service)
|
||||
|
||||
async with app.run_test() as pilot:
|
||||
await pilot.pause()
|
||||
app._run_palette_command("open 1")
|
||||
await pilot.pause()
|
||||
app.query_one("#entry-list", ListView).focus()
|
||||
await pilot.pause()
|
||||
|
||||
await pilot.press("v")
|
||||
await pilot.pause()
|
||||
assert "requires confirmation" in _status_text(app)
|
||||
assert "Run: reveal confirm" in _widget_text(app, "#secret-detail")
|
||||
|
||||
await pilot.press("g")
|
||||
await pilot.pause()
|
||||
qr_text = _widget_text(app, "#secret-detail")
|
||||
assert "Managed Account Seed #1 QR" in qr_text
|
||||
assert "Payload:" in qr_text
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_tui2_textual_filters_panel_tracks_selected_entry() -> None:
|
||||
service = FakeEntryService(
|
||||
|
||||
Reference in new issue
Block a user