mirror of
https://git.hiabuto.net/C3MA/CCMA.git
synced 2026-09-05 19:20:48 +02:00
"Erneut prüfen" refreshed the banner but left the window title and the status bar reading "NUR LESEN" -- both were built once and never updated -- while the banner itself asked for a restart that the recheck exists to avoid. Title, status bar and banner are refreshed from one place now, so none of them can be left behind, and the main window owns the title instead of app.py setting it once at startup. The banner points at "Erneut prüfen" and says outright that no restart is needed. Since the startup pass was skipped, its task list is empty rather than current, so a successful recheck offers the housekeeper run that fills it. UI tests cover both directions of the recheck; their Tk root moved into a shared conftest fixture, because a second root in another module invalidates the icon images bound to the first. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
21 lines
682 B
Python
21 lines
682 B
Python
import pytest
|
|
|
|
|
|
@pytest.fixture(scope="session")
|
|
def tk_root():
|
|
"""One Tk root for the whole test session, shared by every UI test module: the
|
|
icon library binds its images to the first root, so a second one (or a root torn
|
|
down between tests) invalidates them with 'image "pyimage1" doesn\'t exist'.
|
|
Skips where there is no display, which keeps the suite running on headless CI."""
|
|
tk = pytest.importorskip("tkinter")
|
|
from ccma.ui.theme import load_theme
|
|
|
|
try:
|
|
root = tk.Tk()
|
|
except tk.TclError as exc:
|
|
pytest.skip(f"kein Display verfügbar: {exc}")
|
|
root.withdraw()
|
|
load_theme(root, "dark")
|
|
yield root
|
|
root.destroy()
|