fix(settings): reject fractional refresh intervals

This commit is contained in:
Bu5hm4nn
2026-03-26 14:05:49 +01:00
parent 2759d9a36f
commit e860c40567
2 changed files with 22 additions and 2 deletions

View File

@@ -20,8 +20,15 @@ def test_settings_reject_invalid_loan_amount_without_silent_zero_fallback() -> N
expect(page.locator("text=Settings").first).to_be_visible(timeout=15000)
expect(page.locator("text=Last saved:").first).to_be_visible(timeout=15000)
page.get_by_label("Refresh interval (seconds)").fill("7")
refresh_interval_input = page.get_by_label("Refresh interval (seconds)")
refresh_interval_input.fill("7")
expect(page.locator("text=Unsaved changes — Last saved:").first).to_be_visible(timeout=15000)
refresh_interval_input.fill("5.5")
refresh_interval_input.press("Tab")
expect(page.locator("text=INVALID").first).to_be_visible(timeout=15000)
expect(page.locator("text=Refresh interval must be a whole number of seconds").first).to_be_visible(
timeout=15000
)
page.reload(wait_until="domcontentloaded", timeout=30000)
expect(page.get_by_label("Refresh interval (seconds)")).to_have_value("5")
expect(page.locator("text=Last saved:").first).to_be_visible(timeout=15000)