fix(signage): the stacks test follows the 7-day forecast (6R.18: from + days capped at 7, not 3)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 15:10:25 +02:00
co-authored by Claude Opus 5.5
parent 84c2d5b2d8
commit 0bd32d9171
+2 -2
View File
@@ -23,12 +23,12 @@ def test_text_weather_and_stack_widgets_are_checked(client, owner_h):
p = playlist(client, owner_h) p = playlist(client, owner_h)
s = slide(client, owner_h, p["id"], "blank", content={"widgets": [ s = slide(client, owner_h, p["id"], "blank", content={"widgets": [
{"kind": "text", "text": "Happy hour 18-20"}, {"kind": "text", "text": "Happy hour 18-20"},
{"kind": "weather", "weather_from": 1, "weather_days": 3, "weather_style": "icon"}, {"kind": "weather", "weather_from": 5, "weather_days": 3, "weather_style": "icon"},
stack({"share": 30, "widget": {"kind": "clock"}}, {"share": 70, "widget": stack({"share": 50}, {"share": 50}, direction="column")}), stack({"share": 30, "widget": {"kind": "clock"}}, {"share": 70, "widget": stack({"share": 50}, {"share": 50}, direction="column")}),
]}) ]})
ws = s["content"]["widgets"] ws = s["content"]["widgets"]
assert ws[0]["text"] == "Happy hour 18-20" assert ws[0]["text"] == "Happy hour 18-20"
assert ws[1]["weather_from"] == 1 and ws[1]["weather_days"] == 2 and ws[1]["weather_style"] == "icon" # the forecast has 3 days assert ws[1]["weather_from"] == 5 and ws[1]["weather_days"] == 2 and ws[1]["weather_style"] == "icon" # the forecast has 7 days (6R.18)
assert [c["share"] for c in ws[2]["cells"]] == [30, 70] and ws[2]["cells"][1]["widgets"][0]["direction"] == "column" assert [c["share"] for c in ws[2]["cells"]] == [30, 70] and ws[2]["cells"][1]["widgets"][0]["direction"] == "column"
assert ws[0]["cells"] == [] and ws[0]["board"] is None assert ws[0]["cells"] == [] and ws[0]["board"] is None
url = f"/api/signage/playlists/{p['id']}/slides" url = f"/api/signage/playlists/{p['id']}/slides"