mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-05-27 20:20:20 +00:00
test: bump locale-count assertions for new ja locale (8 -> >=8/9)
This commit is contained in:
@@ -71,13 +71,18 @@ def test_is_cron_session():
|
||||
|
||||
|
||||
def test_cron_jobs_project_i18n_key_exists():
|
||||
"""All 8 locales must have the cron_jobs_project i18n key."""
|
||||
"""Every shipped locale must have the cron_jobs_project i18n key.
|
||||
|
||||
Test was originally written for 8 locales; v0.50.264 added Japanese,
|
||||
bringing the count to 9. Use >= so future locale additions don't
|
||||
require touching this test.
|
||||
"""
|
||||
i18n_path = pathlib.Path(__file__).resolve().parent.parent / "static" / "i18n.js"
|
||||
content = i18n_path.read_text(encoding="utf-8")
|
||||
|
||||
# Count occurrences of cron_jobs_project
|
||||
count = content.count("cron_jobs_project:")
|
||||
assert count == 8, f"Expected 8 locale entries for cron_jobs_project, found {count}"
|
||||
assert count >= 9, f"Expected >= 9 locale entries for cron_jobs_project, found {count}"
|
||||
|
||||
|
||||
def test_cron_session_gets_project_id_in_cli_list():
|
||||
|
||||
@@ -115,7 +115,7 @@ def test_csv_i18n_keys():
|
||||
required_keys = ['csv_loading', 'csv_too_large', 'csv_no_data', 'csv_error']
|
||||
for key in required_keys:
|
||||
count = src.count(f"{key}:")
|
||||
assert count == 7, f"Key '{key}' found {count} times, expected 7"
|
||||
assert count >= 8, f"Key '{key}' found {count} times, expected >= 8 (one per locale)"
|
||||
|
||||
|
||||
def test_csv_css_classes():
|
||||
|
||||
@@ -147,7 +147,7 @@ def test_excalidraw_i18n_keys():
|
||||
]
|
||||
for key in required_keys:
|
||||
count = src.count(f"{key}:")
|
||||
assert count == 7, f"Key '{key}' found {count} times, expected 7"
|
||||
assert count >= 8, f"Key '{key}' found {count} times, expected >= 8 (one per locale)"
|
||||
|
||||
|
||||
def test_excalidraw_css_classes():
|
||||
|
||||
@@ -97,4 +97,4 @@ class TestDiffI18n:
|
||||
with open("static/i18n.js", "r", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
count = content.count("diff_loading")
|
||||
assert count == 7, f"diff_loading found {count} times, expected 7"
|
||||
assert count >= 8, f"diff_loading found {count} times, expected >= 8 (one per locale)"
|
||||
|
||||
@@ -103,7 +103,7 @@ def test_batch_select_i18n_keys():
|
||||
# Count occurrences - each key should appear in all 7 locales
|
||||
for key in required_keys:
|
||||
count = src.count(f"{key}:")
|
||||
assert count == 7, f"Key '{key}' found {count} times, expected 7 (one per locale)"
|
||||
assert count >= 8, f"Key '{key}' found {count} times, expected >= 8 (one per locale) (one per locale)"
|
||||
|
||||
|
||||
def test_batch_select_css_exists():
|
||||
|
||||
@@ -118,7 +118,7 @@ def test_i18n_keys():
|
||||
]
|
||||
for key in required_keys:
|
||||
count = src.count(f"{key}:")
|
||||
assert count == 7, f"Key '{key}' found {count} times, expected 7"
|
||||
assert count >= 8, f"Key '{key}' found {count} times, expected >= 8 (one per locale)"
|
||||
|
||||
|
||||
def test_css_classes_exist():
|
||||
|
||||
Reference in New Issue
Block a user