mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-01 10:22:08 +00:00
- Notification settings show the last 20 notifications with the result of each send, the error when one failed and every daily digest run, also on days with nothing to send; the history is read without the flag the API never returned, and the page does not offer to erase it, as Audit & Report reads it. - The Ctrl menu of the three web terminals sends Ctrl+D, which ends a text pasted in the terminal, also from a phone or a tablet. - The repository check lists every Proxmox VE or Enterprise Ceph repository whose suite does not match the installed version, with its channel and file, and says where to disable it; repository addresses are never shown. - Adding an NVIDIA GPU to a VM writes its VFIO udev rule again when it is missing or was edited, and the pre-check counts a missing rule as a pending host change. - New texts in English and Spanish, modelled in the translation steady-state test, and the notifications docs page describes the history section. - Corrected the automatic translations of the new LXC update and power control texts, and the start, shutdown, reboot and stop buttons of VMs and LXCs in German, French, Portuguese and Swedish. - Tests for the history panel, the terminal Ctrl+D, the repository message and the VFIO rule.
32 lines
1.2 KiB
Python
32 lines
1.2 KiB
Python
"""Every web terminal of the Monitor can send Ctrl+D from its Ctrl menu, so
|
|
a pasted text can be finished from a phone or a tablet."""
|
|
import json
|
|
from pathlib import Path
|
|
import unittest
|
|
|
|
ROOT = Path(__file__).resolve().parents[3]
|
|
TERMINALS = {
|
|
'terminal-panel': 'sendSequence',
|
|
'script-terminal-modal': 'sendCommand',
|
|
'lxc-terminal-modal': 'sendKey',
|
|
}
|
|
|
|
|
|
class TerminalCtrlKeysTests(unittest.TestCase):
|
|
def test_each_terminal_sends_ctrl_d(self):
|
|
for name, send in TERMINALS.items():
|
|
source = (ROOT / f'AppImage/components/{name}.tsx').read_text(encoding='utf-8')
|
|
with self.subTest(terminal=name):
|
|
self.assertIn(f'onSelect={{() => {send}("\\x04")}}', source)
|
|
self.assertIn('t("scriptTerminal.endOfInput")', source)
|
|
|
|
def test_the_label_exists_in_english_and_spanish(self):
|
|
for language in ('en', 'es'):
|
|
catalog = json.loads((ROOT / f'AppImage/messages/{language}/common.json').read_text(encoding='utf-8'))
|
|
with self.subTest(language=language):
|
|
self.assertTrue(catalog['scriptTerminal'].get('endOfInput'))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|