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:
@@ -23,12 +23,12 @@ def test_text_weather_and_stack_widgets_are_checked(client, owner_h):
|
||||
p = playlist(client, owner_h)
|
||||
s = slide(client, owner_h, p["id"], "blank", content={"widgets": [
|
||||
{"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")}),
|
||||
]})
|
||||
ws = s["content"]["widgets"]
|
||||
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 ws[0]["cells"] == [] and ws[0]["board"] is None
|
||||
url = f"/api/signage/playlists/{p['id']}/slides"
|
||||
|
||||
Reference in New Issue
Block a user