mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-08 07:18:47 +00:00
feat: prompt sensitive view in entry details
This commit is contained in:
@@ -1809,6 +1809,10 @@ class PasswordManager:
|
||||
)
|
||||
|
||||
self.display_entry_details(index)
|
||||
|
||||
if confirm_action("Show sensitive information? (y/N): "):
|
||||
self.display_sensitive_entry_info(entry, index)
|
||||
|
||||
pause()
|
||||
self._entry_actions_menu(index, entry)
|
||||
except Exception as e:
|
||||
|
@@ -129,6 +129,9 @@ def test_show_entry_details_by_index(monkeypatch):
|
||||
lambda *a, **k: call_order.append("actions"),
|
||||
)
|
||||
monkeypatch.setattr("password_manager.manager.pause", lambda *a, **k: None)
|
||||
monkeypatch.setattr(
|
||||
"password_manager.manager.confirm_action", lambda *a, **k: False
|
||||
)
|
||||
|
||||
pm.show_entry_details_by_index(index)
|
||||
|
||||
@@ -161,6 +164,9 @@ def _detail_common(monkeypatch, pm):
|
||||
lambda *a, **k: None,
|
||||
)
|
||||
monkeypatch.setattr("password_manager.manager.pause", lambda *a, **k: None)
|
||||
monkeypatch.setattr(
|
||||
"password_manager.manager.confirm_action", lambda *a, **k: False
|
||||
)
|
||||
called = []
|
||||
monkeypatch.setattr(pm, "_entry_actions_menu", lambda *a, **k: called.append(True))
|
||||
return called
|
||||
|
Reference in New Issue
Block a user