From 07f5b140922d13519ad7a0d1dad67a9b403be9f1 Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Tue, 22 Sep 2026 12:43:52 +0200 Subject: tui: kundutkast, , explicit Spara och F2-åtgärder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/tui-golden.py | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) (limited to 'scripts/tui-golden.py') diff --git a/scripts/tui-golden.py b/scripts/tui-golden.py index b339f2d..4fee4df 100755 --- a/scripts/tui-golden.py +++ b/scripts/tui-golden.py @@ -60,6 +60,7 @@ KEYS = { "ctrlenter-kitty": "\x1b[13;5u", "f5": "\x1b[15~", "f9": "\x1b[20~", + "f2": "\x1bOQ", } # {org_name} {org_nr} {fy_label} {fy_start} {fy_end} are substituted at run @@ -257,6 +258,64 @@ SCENARIOS = [ "screen": "customers", "expect": ["Kunder", "Testkund AB"], }, + { + "name": "customer-draft", + "screen": "customers", + "expect": ["Kunder", "Testkund AB"], + "steps": [ + { + "keys": ["ctrln"], + "expect": ["Ny kund", ""], + }, + { + "keys": ["enter", "Utkastkund", "enter"], + "expect": ["Ny kund", "", "Utkastkund"], + }, + { + "keys": ["esc"], + "expect": ["Kunder", " Utkastkund"], + }, + { + "keys": ["end", "up"], + "expect": [" Utkastkund"], + }, + { + "keys": ["f2"], + "expect": ["Åtgärder", "Öppna", "Radera utkast"], + }, + { + "keys": ["down", "enter"], + "expect": ["Radera utkastet?"], + }, + { + "keys": ["enter"], + "expect": ["Kunder", "Testkund AB"], + }, + ], + }, + { + "name": "customer-draft-save", + "screen": "customers", + "expect": ["Kunder", "Testkund AB"], + "steps": [ + { + "keys": ["ctrln"], + "expect": ["Ny kund", ""], + }, + { + "keys": ["enter", "Sparad kund", "enter"], + "expect": ["Sparad kund", ""], + }, + { + "keys": ["f9"], + "expect": ["Sparat."], + }, + { + "keys": ["enter"], + "expect": ["Kunder", "Sparad kund"], + }, + ], + }, { "name": "invoice-form", "screen": "invoices", -- cgit v1.3