test(desktop): hit the exact 75,000 detail-row boundary in frozen UI smoke
davoodmehraban89 committed
Oct 31, 2026 at 22:13 UTC
ff6d9516b552fc51df49e5367f732bf944980f0d
1 file changed
+11
-5
backend/src/aram_backend/desktop_five_statement.py
+11
-5
@@ -804,8 +804,10 @@ def ui_valid_smoke_test() -> int:
804
original_details = window._detail_rows
805
if not original_details:
806
return 34
807
- repeats = MAX_DETAIL_ROWS // len(original_details)
808
- window._detail_rows = original_details * repeats
807
+ repeats, remainder = divmod(MAX_DETAIL_ROWS, len(original_details))
808
+ window._detail_rows = (
809
+ original_details * repeats + original_details[:remainder]
810
+ )
811
if len(window._detail_rows) != MAX_DETAIL_ROWS:
812
return 46
813
window.detail_filter_var.set("تراز آزمایشی")
@@ -815,9 +817,13 @@ def ui_valid_smoke_test() -> int:
817
window.update_idletasks()
818
if not wait_for_filter(window):
819
return 42
818
- expected_trial_balance = sum(
819
- row.statement == "تراز آزمایشی" for row in original_details
820
- ) * repeats
820
+ expected_trial_balance = (
821
+ sum(row.statement == "تراز آزمایشی" for row in original_details) * repeats
822
+ + sum(
823
+ row.statement == "تراز آزمایشی"
824
+ for row in original_details[:remainder]
825
+ )
826
+ )
827
if len(window._filtered_detail_rows) != expected_trial_balance:
828
return 48
829
if len(window.detail_tree.get_children()) != 200: