summaryrefslogtreecommitdiff
path: root/scripts/tui-golden.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/tui-golden.py')
-rwxr-xr-xscripts/tui-golden.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/scripts/tui-golden.py b/scripts/tui-golden.py
index 589b693..33f1d7c 100755
--- a/scripts/tui-golden.py
+++ b/scripts/tui-golden.py
@@ -88,6 +88,32 @@ SCENARIOS = [
"10. 20 range 4510-4529",
],
},
+ {
+ "name": "voucher-detail",
+ "screen": "vouchers",
+ "steps": [
+ {
+ "keys": ["enter"],
+ "expect": ["Benämning", "Debet", "Kredit", "Underlag",
+ "kvitto.txt"],
+ },
+ ],
+ },
+ {
+ "name": "kontolista-sticky",
+ "screen": "reports",
+ "expect": ["Rapporter"],
+ "steps": [
+ {
+ "keys": ["7"],
+ "expect": ["Konto", "Namn"],
+ },
+ {
+ "keys": ["end"],
+ "expect": ["Konto", "Namn", "konton, varav"],
+ },
+ ],
+ },
]
# --------------------------------------------------------------------------
@@ -558,6 +584,22 @@ def setup_rig(repo, tmp, env):
"--org", str(org_id), "fiscal_year.get",
json.dumps({"id": fy_id})], env)
fy = json.loads(out)["result"]
+ out = run_checked([str(bind / "bokfctl"), "--socket", str(sock),
+ "--user", "admin", "--password", env["BOKFD_PASSWORD"],
+ "--org", str(org_id), "voucher.post",
+ json.dumps({
+ "date": fy.get("start_date", "2026-01-01"),
+ "description": "Golden verifikat",
+ "rows": [{"account": "1930", "debit_ore": 12300},
+ {"account": "3001", "credit_ore": 12300}],
+ })], env)
+ vid = json.loads(out)["result"]["id"]
+ run_checked([str(bind / "bokfctl"), "--socket", str(sock),
+ "--user", "admin", "--password", env["BOKFD_PASSWORD"],
+ "--org", str(org_id), "attachment.put",
+ json.dumps({"filename": "kvitto.txt",
+ "content_base64": "a3ZpdHRv",
+ "voucher_id": vid})], env)
return daemon, sock, org_id, fy