All checks were successful
Windows project source guards / test (push) Successful in 36s
- Single source of truth for theme: theme.py tokens, FluentDialog base for all dialogs, setCustomStyleSheet migration, theme applied before window creation, SystemThemeListener for auto mode - Responsive layout: ScrollablePage base with as-needed horizontal scrolling, word wrap on dashboard labels, adaptive dashboard grid, realistic 860x560 window minimum - Real country flags (flagcdn PNG set) with themed border and fallback - Active server row marked by accent stripe only (no synthesized bold) - Subscription polish from parallel work (QR utils, http, diagnostics) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
31 lines
1,003 B
Python
31 lines
1,003 B
Python
"""Static checks on main_window.py (AC11): realistic minimum window size.
|
|
|
|
Pure source inspection — no Qt imports, safe at any position in the test
|
|
discovery order (MainWindow itself is too heavy to instantiate offscreen,
|
|
see spec assumption A12).
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import re
|
|
import unittest
|
|
from pathlib import Path
|
|
|
|
REPO_ROOT = Path(__file__).resolve().parent.parent
|
|
MAIN_WINDOW = REPO_ROOT / "xray_fluent" / "ui" / "main_window.py"
|
|
|
|
|
|
class MainWindowMinimumSizeTest(unittest.TestCase):
|
|
def test_minimum_size_is_860_by_560(self) -> None:
|
|
source = MAIN_WINDOW.read_text(encoding="utf-8")
|
|
self.assertRegex(
|
|
source,
|
|
r"self\.setMinimumSize\(\s*860\s*,\s*560\s*\)",
|
|
"MainWindow must set the 860x560 minimum size (AC11)",
|
|
)
|
|
match = re.search(r"setMinimumSize\(\s*600\s*,\s*450\s*\)", source)
|
|
self.assertIsNone(match, "old 600x450 minimum must be gone")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|