refactor(prezentacja): wspólne partiale formularza — koniec dublowania chart/compile
Testy / Testy warstwy logicznej (silnik) (pull_request) Successful in 10m32s
Testy / Testy warstwy prezentacji (dostęp do baz) (pull_request) Successful in 9m28s
Testy / Build obrazu silnika B (swisseph) (pull_request) Successful in 12s
Testy / Kontrola składni wszystkich warstw (pull_request) Successful in 8s
build / build (push) Successful in 20s
Testy / Testy warstwy logicznej (silnik) (push) Successful in 10m28s
Testy / Testy warstwy prezentacji (dostęp do baz) (push) Successful in 9m29s
Testy / Build obrazu silnika B (swisseph) (push) Successful in 11s
Testy / Kontrola składni wszystkich warstw (push) Successful in 8s
Testy / Testy warstwy logicznej (silnik) (pull_request) Successful in 10m32s
Testy / Testy warstwy prezentacji (dostęp do baz) (pull_request) Successful in 9m28s
Testy / Build obrazu silnika B (swisseph) (pull_request) Successful in 12s
Testy / Kontrola składni wszystkich warstw (pull_request) Successful in 8s
build / build (push) Successful in 20s
Testy / Testy warstwy logicznej (silnik) (push) Successful in 10m28s
Testy / Testy warstwy prezentacji (dostęp do baz) (push) Successful in 9m29s
Testy / Build obrazu silnika B (swisseph) (push) Successful in 11s
Testy / Kontrola składni wszystkich warstw (push) Successful in 8s
Spłata długu: bloki opcji i tabele wyniku były kopiowane między „Horoskop" (/) i „Skompiluj" (/compile). Duplikat już raz spowodował regresję (podsumowanie gubiło opcje), a przy każdej nowej opcji rósł (dodawałem je 3× w dwóch miejscach). - `_form_options.html` (NOWY): bloki opcji — stacje/tabele, porównanie domów, ustawienia aspektów. Dołączany przez oba formularze. - `_result_tables.html`: chart.html PRZECHODZI na ten wspólny plik (compile już go używał od #46). Rysunki (koło/aspektarian/deklinacja/antyscja) zgrupowane razem, potem wspólne tabele. Dzięki temu widok główny i podsumowanie NIE MOGĄ się już rozjechać — jedno źródło prawdy. Zero zmian zachowania: oba szablony renderują te same pola i tabele co wcześniej (sprawdzone renderem na bogatym wyniku). Testy strukturalne przełączone na odczyt wspólnych plików. Prezentacja 221. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit was merged in pull request #50.
This commit is contained in:
@@ -10,6 +10,7 @@ import pathlib
|
||||
APP = pathlib.Path(__file__).resolve().parents[1] / "app"
|
||||
CHART = (APP / "templates" / "chart.html").read_text(encoding="utf-8")
|
||||
COMPILE = (APP / "templates" / "compile.html").read_text(encoding="utf-8")
|
||||
OPTS = (APP / "templates" / "_form_options.html").read_text(encoding="utf-8") # wspólne opcje obu formularzy
|
||||
MAIN = (APP / "main.py").read_text(encoding="utf-8")
|
||||
CLIENT = (APP / "clients" / "logic_client.py").read_text(encoding="utf-8")
|
||||
SYNC = (APP / "static" / "formsync.js").read_text(encoding="utf-8")
|
||||
@@ -19,9 +20,11 @@ FIELDS = ("aspect_orb", "aspect_luminary_bonus", "aspect_minor")
|
||||
|
||||
|
||||
def test_both_forms_have_aspect_settings():
|
||||
"""Pola są we WSPÓLNYM pliku opcji, który oba formularze dołączają."""
|
||||
for f in FIELDS:
|
||||
assert f'name="{f}"' in CHART, f"Horoskop: brak {f}"
|
||||
assert f'name="{f}"' in COMPILE, f"Skompiluj: brak {f}"
|
||||
assert f'name="{f}"' in OPTS, f"brak {f} we wspólnym pliku opcji"
|
||||
assert '{% include "_form_options.html" %}' in CHART
|
||||
assert '{% include "_form_options.html" %}' in COMPILE
|
||||
|
||||
|
||||
def test_handlers_accept_and_pass_aspect_settings():
|
||||
|
||||
Reference in New Issue
Block a user