diff options
| author | Anders Betts <anders.betts@gmail.com> | 2026-09-23 09:24:40 +0200 |
|---|---|---|
| committer | Anders Betts <anders.betts@gmail.com> | 2026-09-23 09:24:40 +0200 |
| commit | 6159042d0cb3870e6a7c6f8d9a97e175d59e6f80 (patch) | |
| tree | c6422654298a744b0a791de8f1e8ccb8e1c55071 /scripts | |
| parent | 53071bb69f5d21b35b8a61c2b1dd18832ce781d4 (diff) | |
| download | bokf-6159042d0cb3870e6a7c6f8d9a97e175d59e6f80.tar.gz bokf-6159042d0cb3870e6a7c6f8d9a97e175d59e6f80.zip | |
tui: 'g' + a letter searches list rows
The goto prompt decides on its first key: digits jump to a row number as
before, any other printable key searches the row texts of the list or
menu (case-insensitive, also åäö), with up/down stepping through the
matches. Keys typed into the prompt no longer reach the screen's key
hook, and Enter in the action menu closes an open prompt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/tui-golden.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/tui-golden.py b/scripts/tui-golden.py index 864210c..71e1273 100755 --- a/scripts/tui-golden.py +++ b/scripts/tui-golden.py @@ -589,6 +589,35 @@ SCENARIOS = [ ], }, { + # 'g' + a letter searches the list rows; the screen's own keys + # ('s' = sortera) are text while the prompt is open. + "name": "voucher-goto-search", + "screen": "vouchers", + "expect": ["sorterade på nummer, stigande", "F1"], + "steps": [ + { + "keys": ["g"], + "expect": ["Gå till rad eller sök (bokstav):"], + }, + { + "keys": ["s"], + "expect": ["Sök: s", "sorterade på nummer, stigande"], + }, + { + "keys": ["backspace", "zzz"], + "expect": ["Sök: zzz", "(ingen träff)"], + }, + { + "keys": ["esc", "g", "GOLDEN VER"], + "expect": ["Sök: GOLDEN VER", "upp/ned = fler träffar"], + }, + { + "keys": ["enter", "enter"], + "expect": ["Verifikat A1", "Golden verifikat"], + }, + ], + }, + { # Backspace in a freshly opened field edits the value; the next # key must not replace everything. "name": "form-edit-backspace", |
