mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-09-21 20:40:47 +02:00
feat(combos): add Combos & Synergies detection, chip-style UI with dual hover; JSON persistence and headless honoring; stage ordering; docs and tests; bump to v2.2.1
This commit is contained in:
parent
cc16c6f13a
commit
6c48fb3437
38 changed files with 2042 additions and 131 deletions
24
code/tests/test_diagnostics_page.py
Normal file
24
code/tests/test_diagnostics_page.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import importlib
|
||||
from starlette.testclient import TestClient
|
||||
|
||||
|
||||
def test_diagnostics_page_gated_and_visible(monkeypatch):
|
||||
# Ensure disabled first
|
||||
monkeypatch.delenv("SHOW_DIAGNOSTICS", raising=False)
|
||||
import code.web.app as app_module
|
||||
importlib.reload(app_module)
|
||||
client = TestClient(app_module.app)
|
||||
r = client.get("/diagnostics")
|
||||
assert r.status_code == 404
|
||||
|
||||
# Enabled: should render
|
||||
monkeypatch.setenv("SHOW_DIAGNOSTICS", "1")
|
||||
importlib.reload(app_module)
|
||||
client2 = TestClient(app_module.app)
|
||||
r2 = client2.get("/diagnostics")
|
||||
assert r2.status_code == 200
|
||||
body = r2.text
|
||||
assert "Diagnostics" in body
|
||||
assert "Combos & Synergies" in body
|
Loading…
Add table
Add a link
Reference in a new issue