diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-10-17 23:14:46 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-10-17 23:14:46 +0200 |
| commit | e412581e04a2c9b33f5cdc019b44bc7cd2158180 (patch) | |
| tree | 70e01405ae5920a4b87276fde2fe04176b08c9dd /packages/meshbay-hub/tests/test_app_settings_plugin.py | |
| parent | 84946b1fef64ee619f1c161d57ef4afdc533eae2 (diff) | |
| download | meshbay-e412581e04a2c9b33f5cdc019b44bc7cd2158180.tar.gz | |
feat(spa): purging the chat asks first
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/tests/test_app_settings_plugin.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_app_settings_plugin.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/meshbay-hub/tests/test_app_settings_plugin.py b/packages/meshbay-hub/tests/test_app_settings_plugin.py index d469d8a4..3d11c9ef 100644 --- a/packages/meshbay-hub/tests/test_app_settings_plugin.py +++ b/packages/meshbay-hub/tests/test_app_settings_plugin.py @@ -174,6 +174,18 @@ def test_a_read_only_root_cannot_be_chosen_as_a_destination(): "Chat's directory picker does not require a writable root") +def test_purging_the_chat_asks_first(): + """ + A purge deletes every message for every member and cannot be undone: the + button asks before sending the operation, never after. + """ + chat = (STATIC / "chat-app-settings.js").read_text(encoding="utf-8") + asked = chat.index("ask(t('settings_app.chat_purge_confirm'))") + sent = chat.index("transport.purgeChat(signFn)") + assert asked < sent, "the purge is sent before the confirmation" + assert "if (!(await ask(t('settings_app.chat_purge_confirm')))) return;" in chat + + def test_the_picker_can_clear_a_selection(): """ Confirming with nothing chosen is how an app's directories are unset, and |