summaryrefslogtreecommitdiff
path: root/scripts/tui-golden.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/tui-golden.py')
-rwxr-xr-xscripts/tui-golden.py29
1 files changed, 28 insertions, 1 deletions
diff --git a/scripts/tui-golden.py b/scripts/tui-golden.py
index bce00eb..deca6ef 100755
--- a/scripts/tui-golden.py
+++ b/scripts/tui-golden.py
@@ -709,6 +709,31 @@ SCENARIOS = [
],
},
{
+ # Web mode (the browser-terminal wrapper sets BOKF_WEB=1): nothing
+ # may touch the frontend's files or start a viewer there.
+ "name": "web-mode",
+ "screen": "vouchers",
+ "env": {"BOKF_WEB": "1"},
+ "steps": [
+ {
+ "keys": ["home", "enter"],
+ "expect": ["Golden verifikat", "a = bifoga"],
+ },
+ {
+ "keys": ["a"],
+ "expect": ["Inte tillgängligt i webbversionen"],
+ },
+ {
+ "keys": ["enter", "f", "enter", "right", "enter"],
+ "expect": ["Inte tillgängligt i webbversionen"],
+ },
+ {
+ "keys": ["enter"],
+ "expect": ["Underlag"],
+ },
+ ],
+ },
+ {
# Keep last: changes the rig's login password, then restores it so
# a rerun of the list still logs in.
"name": "change-password",
@@ -1362,7 +1387,9 @@ def main(argv):
"--socket", str(sock), "--user", "admin",
"--org", str(org_id), "--fy", str(fy["id"]),
"--screen", sc["screen"]]
- app = PtyApp(argv_tui, env, TERM_COLS, TERM_ROWS)
+ sc_env = dict(env)
+ sc_env.update(sc.get("env", {}))
+ app = PtyApp(argv_tui, sc_env, TERM_COLS, TERM_ROWS)
name = sc["name"]
missing = None
before = current = ""