@davoodmehraban89 / Aram-1 / commits / 2e0d0dc
Fork 0

test(desktop): stress asynchronous native search at the 75k-row detail limit

davoodmehraban89 committed Oct 31, 2026 at 22:11 UTC 2e0d0dcea54f3eb66a0f2be86c0e2f095a4fbab4
1 file changed +19 -1
backend/src/aram_backend/desktop_five_statement.py
+19 -1
@@ -720,6 +720,7 @@ def ui_valid_smoke_test() -> int:
720 This is an automated widget check, not human review or official approval.
721 """
722 import time
723 + from aram_backend.desktop_five_statement_details import MAX_DETAIL_ROWS
724
725 def wait_for_filter(window: FiveStatementWindow) -> bool:
726 for _ in range(500):
@@ -785,6 +786,11 @@ def ui_valid_smoke_test() -> int:
786 window.detail_filter_var.set("سود و زیان")
787 window.detail_search_var.set("یادداشت R01")
788 window._apply_detail_filter()
789 + if not window._filtering:
790 + return 44
791 + if str(window.detail_search_button.cget("state")) != "disabled":
792 + return 45
793 + window.update_idletasks()
794 if not wait_for_filter(window):
795 return 41
796 filtered = window.detail_tree.get_children()
@@ -798,11 +804,22 @@ def ui_valid_smoke_test() -> int:
804 original_details = window._detail_rows
805 if not original_details:
806 return 34
801 - repeats = 200 // len(original_details) + 1
807 + repeats = MAX_DETAIL_ROWS // len(original_details)
808 window._detail_rows = original_details * repeats
809 + if len(window._detail_rows) != MAX_DETAIL_ROWS:
810 + return 46
811 + window.detail_filter_var.set("تراز آزمایشی")
812 window._apply_detail_filter()
813 + if not window._filtering:
814 + return 47
815 + window.update_idletasks()
816 if not wait_for_filter(window):
817 return 42
818 + expected_trial_balance = sum(
819 + row.statement == "تراز آزمایشی" for row in original_details
820 + ) * repeats
821 + if len(window._filtered_detail_rows) != expected_trial_balance:
822 + return 48
823 if len(window.detail_tree.get_children()) != 200:
824 return 35
825 if str(window.detail_next_button.cget("state")) != "normal":
@@ -816,6 +833,7 @@ def ui_valid_smoke_test() -> int:
833 if len(window.detail_tree.get_children()) != 200:
834 return 39
835 window._detail_rows = original_details
836 + window.detail_filter_var.set("همه")
837 window._apply_detail_filter()
838 if not wait_for_filter(window):
839 return 43